Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what kind of action listener will i apply to this

 
Roldan Baldo
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i click the button the hehe label will not change to work . i want the label to change everytime i click the button.


 
Rob Spoor
Sheriff
Pie
Posts: 20546
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're calling setName, but it's the setText method that will change the caption of the label.
 
Roldan Baldo
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wow. that solves it.. thanks a lot.
 
Rob Poulos
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are calling label.setName(word);

you need to call label.setText(word);
 
Campbell Ritchie
Sheriff
Pie
Posts: 49391
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Swing forum
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic