Create GUI in AWT Thread

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@175 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2008-11-07 18:25:49 +00:00
parent c51dcb9405
commit 21ae628e7e
1 changed files with 8 additions and 0 deletions

View File

@ -72,6 +72,14 @@ public class AwtGatewayTray implements DavGatewayTrayInterface {
}
public void init() {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}
});
}
public void createAndShowGUI() {
// set native look and feel
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());