Question

I have one JFrame and in that I have 10 JLabel which will open new JFrame. that JFrame is Same that will open in 10 label but how to Disable that root JFrame when the Another JFrame is open and Enable that Root JFrame when that new frame is Closed? Can I have your Suggestion please.

Was it helpful?

Solution

Don't use multiple JFrames. An application should only have a single JFrame.

For secondary windows you should use a modal JDialog. A modal JDialog will not allow you to click on the parent JFrema until the dialog is closed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top