Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calling a JPanel page

 
pankaj saxena
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have one JFrame that has one JButton and JMenuItem. And another page that extends JPanel.

Question:
Can i call a JPanel page from a click on JButton?
Can i call a JPanel page from a click on JMenuItem?
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pankaj saxena wrote:
Can i call a JPanel page from a click on JButton?
Can i call a JPanel page from a click on JMenuItem?


What do you mean by "call a JPanel page"? Details mean everything.
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pankaj saxena wrote:And another page that extends JPanel.

Page?

pankaj saxena wrote:
Question:
Can i call a JPanel page from a click on JButton?
Can i call a JPanel page from a click on JMenuItem?


If you meant this to be- making the JPanel visible on the click of a JButton or JMenuItem- You can initially set the JPanel to visible as False. And in the actionPerformed method you can set the visibility to True.

If you can provide details as asked by Pete, it will help you get quicker and correct response
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic