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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top