JDialog setResizable(false) is not working in Window Title Bar Menu

Posted by jolonaleur on Stack Overflow See other posts from Stack Overflow or by jolonaleur
Published on 2009-03-19T09:15:21Z Indexed on 2010/04/13 5:02 UTC
Read the original article Hit count: 248

Filed under:

JDialog setResizable(false) is not working in Window Title Bar Menu

Windows XP SP2 Java JRE 1.6.0_11-b03

Behavior varies. Sometimes, the Maximize and Minimize item on the window menu is disabled and sometimes enabled.

Steps to reproduce enabled Maximize and Minimize button:

  1. Show the JDialog with setResizable(false)
  2. Open another window, say for example Notepad.
  3. Right-click on the window title bar of Notepad and click Maximize.
  4. Go to your JDialog and right click on the window title bar. Maximize window is enabled.

Likewise, to disable the Maximize item for the JDialog, go to the maximized Notepad window and right click on title bar. Maximize item is disabled in the Notepad window. Go the your JDialog and right click on the title bar, notice that the Maximize item is also disabled.

Note that my application can not use the defaultLookAndFeel method of java dialogs. The bug report related to this was for Solaris OS but that was already ages ago. bug report

Is there any workaround?

Thanks.

© Stack Overflow or respective owner

Related posts about java