0

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.

3 Answers3

3

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)

Community
  • 1
  • 1
Mikle Garin
  • 10,083
  • 37
  • 59
2
  1. Start with JFrame.setDefaultLookAndFeelDecorated(true).
  2. 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.

enter image description here Metal Decorations

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
-3

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.

tycoon177
  • 41
  • 3