package net.jeson.game; import java.awt.Dimension; import java.awt.Toolkit; import java.awt.Window; import javax.swing.ImageIcon; import javax.swing.JFrame; import net.jeson.game.component.CenterShowDialog; import net.jeson.game.component.ImagePanel; import net.jeson.game.ui.Login; import net.jeson.game.util.Util; public class Game extends JFrame{ ImagePanel panel = new ImagePanel(new ImageIcon("images/note.gif").getImage()); public Game(){ this.add(panel); panel.setDoubleBuffered(true); panel.setIgnoreRepaint(true); this.setUndecorated(true); this.pack(); this.setVisible(true); new CenterShowDialog(this); } public static void main(String[] args){ Game game =new Game(); Util.showWindow(game); try { Thread.sleep(5000); } catch (InterruptedException e) { e.printStackTrace(); } Util.closeWindow(game); Login frame = new Login(); new CenterShowDialog(frame); frame.setVisible(true); game.setVisible(false); } }