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?
K. Tsang OCPJP7 OCMJEA6
posted 8 years ago
Try to make sure that your status bar is updated from the Swing Event thread....
Oracle Certified Master Java SE6 Developer(SCJD),
OCE JEE 6 JSP and Servlets Developer,
Java EE6 Java Server Faces Developer.
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