fatcodeguy
Programmer
Hi, I have a JPanel with some widgets on it, which is suppose to open when I press a button. this is what my action listener looks like
button.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
myFrame.getContentPane().add(new myJPanel(myFrame));
}
});
The panel calls myFrame because it needs some of the objects defined in the owner pane.
Putting aside that the layout will be messed, I have setVisible(true) in the panel constructor, but I still can't see it when it constructs. Any suggestions? thanks
button.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
myFrame.getContentPane().add(new myJPanel(myFrame));
}
});
The panel calls myFrame because it needs some of the objects defined in the owner pane.
Putting aside that the layout will be messed, I have setVisible(true) in the panel constructor, but I still can't see it when it constructs. Any suggestions? thanks