/*
 * MeuPainel.java
 *
 * Created on 28 de Novembro de 2008, 16:49
 */

package ambienteGrafico.componentes;

import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import org.jdesktop.swingx.JXGlassBox;
import org.jdesktop.swingx.JXPanel;
import org.jvnet.substance.skin.SubstanceAutumnLookAndFeel;

/**
 *
 * @author  Marília
 */
public class MeuPainel extends JXPanel{

    /** Creates new form MeuPainel */
    public MeuPainel() {
        initComponents();
        float alfa = (float)0.8;
        setAlpha(alfa);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 400, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 300, Short.MAX_VALUE)
        );
    }// </editor-fold>//GEN-END:initComponents
public void mudarLookAndFeel(){
   /* //Get the currently installed look and feel
    LookAndFeel lf = UIManager.getLookAndFeel();
    // Install a different look and feel; specifically, the Windows look and feel
    try {
        
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        SwingUtilities.updateComponentTreeUI(this);
        //UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
    } catch (InstantiationException e) {
    } catch (ClassNotFoundException e) {
    } catch (UnsupportedLookAndFeelException e) {
    } catch (IllegalAccessException e) {
    }*/
    
    //Look and feel
        //setDefaultLookAndFeelDecorated(true);
        try {
          UIManager.setLookAndFeel(new SubstanceAutumnLookAndFeel());
        }
        catch (UnsupportedLookAndFeelException e) {
            e.printStackTrace();
        } 
        //Fim codigo look and feel
    
}

    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables

}
