• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Status bar - dynamic prompt text

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.




 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
reply
    Bookmark Topic Watch Topic
  • New Topic