public static void main(String args[]) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
NewOkCancelDialog dialog = new NewOkCancelDialog(new javax.swing.JFrame(), true);
dialog.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
System.exit(0);
}
});
dialog.setVisible(true);
}
});
}
It is actually a great way to play around with the components and explore nimbus. You can create an even complex mock-up in minutes. So Drag And Drop and enjoy!