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,
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top