Only 49 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

set button text dynamically  RSS feed

 
Sumi Festus
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone.. I would like to know how to set the text on the button dynamically during runtime.. I tried using setLabel method but it is not working.. Is there another method i can use.. Thanks a lot...
--------------------------------------------------------------------------------
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
setText()
 
Sumi Festus
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.. Thanks.. I tried setText() but its is not working.. Its is just putting some junk text and not the string that i specify in the program.. What do i do
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to send you on over to the Swing/AWT forum to continue this. Joe's answer is the right one; if you're seeing garbage characters, it's an issue with international character-set setup in your OS, not so much a Java issue.
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sumi Festus:
What do i do


How about giving us some clue as to what you expect to see, what you are seeing and the code you are using. The kinds of things that are in our FAQ,
HowToAskQuestionsOnJavaRanch.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!