Disable JFrame when a new JFrame is opened

Captain Gh0st picture Captain Gh0st · Mar 9, 2012 · Viewed 15.5k times · Source

I am trying to disable the "main" JFrame when the new frame pops up. I want it so you can not click or drag anything on that frame. I tried making the new frame a JDialog, but that did not disable the other frame. I also looked at the other post about this, which suggested to make it a JDialog but it still does not work. I really need help doing this please. thanks. This is the codeIi am using to make the JDialog, is their any problems with it?

editDialog=new JDialog(IntroScreen.frame);

IntroScreen.frame represents the "main" frame.

Answer