aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Rubik's Cube switch between branches Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Rubik Watch "Rubik New topic
Author

Rubik's Cube switch between branches

Zoltan Molnar
Greenhorn

Joined: May 12, 2014
Posts: 2
Hi Everyone!

Could you help me a little?

I try to build a Rubik's Cube. Now I have 2 branches 1 for horizontal and 1 for vertical rotation. Is it possible to switch between them? I tried it but I get a nullpointerexception..

Please somebody help me!

the code is the following:


Thank you in advance!

Best wishes!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42286
    
  64
Welcome to JavaRanch.

Post the full exception stack trace. Also tell us in which line of code it happens, and which object is null.


Ping & DNS - my free Android networking tools app
Zoltan Molnar
Greenhorn

Joined: May 12, 2014
Posts: 2
Ulf Dittmer wrote:Welcome to JavaRanch.

Post the full exception stack trace. Also tell us in which line of code it happens, and which object is null.


Hi! I appreciate your greeting!

So, could you tell me what is exception track trace?

I tried to modify like this:



And it has a problem with this method:


But then it throws an exception:

Exception in thread "main" java.lang.NullPointerException
at elte.java2_utikalauz5.java3d.RasterDemo.enablePicking(RasterDemo.java:539)
at elte.java2_utikalauz5.java3d.RasterDemo.enablePicking(RasterDemo.java:549)
at elte.java2_utikalauz5.java3d.RasterDemo.enablePicking(RasterDemo.java:549)
at elte.java2_utikalauz5.java3d.RasterDemo.enablePicking(RasterDemo.java:549)
at elte.java2_utikalauz5.java3d.RasterDemo.createSceneGraphVertical(RasterDemo.java:531)
at elte.java2_utikalauz5.java3d.RasterDemo.<init>(RasterDemo.java:76)
at elte.java2_utikalauz5.java3d.RasterDemo.main(RasterDemo.java:60)

Or am I think it too complicated? Is there easier method?

Thank you for your help in advance!

Best wishes!
 
jQuery in Action, 2nd edition
 
subject: Rubik's Cube switch between branches