Memperindah Tampilan Form Menggunakan Nimbus Look & Feel di Netbeans 6.7


pernah buat aplikasi dekstop di Netbeans kn? klu pernah buat pasti tw tampilan form waktu dijalankan kayak gmn…… 🙂 🙂 …bosan gk dengan tmpilan yang modelnya kyak Metal?? klu sering bosan, teman” bisa menggantikan tampilan Formnya. caranya gmpang aja….!!

  • Hanya perlu mengubah method Main dengan code berikut :
public static void main(String args[]) {
        try {
            //Tambahkan code berikut pada method Main.....
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");

            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new Windows().setVisible(true);
                }
            });
        } catch (Exception ex) {
            System.out.println(ex);
        }
    }
  • Setelah itu, RUN aplikasinya maka akan tampil hasil seperti gambar di bawah :….SELAMAT MENCOBA !!

Advertisements

3 thoughts on “Memperindah Tampilan Form Menggunakan Nimbus Look & Feel di Netbeans 6.7

  1. Mas Galberto, saya coba di netbeans 6.9 dengan JDK 6 update 21, ketika saya running muncul error seperti ini:

    SEVERE: null
    java.lang.ClassNotFoundException: com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1848)
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:580)

    Kira2, kenapa ya mas? terima kasih atas jawabannya 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s