I have a MyApplet class (extend Applet). In it, I declare 1 [B]instance variables
and I have a button. I want then I clicked this button, a frame showed.
[I](I declared MyFrame class extend Frame)
My frame have 1 textfield and 1 button. I want then I clicked this button, value of variable x (in class MyApplet) show in textfield.
I tried created a method as getx() in MyApplet class:
[CODE]public double getx() {
return x;
}
Then at MyFrame class, I tried to use x , but program show 1 error ( cannot find symbol x).
– None stop, I tried to declare a new object have type MyApplet
(MyApplet obj = new MyApplet) then use obj.getx() to take value of x variable. But result returned is 0.0 ?
How do I must to take value of x variable from MyApplet class ?
help me ?