• Post Reply Bookmark Topic Watch Topic
  • New Topic

Status bar message update behavior

 
K. Tsang
Bartender
Posts: 3610
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, I'm working on my GUI and have a slight issue. When the app starts it allows users to enter the database location. Then these config are stored into Sun's properties file. Now in my GUI after it stores the config, the code suppose to "auto-connect" the database by instantiating that "Data" class. Once connected, the status bar's message should update to say "Database connected". But once in a while the status bar's message doesn't get updated.


I checked if data is not null and update status bar message. But sometimes the message ends up being the message of my readConfiguration() method.

Also besides checking a variable is null, is there any other way?
 
Liviu Carausu
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Try to make sure that your status bar is updated from the Swing Event thread....
 
Maybe he went home and went to bed. And took this tiny ad with him:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!