This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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: 39

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



BM
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37937
    
  22
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to go to another JFrame by pressing JButton in this code?
 
Similar Threads
Getting sql error [Microsoft ][odbc microsoft access driver]numeric index out of range
Problem while using prepared statement
erropr
why its not running or how to run it
Login page