This week's giveaway is in the Groovy forum.
We're giving away four copies of Groovy Fundamentals video training course and have Ken Kousen on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How to go to another JFrame by pressing JButton in this code? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to go to another JFrame by pressing JButton in this code?" Watch "How to go to another JFrame by pressing JButton in this code?" New topic
Author

How to go to another JFrame by pressing JButton in this code?

lolo hyun
Greenhorn

Joined: Oct 24, 2012
Posts: 1
Buddhika Mawella
Ranch Hand

Joined: Jan 06, 2011
Posts: 40

Run following code and check. Hope that is the functionality you want.



BM
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 42698
    
  32
Welcome to the Ranch
Why do you want a second frame in the first place? You should use internal frames, or dialogues, and should only have one frame per application.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to go to another JFrame by pressing JButton in this code?