On windows, i don't see a maximum button on my JDialogs and this is fine, but on a Mac I have this dialog that people can keep up and use other windows, but you can also maximize a dialog on a mac apparently. There is a maximum button. At a point in the program I need to know if the dialog is maximized or not. I tried isMaximumSizeSet() seeing if it was true ( this inherited from JComponent), but my routine still executes which means to me it's not the right call for this. How do i tell if the dialog is maximized on a mac.

My code is

  { myfirstlist.notontop.setSelected(true);

It should return and not run the code, but it acts like it can't tell the user has maximized it.

This is all working with similar code, when the window is a JInternalFrame. There is have same code just about but use isMaximum(). But that method is for JInternalFrame.


I found some more info. the green maximize button on a JDialog is not a maximum button but an Optimize Size button I'm reading. I still can't find how to disable it or control it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.