Snippet Netbeans Uno
Abstract: Descrizione:
Classe che extend JFrame
LookAndFeel Nimbus
Tre
Quattro
--------------------------------------------------------------------------o-----------------------------------------------------------------------
import javax.swing.*;
import java.awt.*;
public class Snippet extends JFrame{
public static void main(String[] args) {
SwingUtilities.invokeLater(() -> {
new Snippet();
});
}
public Snippet(){
try {
UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
} catch (Exception e) {
e.printStackTrace();
}
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().setLayout(null);
getContentPane().setBackground(Color.WHITE);
setSize(300, 200);
setLocationRelativeTo(null);
setVisible(true);
}
} |
--------------------------------------------------------------------------o-----------------------------------------------------------------------
try {
UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
} catch (Exception e) {
e.printStackTrace();
} |
--------------------------------------------------------------------------o-----------------------------------------------------------------------
--------------------------------------------------------------------------o-----------------------------------------------------------------------
Nome della Classe: |

|
|