|
Your pullHandle() method is using the variables column1, 2, 3 but nowhere do you initialize them, hence the NullPointerException. As to the static/nonstatic problem, you need to create instances of all your classes and call methods on those instances.
Try reading through some of these tutorials[^] to get a better grasp of how classes operate.
MVP 2010 - are they mad?
|
|
|
|
|
Did I not initialize them in the collumn class and then call them in the slot class?
|
|
|
|
|
bmnot wrote: Did I not initialize them in the collumn class and then call them in the slot class?
Not that I could see, although it was not easy given that you posted your code in three separate places. Try to post the entire code in your original message (use the edit link), and don't forget to enclose it in <pre></pre> tags (use the "code block" button).
I think in your slot class you have a statement like Column column1, column2, column3; which creates the three variables but does not initialise them to anything.MVP 2010 - are they mad?
|
|
|
|
|
i called a method from a different class on them(.newface), does that not initialise them?
|
|
|
|
|
bmnot wrote: i called a method from a different class on them(.newface), does that not initialise them?
Since I have no idea what that code does, I cannot answer the question. Your comments suggest you need to spend some time rereading your Java manual on classes, objects and their use.MVP 2010 - are they mad?
|
|
|
|
|
no, this does not modify the value as the newFace() method does not return a value and/or modify any given value.
try to set the values like this:
Column column1=0;
Column column2=0;
Column column3=0;
It's alwasy good to not have uninitilzed values, give'em at least some "empty" value.
Also always include getter and (if needed or might be needed in future) setter:
public int getColumn1(){
return column1;
}
public void setColumn1(int _column1){
column1 = _column1;
}
do you know how to debug your code?
greets
TorstenI never finish anyth...
|
|
|
|
|
Hello Friends
I created a 3d viewer.I loaded one object tht is centerd at some other than (0,0,0) but MouseRotate is rotating around only(0,0,0).
Is there any way to change the center of Rotation?
Or any way to change the center of object to worldCordinate(0,0,0)?
Thanks IN Advance.
Regards
Yogesh
|
|
|
|
|
No Body Replied.
But it helps me to find myself.We can do it with OrbitBehaviour class method that is setRotationCenter().
AnyWay,Thanks who viewed my Thread().
But now i am having one more question,if u guys can help me in this.I am having one point3d() that is the center of object.I want to convert it into WorldCordinates.
I read abt getLocaltoVWorld().But it return Transform3d() and I am having my local points in Point3d().Please Advice me Something.
Thanks In Advance.
Regards
Yogesh
|
|
|
|
|
yogeshs wrote: No Body Replied.
That suggests to me that nobody knows the answer. You may find that the CodeProject expert on Java3D is someone called Yogesh. MVP 2010 - are they mad?
|
|
|
|
|
|
|
Sorry but the laugh was on Java3D not directed to you at all.
|
|
|
|
|
can u help me out in my another question?
Do u have any Ideas?
|
|
|
|
|
yogeshs wrote: Do u have any Ideas?
None at all, I'm afraid. As I said above, it looks like you are the only person here with any experience of this.MVP 2010 - are they mad?
|
|
|
|
|
Now u r indirectly making joke on me Dear.
I am new to java3d sir ji.I am a c++ programmer,u can see my posts on c++ message Board.
Anyway,thks for ur Help.
Regards
Yogesh
|
|
|
|
|
yogeshs wrote: Now u r indirectly making joke on me Dear.
Not at all, I am being serious. I understand that you are new to Java3D, but as you can see, there is no-one here who has the answer to your questions. As you solve each problem you gain in knowledge so that you now have more knowledge than anyone else who reads this forum.MVP 2010 - are they mad?
|
|
|
|
|
Thank You Sir.
Regards
Yogesh
|
|
|
|
|
how to get the version of some particular software using java code? is there any possible.... please help me...
|
|
|
|
|
I don't know of any way to do this directly in Java (assuming you are talking of Windows applications), but you could use the JNA[^] to access the version information.
MVP 2010 - are they mad?
|
|
|
|
|
hello sir
I m new in java , today when first time in new program import acm.grPHICS
in eclipse in left X sign is shown
(jar file not find....)
|
|
|
|
|
code_breaker wrote: jar file not find.
You need to find it and add it to eclipse. Take a look here[^] for some hints.
MVP 2010 - are they mad?
|
|
|
|
|
hello Friends
I am creating a scene and then i checked its bounds using getBounds() method.Then i use setBounds() method on tht to set new bounds and after that when again i get its bound then it shows its older bound not the new one tht i set.
How can i change the bounds of a scene?
Actually I am trying to move the object to some other location so i am changing its bounds.If i am right bounds wil give you its position(m beginner to java3d).Plz tell me.
Give your Ideas?
Thanks & Regards
Yogesh Sikri
|
|
|
|
|
Now I am bit clear so here is new question.I am having branchGroup tht contains around 7 or 8 objects.and each of these objects have different bounds.When I add them to BranchGroup and when I check the bounds of branchGroup tht are not (0,0,0) that should be.
Is any way to change bounds(or center of branchGroup or center of object) to (0,0,0)?
Plz give me some Ideas??
Regards
Yogesh Sikri
modified on Thursday, February 4, 2010 1:58 AM
|
|
|
|
|
Hello Friends
I am creating a viewer using java3d and previously i was using ambient light and two directional lights.But I want to use now spot lights.Now ,after using spot lights,I commented directional lights then the object is coming black but if object has some texture on some part then texture is showing but other part of object is black.
And If i use both direction light and spot light then object is coming right bur no effects of spot light.
Give me some Ideas how to use spot lights ? Do we need to use with directional or some other combination.
Thanks In Advance.
Yogesh Sikri
|
|
|
|
|
This article explains about Lights[^]
|
|
|
|