This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Updating JLabel and code organization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Updating JLabel and code organization" Watch "Updating JLabel and code organization" New topic
Author

Updating JLabel and code organization

Youssef Eid
Greenhorn

Joined: Dec 20, 2013
Posts: 4
Can you help me organize my codes order and create an updating JLabel? I tries using label.setText("Hello"); but it did not work. Thanks for the help in advance.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10651
    
    9

Welcome to the Ranch.

I corrected your code tags. (You need to select the code and then click the code button)
I tries using label.setText("Hello"); but it did not work.

setText() is indeed the correct way. However the code you posted does not call setText() anywhere.

GUI questions are best asked on the GUI forum. Moving...


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Updating JLabel and code organization