Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

GUI - Button opens new file from new location  RSS feed

 
Stefan eduard
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hy guys. any idea how can i make GUI in java with buttons, so by pressing one button will open another java GUI file?
Screen 1 - gui.JPG
[Thumbnail for Screen 1 - gui.JPG]
first screen with the option to go to other 2 pages.
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

What have you tried so far and where are you stuck? Have you read the Swing tutorial: http://docs.oracle.com/javase/tutorial/uiswing/ ?
 
Stefan eduard
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got it

had to add
private void clientActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Client p=new Client();
p.setVisible(true);

and

private void productActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Products p=new Products();
p.setVisible(true);

 
Tony Docherty
Bartender
Posts: 3200
78
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done for working it out for yourself and thanks for posting the solution.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!