Perry Smith

Java Questions & Answers

Archive

Home / Java Q & A Archive Page 4 / Java Q & A Archive / Java Main Page

A decent dialog window ?
Wednesday, 03-Mar-99 11:57:20

194.206.56.241 writes:

I try to make a modal window box (something like "COntinue ?" + YES button + NO button) but : JDialog : can be set to modal but has a "X" closing button that I was unable to remove. JFrame or JInternalFrame : can be set to be not closable but I was unable to set it modal.

Any idea ?

NJXT


Response
Re: A decent dialog window ?
Wednesday, 03-Mar-99 12:56:32

24.1.16.214 writes:

here's a really _lame_ idea...

what if upon receiving a 'windowClosed' event, you just open up that same modal dialog again?

"close it all you want, we'll make more"

-calyxa


Re: Re: A decent dialog window ?
Thursday, 04-Mar-99 03:26:00

194.206.56.241 writes:

And how do I REALLY close it when work is done ?

NJXT


Re: Re: Re: A decent dialog window ?
Thursday, 04-Mar-99 22:38:39

171.211.118.118 writes:

What's the problem? If you don't want the close feature, then don't write one in. I haven't really used Swing, but it seems that the close button shouldn't be a problem. If calyxa's suggestion would work, then writing a blank windowClosing() event should work even better. Then you could .hide(), and .dispose() of the window whenever some conditions are met, i.e. a file is selected and the "Open" button is clicked.

MikeD


My apologies
Wednesday, 10-Mar-99 13:59:36

152.206.123.160 writes:

Hmmm .... my last post seemed rather "gruff." :-) It rubbed me the wrong way, and I'm the one who wrote it. Apologies to the original poster, if any offense was taken; none was intended. Just ignore me sometimes people ...

MikeD


Re: My apologies
Thursday, 11-Mar-99 06:12:27

194.206.56.241 writes:

No problem :) I try to override the WindowClosing (with an empty one) but when clicking on the "X" button, it still closes the window.

NJXT


Re: Re: My apologies
Sunday, 14-Mar-99 02:36:02

205.188.193.174 writes:

Somehow a functional WindowListener has been attached to your Window. It might even be that your Java developing enviornment tacks one on automatically for you. But Windows do not close by themselves in Java; that functionality has to be specifically coded-in. Check your other listeners: mouse, key, button, etc. for a WindowClosing() method.

MikeD


Ooops... I was utterly wrong
Tuesday, 16-Mar-99 23:58:27

152.202.119.246 writes:

FileDialogs have a close event written in. Sorry. But they don't work very well, in any case. Peace.

MikeD


Re: Ooops... I was utterly wrong
Thursday, 18-Mar-99 05:59:44

194.206.56.241 writes:

Ok, thank you for all that stuff :) I'll try.

NJXT


Re: Re: Re: A decent dialog window ?
Friday, 05-Mar-99 23:59:55

24.1.16.214 writes:

like MikeD says, .dispose() it yourself upon getting the event from the OK button.

-calyxa


Home / Java Q & A Archive Page 4 / Java Q & A Archive / Java Main Page