S
Sam Takoy
Hi,
The following code doesn't compile with the error:
"No enclosing instance of the type JPanel is accessible in scope"
but isn't my class a JPanel?
Many thanks in advance!
Sam
import java.awt.event.*;
import javax.swing.JPanel;
public class MyClass extends JPanel {
public class MyMouseLisetener extends MouseAdapter {
public void mouseClicked(MouseEvent e) {
JPanel.this.revalidate();
}
}
}
The following code doesn't compile with the error:
"No enclosing instance of the type JPanel is accessible in scope"
but isn't my class a JPanel?
Many thanks in advance!
Sam
import java.awt.event.*;
import javax.swing.JPanel;
public class MyClass extends JPanel {
public class MyMouseLisetener extends MouseAdapter {
public void mouseClicked(MouseEvent e) {
JPanel.this.revalidate();
}
}
}