• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Status bar message update behavior

 
K. Tsang
Bartender
Posts: 3585
16
Android Java
  • 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....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic