class JXPanel extends JPanel implements AlphaPaintable, BackgroundPaintable, Scrollable {

    @Override
    public void setAlpha(float alpha) {
        if (isPatch()) {
            setAlphaPatch(alpha);
            return;
        }
        if (alpha < 0f || alpha > 1f) {
            throw new IllegalArgumentException("invalid alpha value " + alpha);
        }
        
        float oldValue = getAlpha();
        this.alpha = alpha;
        
        if (getAlpha() < 1f) {
            if (oldValue == 1) {
                //it used to be 1, but now is not. Save the oldOpaque
                oldOpaque = isOpaque();
                super.setOpaque(false);
            }
            
            installRepaintManager();
        } else {
            uninstallRepaintManager();
            
            //restore the oldOpaque if it was true (since opaque is false now)
            if (oldOpaque) {
                super.setOpaque(true);
            }
        }
        
        firePropertyChange("alpha", oldValue, getAlpha());
        repaint();
    }

    public  JXPanel();
    public  JXPanel(boolean isDoubleBuffered);
    public  JXPanel(LayoutManager layout);
    public  JXPanel(LayoutManager layout, boolean isDoubleBuffered);

}