• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Rubik's Cube switch between branches  RSS feed

 
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!
 
Rancher
Posts: 42975
76
  • 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
Boost this thread!