How to make a modal window

Discussion in 'Java' started by clusardi2k@aol.com, Aug 24, 2012.

  1. Guest

    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,
    , Aug 24, 2012
    #1
    1. Advertising

  2. Eric Sosman Guest

    On 8/24/2012 5:19 PM, wrote:
    > 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


    --
    Eric Sosman
    d
    Eric Sosman, Aug 24, 2012
    #2
    1. Advertising

  3. Roedy Green Guest

    On Fri, 24 Aug 2012 14:19:50 -0700 (PDT), wrote,
    quoted or indirectly quoted someone who said :

    >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).

    Modal Windows are called JDialogs.

    See http://mindprod.com/jgloss/jdialog.html
    --
    Roedy Green Canadian Mind Products http://mindprod.com
    A new scientific truth does not triumph by convincing its opponents and making them see the light,
    but rather because its opponents eventually die, and a new generation grows up that is familiar with it.
    ~ Max Planck 1858-04-23 1947-10-04
    Roedy Green, Aug 24, 2012
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Leila
    Replies:
    0
    Views:
    406
    Leila
    Apr 26, 2005
  2. Matt
    Replies:
    1
    Views:
    3,143
    Whitecrest
    Jun 1, 2004
  3. Don
    Replies:
    0
    Views:
    351
  4. Matt
    Replies:
    0
    Views:
    218
  5. gopal srinivasan
    Replies:
    0
    Views:
    232
    gopal srinivasan
    Nov 5, 2004
Loading...

Share This Page