Search code examples
javaswingbuttonjframe

How to disable iconified button in Menu bar in JFrame Window?


How to disable iconified button in JFrame Window ? something like setResizable, but for minimize button


Solution

  • At First, you can use the method setUndecorated(boolean). It may disable the title bar and the border.

    In the end, you will create the icon label and close button at your frame top or the others position.

    But this way will lose the border look and feel for the frame. If you choose this way, you must create a lot of code.

    In fact, If you could not use JNI, this way may be the only.