Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to improve look and feel of JAVA swing GUI?

I am working on a project that uses Java Swing. The default look and feel of the Java Swing GUI is very boring. Is there any way I can use a better look and feel? Something like on web pages...

like image 340
Mandar Avatar asked Apr 07 '10 12:04

Mandar


People also ask

Is Swing good for GUI?

Java Swing is a more prominent GUI component which is part of the Oracles JFC – Java Foundation Classes API. This provides a more sophisticated Graphical interface option to the Java Programs.

Which method is used to change the look and feel of the Java GUI application?

setLookAndFeel() method with the fully qualified name of the appropriate subclass of LookAndFeel as its argument.

Which are 3 types of Look & Feel available in Swing?

Default is "Java LAF" (or "Metal"), a custom look and feel similar to the Windows look. 2. Motif look available on all platforms. Windows and Mac looks are only available on their native platforms.


2 Answers

You can set the look and feel to reflect the platform:

try {      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) {     e.printStackTrace(); } 

If this is not nice enough for you, take a look at SWT for Eclipse.

like image 144
Frederik Wordenskjold Avatar answered Sep 23 '22 05:09

Frederik Wordenskjold


Look at the Java tutorial for setting the look and feel. In addition to those mentioned there, recent Java 6 releases also include the Nimbus Look and Feel.

like image 21
Michael Borgwardt Avatar answered Sep 24 '22 05:09

Michael Borgwardt