0

Hi all, my problem is that i want to block my main frame when i call a JDialog! i try several things but cant! I use this to call the JDialog

public void showAboutBox() {
        if (info == null) {
            
            info = new Informacion(this);//call my jDialog
            info.setLocationRelativeTo(this);
        }
        info.setVisible(true);
    }

but i need to block the main frame until the user close the dialog !
any help?

2
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by Dean_Grobler
0

By saying you want to 'block it' do you mean you want to disable all the buttons, textboxes etc in your mainFrame or do you just want to make it invisible?

0

what i mean is that, if the user click the mainframe dont let him to use anything , only the jdialog until he close that window!

0

i finally made it! after 5 hours -.-! the constructor of the jDialog has to be like this

public NewJDialog(JFrame frame, boolean modal) {
        super(frame, modal);
        initComponents();
    }

what i needed was the boolean parameter! but i dont get why!

Edited by skylight25: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.