question .....please help me

question.

i have a JFrame (WarningFrame) and i want it to be active until the user do some operation(some feedback).

when the frame is active i want NO Other operation on other Frame. such as mouse click make beep.

i hope i explain the problem clearly ..

help me

pls

thanks in advanced.

[340 byte] By [nikomeng] at [2007-9-27 4:19:05]
# 1
Use a JDialog and make it modal. Also take a look at JOptionPane.
abnormal at 2007-7-5 3:54:23 > top of Java-index,Archived Forums,Java Programming...
# 2
yes i have think i use JDialog but it seems that modal is more diffcult.can these function be done using JFrame. > Use a JDialog and make it modal. Also take a look at> JOptionPane.
nikomeng at 2007-7-5 3:54:23 > top of Java-index,Archived Forums,Java Programming...
# 3
i juse make JDialog dialog then dialog.getContentPane().add( myPanel );myPanel is the panel i make to add in the WarningFramethis will be ok ?
nikomeng at 2007-7-5 3:54:23 > top of Java-index,Archived Forums,Java Programming...
# 4
i make a JDialog and it is true it always OVER the other frames. and do not dispare when i click other frame.but i still can make some operation on the others frame ...why ?thanks in advanced
nikomeng at 2007-7-5 3:54:23 > top of Java-index,Archived Forums,Java Programming...
# 5

Ok, you have more than one frame and when you make your dialog, it is only modal on one frame.

Not sure how to make a workaround for that. That would proably require that when another frame got the focus, it should check if any of the frames has a modal dialog visible, and if that is the case, it should move the dialog to the front (dialog.toFront()).

abnormal at 2007-7-5 3:54:23 > top of Java-index,Archived Forums,Java Programming...