General discussion

Locked

Java

By shankar ·
Hi all,
I have a Custom Window which is derived from JWindow , and from that window i am displaying another window(second window) which is also derived from JWindow in an action Event..How to make the second Window behave like a modal dialog
(all the inputs to the parent window must be stopped i.e the parent window must not execute further , only after getting the response from the second window the first window must proceed...) i am in a situation that i must not use a Dialog derived from JDialog...

This conversation is currently closed to new comments.

8 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Java

by Duong beo In reply to Java

As far as I have concerned, the normal way is to derive the form from JDialog. All other class don't support the function as you are looking for.

One alternative solution is create a new class derive from JWindow and partly immitate the JDialog class but it may cause you a lot of thing to do, I don't know exactly. Can you give out the reason that makes you must not use a Dialog so we may find an other way?

Duong beo

Collapse -

Java

by shankar In reply to Java

The question was auto-closed by TechRepublic

Collapse -

Java

by shankar In reply to Java

the reason why i cant use a jdialog is , i dont want the title bar and want it painted my self

Collapse -

Java

by okujava In reply to Java

Hi,

u should call setEnabled(false) for your MainWindow object from the subWindow object as soon as subWindow is visible. then, when u close the subWindow, u should call setEnabled(true). notice, show() and setVisible() call setEnabled(true) automatically (i.e. u should call setEnabled(false) after the call of show()).

regards

Collapse -

Java

by shankar In reply to Java

The question was auto-closed by TechRepublic

Collapse -

Java

by Cedric King In reply to Java

Actually I wants to do what you are doing and I don't mind if it is a JDialog. The problem is that I can't really make it modal. Somehow I can manage to get access to the parent window and then be able to create another "About" window, which means Ican create lots of MODAL "About" window. Why?

Collapse -

Java

by shankar In reply to Java

The question was auto-closed by TechRepublic

Collapse -

Java

by shankar In reply to Java

This question was auto closed due to inactivity

Back to Web Development Forum
8 total posts (Page 1 of 1)  

Related Discussions

Related Forums