• Post Reply Bookmark Topic Watch Topic
  • New Topic

Start menu with GUI

 
Aiden daly
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry if this has been discussed elsewhere, but I have been working on a project and I (obviously) need help. I was wondering how one would make a JButton that would call a different class. I can make a window with 2 buttons, but I am not sure what to put in the ActionListener to call the new class. The other button is a quit button that works fine.
 
Greg Brannon
Bartender
Posts: 563
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is an incredibly simple answer where the JButton's action listener simply contains the code:

new OtherClass();

but I suspect you would have already thought of that, so there must be more to your question.

Please provide the additional details needed to understand what you're really asking or trying to do.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!