Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to remove a close button from the title bar of a window?



Hello,

I have a JDialog which is opened as modal.
I need the title bar to display something and enable the user to move the window around. I also want to allow resizing.
However, I don't want to allors closing with the close button, but only from a JButton I implemented.

In the constructor I do:

setUndecorated(false);
getRootPane().setWindowDecorationStyle(JRootPane.NONE);

The problem is that if I use setUndecorated(true), I also loose the title bar, the resizing and moving capability.

I found nowhere a setting which would say something like:

isCloseButtonEnabled(false) for example.

Thanks,

Alex
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.