• How to make windows looking apps in Java?

    SapnaVishwas Member

    Yea i’ve heard of programs coded in Java but they look like normal windows apps, how do you do that? programs like adobe reader, and that guys MSPad etc.

  • Gallard Member

    To make your GUI look like Windows:

    String lookAndFeel = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
    try {
             UIManager.setLookAndFeel(lookAndFeel);
    } catch (Exception e) {
             e.printStackTrace();
    }
    

    You need to set the look and feel before adding components. Change the long string at the top for a different look.
    You -NEED- the try/catch statement with this afaik, as java checks for it on compile.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.
en_USEnglish