How to make a modal window


C

clusardi2k

I have a LARGE project that creates a JFrame inside another one. How do I make the second one that comes up a modal window. I.E.: You I don't want to do anything without first doing what the second JFrames requests you to do (click button).

I created this project using NetBeans and right clicking on the project and creating two new JFrame forms.

I put a button on both JFrames.

In Design View, I see the two frames. When I run the project, the first creates the second JFrame.

A little code would also be nice to see.

Thank you,
 
Ad

Advertisements

E

Eric Sosman

I have a LARGE project that creates a JFrame inside another one. How do I make the second one that comes up a modal window. I.E.: You I don't want to do anything without first doing what the second JFrames requests you to do (click button).

I created this project using NetBeans and right clicking on the project and creating two new JFrame forms.

I put a button on both JFrames.

In Design View, I see the two frames. When I run the project, the first creates the second JFrame.

A little code would also be nice to see.

http://docs.oracle.com/javase/tutorial/uiswing/components/dialog.html
 
Ad

Advertisements


Top