Swing: add help button [?] To window title bar

I want to add a new button with a question mark icon to the left of the maximize, hide, and close buttons. how to do it (as in the picture)? enter image description here

+5
source share
2 answers

You need to create a custom RootPane / TitleBar.

That means you need to set the JFrame to unecorated and then set your own instance, which extends RootPane to your JFrame

0
source

It is difficult to change your own title bar because it comes from the operating system. But you can remove your own header line setUndecorated(true); and create your own title bar. See a simple tutorial here

OR

You can see another way in substance in style

0
source

Source: https://habr.com/ru/post/1208466/


All Articles