Forums Register Login
JOptionPane HELP!! : On How To Disable The 'x' Close Buttton On showOptionDialog.
Hi, I'm currently doing my java assignment and i need to use the jOptionPane to warn my users on some message and would like them to only select my two options only 'yes' and 'no' and I don't want my users to click on the close 'x' button to escape from my message for my jOptionPane. Can anyone help and if so any example i can refer to? Thank you..!
It has something to do with setDecorated(false), or something similar. I think you should to do a search for "disable close button" or similar, because there is about one thread a year on that sort of subject.
Or disable the closing, by setting the default close operation to Frame.DO_NOTHING_ON_CLOSE. You may also need to remove one or more WindowListeners.
Everybody's invited. Except this tiny ad:
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter

This thread has been viewed 2421 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 18, 2018 19:25:44.