TheWolf
TheWolf

Reputation: 1695

Creating Java GUIs that resemble the native Windows look and feel

Is there a better package or external library out there that does a better job than javax.swing at resembling the native Windows look and feel? I want my Java GUIs to resemble the forms I create using C# and the .NET framework. Thanks.

Upvotes: 4

Views: 9180

Answers (5)

zellus
zellus

Reputation: 9592

If you don't mind spending some many JIDE is a great product which offers as well 'windows' look and feel.

Upvotes: 1

Colin Hebert
Colin Hebert

Reputation: 93167

You can select the system look and feel with swing :

public static void main(String[] args) {
    try {
        // Set System L&F
        UIManager.setLookAndFeel(
            UIManager.getSystemLookAndFeelClassName());
    } 
    catch (UnsupportedLookAndFeelException e) {
       // handle exception
    }
    catch (ClassNotFoundException e) {
       // handle exception
    }
    catch (InstantiationException e) {
       // handle exception
    }
    catch (IllegalAccessException e) {
       // handle exception
    }

    new SwingApplication(); //Create and show the GUI.
}

Resources :

On the same topic :

Upvotes: 7

Richard Fearn
Richard Fearn

Reputation: 25491

You might want to look into setting the look and feel; if you use the Windows look and feel, your app will look more like a native app.

See this comparison of the various look and feels.

Upvotes: 2

heb
heb

Reputation: 753

Try SWT which is the GUI widget toolkit of Eclipse. A disadvantage of SWT is that it has some platform dependent libraries for each platform SWT supports: http://www.eclipse.org/swt/

Upvotes: 0

nkr1pt
nkr1pt

Reputation: 4666

SWT comes closest because it actually uses the OS'es native widgets. The downside is that you have to perform some memory management, which is not required with Swing.

Other options include QT with Java, more information on that in this topic: https://stackoverflow.com/questions/422956/java-swing-or-java-qt

and wxWidgets with wx4j: http://en.wikipedia.org/wiki/WxWidgets

Upvotes: 9

Related Questions