| Author |
button not working, please help
|
Madhan Kumar
Greenhorn
Joined: Jan 09, 2006
Posts: 7
|
|
Hi, i am developing a chat application using sockets.I have used two panels in a frame. My problem is that the button in panel isnt working, i have used the same action event for both the panels.. i am adding here the part of my code.. My button when clicked has to display corresponding dialog box, but it fails to do so, what could be wrong please help. thanks in advance
|
 |
jay vas
Ranch Hand
Joined: Aug 30, 2005
Posts: 407
|
|
change JButton buser=new JButton("Users"); to buser=new JButton("Users"); (Youre declaring buser as a local variable inside the constructor. You need not declare it locally, because you want it to reference the gloable instance.)
|
 |
Madhan Kumar
Greenhorn
Joined: Jan 09, 2006
Posts: 7
|
|
|
Thank you, my headache is over for now.
|
 |
 |
|
|
subject: button not working, please help
|
|
|