Skip to main content

jbutton shows null >it cannot access constructor values from thread

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2013-03-20

I have a problem fetching constructor values into a jbutton running inside a thread.. The Jbutton parameter "message" takes the constructor value "checked"
Defined class level PARAMETERS
String checked,trans;
Clientthread(Object abc)
System.out.println("checked : "+checked); //some object value say "hello 123"

public void run()
ack.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
String message=checked;
System.out.println("message.."+ message); // op is null, y ? I want here "hello 123"