| Author |
How to change attribute value of one class from second class
|
Vishnu Sharma
Ranch Hand
Joined: Feb 03, 2010
Posts: 55
|
|
Hi all,
I have a requirement, in which i need to do this. Let me cler by this example: I have two files, A.java & B.java, A file contains one textfield, txt. I need to set the value of txt as null, but from B file. Both of these files are in same package Miniproject of c drive.
Please suggest me the appropriate. Thanks in advance.
|
Regards,
Vishnu
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
|
B does not extend A, right ? You could have a public setter method in A, which sets the textfield to null.
|
[My Blog]
All roads lead to JavaRanch
|
 |
 |
|
|
subject: How to change attribute value of one class from second class
|
|
|