This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes Help me out in Thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Help me out in Thread" Watch "Help me out in Thread" New topic

Help me out in Thread

Anand Karia
Ranch Hand

Joined: Sep 25, 2004
Posts: 156

I have a swing application. I make a utility which shows output on outputwindow but when i want to print it on jLabel then it doesnot show anything on that label. Here all my process runs in background.

Can anybody help me out how can i show my transaction that is in process to that particular jLabel.

I only know that this could be done in thread but i dont know how? Plz suggest me and send me some code if possible.

Thank you in advance.

Love is GOD and GOD is Love.
Anand Karia
IT Concretor.......
M/s. Anand Karia Concreting IT
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

After you set the JLabel's text, call validate() on the container it's packed into (the JPanel, JFrame, etc that most closely contains it.) This is a necessary step after making any changes to the size of components that are visible on the screen.

[Jess in Action][AskingGoodQuestions]
Anand Karia
Ranch Hand

Joined: Sep 25, 2004
Posts: 156

This is not working.
Madhuri Chanda

Joined: Nov 09, 2005
Posts: 10
May be if you post the part of the code which is setting the JLabel, then someone might know the solution.
Anand Karia
Ranch Hand

Joined: Sep 25, 2004
Posts: 156

Thankx Ernest and Madhuri Chanda

I got the solution by making jLabel static.

Now I can see which number is process and it also fillup grid at the same time.

Thanks one again.
Consider Paul's rocket mass heater.
subject: Help me out in Thread
Similar Threads
Getting a Component to show?
Execute long time process in java
View JPG Image from Servlet File
how to increase font of JLabel
Mouse Listener on Component