Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JForm and JPanel

854171Jul 9 2011 — edited Jul 9 2011
Hi to all, i am a newbie of swing and netbeans
i have this problem, i create a form, in this form i add a menu, in this menu i add a menuItem;
later i create a jpane (in neatbean i use new ->Jpanel Form )l, i add to this jpanel a button and a label .
i write this action for menuItem, i want that when i cliccked menuItem i see the panel
 
//this code present in Jform 
......
import javax.swing.JPanel;     //import jpanel
.....


@Action
    public void showPanel() {
    
  Panel1 panel = new Panel();
 panel.setVisible(true);

 }


 private JPanel panel;
 
 
but dont' work, i dont' have error but i don't see noting

can you help me?
best regads
A.

Edited by: De Curtis on 8-lug-2011 22.32
This post has been answered by StanislavL on Jul 9 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2011
Added on Jul 9 2011
3 comments
196 views