#navi(contents-page-name): No such page: ST

Terai Atsuhiro 2024-02-02 (金) 11:52:27

private JWindow splashScreen;
private JLabel  splashLabel;
public void createSplashScreen(String path){
  ImageIcon img = new ImageIcon(getClass().getResource(path));
  splashLabel  = new JLabel(img);
  splashScreen = new JWindow(getFrame());
  splashScreen.getContentPane().add(splashLabel);
  splashScreen.pack();
  splashScreen.setLocationRelativeTo(null);
}
public void showSplashScreen(){
  splashScreen.show();
}
public void hideSplash(){
  splashScreen.setVisible(false);
  splashScreen = null;
  splashLabel  = null;
}

public HogeHoge(){
  createSplashScreen("/resources/images/splash.png");
  SwingUtilities.invokeLater(new Runnable(){
    public void run(){
      showSplashScreen();
    }
  });
  //initializePanel();

  try{
    Thread.sleep(3000);
  }catch(InterruptedException e){
  	 System.out.println(e);
  }
  SwingUtilities.invokeLater(new Runnable(){
    public void run(){
      showPanel();
      hideSplash();
    }
  });
}

n-Gen Design Machine