I was wondering how to change the minimize, maximize, and exit button icons in the top left of the default JFrame swing window? I've looked everywhere and can't find a tutorial or method that does it.
-
1Unless you are using a look and feel that supports frame decorations (like Metal), you can't – MadProgrammer Aug 13 '13 at 03:27
-
How do I use a look and feel? And what's metal? – Person Person Aug 13 '13 at 03:30
-
1look at this site [here](http://www.google.com) and put Metal and LayoutManager and [here](http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html) to set L&F – nachokk Aug 13 '13 at 03:31
3 Answers
Minimize, maximize/restore and close buttons are bound to the frame decoration used.
If you are using a frame decorated by system (for example some Aero frame in Windows 7) - you cannot modify those buttons since the whole frame decoration is provided by system and there is no good way to invtervene and change its behavior.
On the other hand - if you are using a custom Look and Feel (shorty - L&F) written on Java and it provides its own frame decoration - it is possible to modify it if you have access to that L&F sources or if that L&F provides some options to add/remove those buttons.
You can read more about L&F here:
http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel
You can also find a lot of links to custom L&Fs here:
Java Look and Feel (L&F)

- 1
- 1

- 10,083
- 37
- 59
- Start with
JFrame.setDefaultLookAndFeelDecorated(true)
. - Then set the Pluggable Look and Feel.
For best results, this is most reliably done before the first GUI element is visible on screen.
See How to Make Frames - Specifying Window Decorations for more info.

- 168,117
- 40
- 217
- 433
As far as I know, you cannot, but if this is something you need to have done, you can use Netbeans to use JavaFX, which allows you to fully customize the window, including the buttons like that. The window doesnt even need to have these buttons.

- 41
- 3