Dear All
I m a new user of
java.
plz help me out 2 solve my problem.
1 class = dbconnection
2 class = util
3 class = company
4 class = login
i ve connected database with dbconnection in login form using
dbconnection conn = new dbconnection();
then userid is asked. When i enter my login it passes value to util class
util u = new util(); // this is initialized at top.
u.setValue(txtUserId.getText());
public
String setValue(String str)
{ String myVal
myVal = str;
System.out.println(myVal);
return myVal;
}
when i m trying to print that value i is showing user id.
I ve a button on login form called "Company".
I ve inititlized util object at the top.
util abc = new util();
Problem:
========
i want to get the value that i ve assigned in my login form using setValue() method.
But when ever i m getting value from util class it shows null value;
Plz tell where i m wrong?
ANAND