If I have the code essentially looking like this:
public class TestTriangleType {
public static void GenerateRandomTriangles(int numTriangles){
//code
}
public String TriangleType(Point a, Point b, Point c){
//code
}
private void TestTriangle(){
//code
}
public class BasicGraphics extends JFrame{
public BasicGraphics(){
//code
}
class WindowCloser extends WindowAdapter{
//code
}
private void Run(){
//code
}
private void DrawFixedObjects(){
//code
}
private void DrawTriangle(){
//code
}
public void paint(Graphics g){
//code
}
}
public static void main(String[] args) {
TestTriangleType.GenerateRandomTriangles(1);
TestTriangleType test = new TestTriangleType();
test.TestTriangle();
TestTriangleType.BasicGraphics bg = new TestTriangleType().new BasicGraphics();
bg.BasicGraphics();
}
My error comes from the bg.BasicGraphics
Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - Erroneous sym type: testtriangletype.TestTriangleType.BasicGraphics.BasicGraphics
at testtriangletype.TestTriangleType.main(TestTriangleType.java:137)
I've have done some reading up on how its supposed to work but I'm still slightly confused as to how to properly use the inner class in the main method, anyone able to help me with this?

New Topic/Question
Reply



MultiQuote





|