I have an outer class. I also have a private inner class that extends JPanel. This is the code of the code.
public class Outer{
private class Inner extends JPanel{
public void doSomeWork(){}
}
public Outer(){
Inner inner = new Inner();
inner.doSomeWork();
}
public static void main(String args[]){
Outer outer = new Outer();
}
}
I cannot access the doSomeWork () method of the inner class from the outer class. Please help.
source
share