JFrame theme and appearance
Asked Answered
J

4

7

I have a swing application. Below is a small screenshot. enter image description here

OS: Win 7

What is irritating is the theme. I have tried several other screens but they all have such appearance. Eclipse and Netbeans for example have a much better UI. The FileChooser and Frame is general is much pleasing. How do I have such a theme.

Thanks.

Jackjackadandy answered 30/10, 2012 at 12:46 Comment(0)
M
19

Change the look and feel to the Windows one before creating anything UI-related in your program:

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
Malines answered 30/10, 2012 at 12:48 Comment(2)
Make sure you put it BEFORE you create the JFrame. I have made this mistake many times.Chromato
@Chromato you can call SwingUtilities.updateComponentTreeUI(frame) if the frame is already created.Malines
P
3

Looks like you are using the Metal Look and Feel. Try using some other look and feel that might interest you.

Refer http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html, for more information.

Pyrogenous answered 30/10, 2012 at 12:49 Comment(0)
H
3

This will give you everything you want to know

http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

UIManager.getSystemLookAndFeelClassName() will give you the most appropriate for the OS it's running on

Humbug answered 30/10, 2012 at 12:49 Comment(0)
H
3

there is many look and feels packages like :

1)JTattoo

2)BlueLight

3)joxy

4)Nimrod

5)Oyoaha

6)TinyLaf

....etc

you have to read about previous types

Hyacinthe answered 14/8, 2014 at 11:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.