Search code examples
javaswingtitlebarjinternalframe

Change Java JInternalFrame title bar theme


I am interested to know if it possible and how to change the standard JInternalFrame title bar theme to the JFrame title bar theme? If it is just a matter of changing the theme.

Basically, at the moment, my JInternalFrames look like the ones in Picture1 and I want them to look like in Picture2.

If this is not a matter of changing the "theme", then how can I achieve what I'm looking for? I really want my internal frames to look like the external frame.

Thank you in advance.



Picture1
enter image description here


Picture2
enter image description here


Solution

  • You'll want to set the Swing Look & Feel to the system LAF before creating Swing components.

    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());