Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Rubik's Cube switch between branches

 
Zoltan Molnar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

Post the full exception stack trace. Also tell us in which line of code it happens, and which object is null.
 
Zoltan Molnar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic