5

I want to add the new button with an icon of a question mark to the left of buttons "maximize", "hide" and "close". how to make it (like in a pic)? enter image description here

MightyPork
  • 18,270
  • 10
  • 79
  • 133
Denis
  • 503
  • 8
  • 32
  • I don't think it is possible in Swing. Not sure about other toolkits, but I doubt it. – MightyPork Dec 05 '14 at 21:42
  • 1
    Welcome to what is probably amongst one of the most requested features for Swing. No, you can't do it. You "might" be able to use JNI/JNA solution, but that's a lot of work and you'd need to consider the need to provide cross platform support – MadProgrammer Dec 05 '14 at 22:43

2 Answers2

0

You need to create a custom RootPane/TitleBar.

This means you need to set your JFrame to undecorated and then set your custom instance of what extends RootPane to your JFrame

Dinh
  • 759
  • 5
  • 16
0

It is hard to change native Title bar, because it is originating from the operating system. But you can remove native Title-bar setUndecorated(true); and create your own Title-bar , See simple tutorial here

OR

You can see an another way in Substance look-and-feel

Akila
  • 1,258
  • 2
  • 16
  • 25