• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Status bar - dynamic prompt text

 
Krishna Alladi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a requirement to change status bar prompt text at run-time on tab-out event.
I am using the following code for that. But I don't see the text changing dynamically.
Rather it creates another status bar object at the top and displays that. Please help.




 
Darryl Burke
Bartender
Posts: 5125
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Krishna and welcome to the Ranch!

If that's Swing or AWT, you shouldn't be using getGraphics() of a component, nor should you ever call a painting method from client code -- call repaint() instead. That said, your code snippet doesn't make much sense in isolation. To get better help sooner, post a SSCCE that clearly demonstrates your problem.

Again, if that's Swing, why aren't you using JLabel and its setText(...) method instead of messing around with custom painting? And what's a tab-out event?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic