File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Status bar - dynamic prompt text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Status bar - dynamic prompt text" Watch "Status bar - dynamic prompt text" New topic

Status bar - dynamic prompt text

Krishna Alladi

Joined: Jun 16, 2011
Posts: 1
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

Joined: May 03, 2008
Posts: 5093

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?

luck, db
There are no new questions, but there may be new answers.
I agree. Here's the link:
subject: Status bar - dynamic prompt text
jQuery in Action, 3rd edition