Changeset 421

Show
Ignore:
Timestamp:
12/06/09 20:16:48 (3 years ago)
Author:
stefan
Message:

added splash screen

Location:
java/JLatexEditor/src/jlatexeditor
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • java/JLatexEditor/src/jlatexeditor/gui/AboutDialog.java

    r417 r421  
    7777  } 
    7878 
    79   public void showMe() { 
     79  public void showIt() { 
    8080    setVisible(true); 
    8181  } 
     82 
     83  public void showAndAutoHideAfter(final int ms) { 
     84    setAlwaysOnTop(true); 
     85    setVisible(true); 
     86    new Thread() { 
     87      @Override 
     88      public void run() { 
     89        try { 
     90          Thread.sleep(ms); 
     91        } catch (InterruptedException ignored) {} 
     92        onClick(); 
     93      } 
     94    }.start(); 
     95  } 
    8296} 
  • java/JLatexEditor/src/jlatexeditor/JLatexEditorJFrame.java

    r420 r421  
    9393    */ 
    9494 
     95    new AboutDialog(null).showAndAutoHideAfter(5000); 
     96 
    9597    JLatexEditorJFrame latexEditor = new JLatexEditorJFrame(args); 
    9698    latexEditor.setSize(1024,800); 
     
    613615    if(action.equals("about")){ 
    614616      AboutDialog aboutDialog = new AboutDialog(version); 
    615       aboutDialog.setVisible(true); 
     617      aboutDialog.showIt(); 
    616618 
    617619      //JOptionPane.showMessageDialog(this, "<html><h2>JLatexEditor</h2><p>TODO</p></html>", "JLatexEditor", JOptionPane.INFORMATION_MESSAGE);