aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
Author

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: 9990
    
    7

You are having a threading issue.
Check out https://www.coderanch.com/how-to/java/JProgressBarDoesntUpdate


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

Joined: May 03, 2008
Posts: 4522
    
    5

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: http://aspose.com/file-tools
 
subject: Add label to frame during button action
 
Similar Threads
array of buttons
JLabel- simple question.
GUI
creating button with dual purpose
Create jLabels when a button is clicked