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 Add label to frame during button action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Add label to frame during button action" Watch "Add label to frame during button action" New topic

Add label to frame during button action

Krithika Beri
Ranch Hand

Joined: Sep 11, 2012
Posts: 36
My requirement is that there is a process which is taking place which takes quite some time. The process starts when a button is clicked. So when the button is clicked, I want to add a Label before the actual process starts to show that the process is in progress. But what i found is that, after the button action is completed only then the JFrame is updated with the label. Please help
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10836

You are having a threading issue.
Check out

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Darryl Burke

Joined: May 03, 2008
Posts: 5115

May be better than a simple JLabel, if you're in a position to take up the extra learning: How to Use Progress Bars

luck, db
There are no new questions, but there may be new answers.
I agree. Here's the link:
subject: Add label to frame during button action
jQuery in Action, 3rd edition