File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes calling a JPanel page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "calling a JPanel page" Watch "calling a JPanel page" New topic
Author

calling a JPanel page

pankaj saxena
Ranch Hand

Joined: Nov 21, 2009
Posts: 46
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

Joined: Feb 23, 2007
Posts: 1561
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

Joined: Sep 08, 2007
Posts: 3071
    
  33

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


Mohamed Sanaulla | My Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: calling a JPanel page