Change look and feel on the fly?

F

fishfry

Trying to give user radio buttons to change JFrame look and feel on the
fly via

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName();

etc. in the buttons' action listener. The code executes but the look and
feel doesn't change. What is the trick to make the JFrame change its
look and feel?
 
A

Andrew Thompson

Trying to give user radio buttons to change JFrame look and feel on the
fly via

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName();

etc. in the buttons' action listener. The code executes but the look and
feel doesn't change. What is the trick to make the JFrame change its
look and feel?

Have a look at..
SwingUtilites.updateComponentTreeUI(Component)

f'Ups set to c.l.j.h

HTH
 
T

Tom N

fishfry said:
Trying to give user radio buttons to change JFrame look and feel on the
fly via

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName();

etc. in the buttons' action listener. The code executes but the look and
feel doesn't change. What is the trick to make the JFrame change its
look and feel?

See demo/jfc/Metalworks in the JDK.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,734
Latest member
manin

Latest Threads

Top