1

The default Look & Feel of Swing is not good looking for Linux platforms, The target Platforms are Windows and Linux, Can someone suggest are there any library which gives better look and feel similar to components appearing on windows platforms for Linux systems?

For windows, I am using system look and feel, this looks much better than in Linux. Also like to know how to load different look and feel depending on the platform.

FirmView
  • 3,130
  • 8
  • 34
  • 50
  • 3
    Given the variance in definition of 'nice' between one person and another, I have voted to close as 'not constructive'. Though see [this question](http://stackoverflow.com/questions/3954616/java-look-and-feel-lf) for some possibilities. – Andrew Thompson Sep 01 '12 at 15:01
  • 1
    do you know [javaFX](http://www.oracle.com/technetwork/java/javafx/overview/index.html)? – Nandkumar Tekale Sep 01 '12 at 15:03
  • 'nice' can be replaced to better. – FirmView Sep 01 '12 at 15:10
  • What about [SWT](http://www.eclipse.org/swt/)? It uses the default OS widgets (GUI elements). – Baz Sep 01 '12 at 15:10
  • 'better' is just as subjective. – Andrew Thompson Sep 01 '12 at 15:13
  • @Baz thanks, even is SWT, components are looking nice in windows compared to linux, wonder why the UI is underdeveloped in Linux platforms – FirmView Sep 01 '12 at 15:14
  • 1
    @FirmView But that's not SWT's fault, but the "fault" of the OS. Not much you can do about it... I really prefer a _native_ look of a gui. – Baz Sep 01 '12 at 15:16
  • @Baz +1 for your observations – FirmView Sep 01 '12 at 15:18
  • *"look and feel similar to components appearing on windows platforms for Linux systems"* Yuck! I could think of little worse than foisting Windows style GUIs on user of *nix. Give them a break! – Andrew Thompson Sep 01 '12 at 15:20

1 Answers1

1

You'll need to read the 'howto' for setting the look and feel. Oracle has one here: http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

To use GTK, you would use:

try
{
     UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
}
catch (ClassNotFoundException e)
{

}
catch (UnsupportedLookAndFeelException e)
{

}
bazwilliams
  • 330
  • 1
  • 6
  • Spent too long answering question - comments above point to better question. – bazwilliams Sep 01 '12 at 15:15
  • +1 for your answer, i had a look at the tutorial, i am looking for a library which gives similar appearence to windows in linux platforms – FirmView Sep 01 '12 at 15:21