This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Hey, I'm trying to make my program use only one JFrame instead of popping up new windows everytime it changes the screen. To do this I made a control class that would load the JPanel, wait until the JPanel finished what it had to do, then would remove it and place the next JPanel on the screen. Well, my JPanels don't seem to like that as when I try to remove the one JPanel, it simply keeps the button it clicked pressed down and no longer works. If this is not possible, is there a way I can command my JFrame to close? Here's the methods code. Note: It loads up the MainMenu class, and then the user clicks the button newGame. This is the point where it locks up. Is there a problem in my ActionPerformed class?
Doesn't look like you give juan any action listeners. Doesn't that mean it can't respond to any actions? Have you looked at card layout? I haven't used it, but I think it's intended for the kind of panel swapping you're doing.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Joined: Jun 19, 2003
nm, I got it to work... thanks a lot for the suggestion! [ July 10, 2003: Message edited by: Matt Fyffe ]