Hi
all
I have a Stack
overflow, but I don't now why!
Can somebody help
me?
I think it has
something to do with the mangenta line in the Code!
.java.lang.StackOverflowError
at
java.lang.ref.Finalizer.<init>(Finalizer.java:70)
at
java.lang.ref.Finalizer.register(Finalizer.java:75)
at
rubiccube3d.RubicCube3D.<init>(RubicCube3D.java:64)
at
rubiccube3d.Select9CubesAndRotate.<init>(Select9CubesAndRotate.java:22)
at
rubiccube3d.RubicCube3D.<init>(RubicCube3D.java:64)
at
rubiccube3d.Select9CubesAndRotate.<init>(Select9CubesAndRotate.java:22)
at
rubiccube3d.RubicCube3D.<init>(RubicCube3D.java:64)
at
rubiccube3d.Select9CubesAndRotate.<init>(Select9CubesAndRotate.java:22)
at
rubiccube3d.RubicCube3D.<init>(RubicCube3D.java:64)
at
rubiccube3d.Select9CubesAndRotate.<init>(Select9CubesAndRotate.java:22)
at
rubiccube3d.RubicCube3D.<init>(RubicCube3D.java:64)
My
Code:
public
class RubicCube3D extends JFrame implements KeyListener {
// most high node of a Java3D
scene
private static Locale locale;
private static TransformGroup mainTG = new TransformGroup();
private final static BoundingSphere boundingSphere = new BoundingSphere(new Point3d(0.0,0.0,0.0),100.0);
private static Locale locale;
private static TransformGroup mainTG = new TransformGroup();
private final static BoundingSphere boundingSphere = new BoundingSphere(new Point3d(0.0,0.0,0.0),100.0);
// Array containing all 3*3*3
Cubes
public static CleverSubCube[][][] cleverSubCube = new CleverSubCube[3][3][3];
public static CleverSubCube[][][] cleverSubCube = new CleverSubCube[3][3][3];
Select9CubesAndRotate s = new
Select9CubesAndRotate();
/**
* main function (called at start of this Java Application)
*/
public static void main(String[] args) {
RubicCube3D window = new
RubicCube3D();
window.setTitle("Rubic's Cube
3D");
window.setIconImage(Toolkit.getDefaultToolkit().getImage(RubicCube3D.class.getResource(WINDOW_ICON)));
window.setSize(600, 500);
window.setLocation(200,100);
window.setVisible(true);
System.out.println("...OK");
window.setIconImage(Toolkit.getDefaultToolkit().getImage(RubicCube3D.class.getResource(WINDOW_ICON)));
window.setSize(600, 500);
window.setLocation(200,100);
window.setVisible(true);
System.out.println("...OK");
} // end of main
(method of RubicCube3D)
/**
* Constructor for the main class RubicCube3D
*/
public RubicCube3D() {
* Constructor for the main class RubicCube3D
*/
public RubicCube3D() {
.....
} // end of
RubicCube3D (constructor)
/**
* Create the whole Scene Graph
*/
public BranchGroup createSceneGraph(Canvas3D canvas3D) {
.....
} // end of
CreateSceneGraph method of RubicCube3D
/**
* Create the whole View Graph
*/
public BranchGroup createViewGraph(Canvas3D canvas3D) {
...
} // end of
CreateViewGraph method of RubicCube3D
private void jbInit() throws Exception {
.....
}
}
/**
* handles the events generated by pressing a key
*/
public void keyPressed(KeyEvent e){
System.out.println("keyPressed " + e);
}
/**
* handles the events generated by typing a key
*/
public void keyTyped(KeyEvent e) {
System.out.println("keyTyped " + e);
}
* handles the events generated by typing a key
*/
public void keyTyped(KeyEvent e) {
System.out.println("keyTyped " + e);
}
/**
* handles the events generated by releasing a key
*/
public void keyReleased(KeyEvent e){
System.out.println("keyReleased " + e);
}
* handles the events generated by releasing a key
*/
public void keyReleased(KeyEvent e){
System.out.println("keyReleased " + e);
}
} // end of class
RubicCube3D
Patrik
E-mail mailto: [EMAIL PROTECTED]
