Suppose I have this:
class external {
JFrame myFrame;
...
class internal implements ActionListener {
public void actionPerformed(ActionEvent e) {
...
myFrame.setContentPane(this.createContentPane());
}
}
...
}
createContentPanereturns the container. Now, if I were to do this code outside ActionListener, it would work because I would have access to it. But inside this is not. I have access to myFramethat will be updated with the contents of the method, but this is not enough to do what I want, unless I can get it from it.
I also need information from other instance variables to use createContentPane(), so I'm not sure I can do this static.
billy rygar
source
share