JLabel splashLabel;
JWindow splashScreen; public void showSplashScreen()
{
splashLabel = new JLabel(new ImageIcon(getClass().getResource("/logo.gif")));
splashScreen = new JWindow();
splashScreen.getContentPane().add(splashLabel);
splashScreen.pack();
Rectangle screenRect = getGraphicsConfiguration().getBounds();
splashScreen.setLocation(
screenRect.x + screenRect.width/2 - splashScreen.getSize().width/2,
screenRect.y + screenRect.height/2 - splashScreen.getSize().height/2);
splashScreen.show();
}public void hideSplash()
{
if(splashScreen!=null)
{
splashScreen.setVisible(false);
splashScreen.dispose();
splashScreen = null;
splashLabel = null;
}
JWindow splashScreen; public void showSplashScreen()
{
splashLabel = new JLabel(new ImageIcon(getClass().getResource("/logo.gif")));
splashScreen = new JWindow();
splashScreen.getContentPane().add(splashLabel);
splashScreen.pack();
Rectangle screenRect = getGraphicsConfiguration().getBounds();
splashScreen.setLocation(
screenRect.x + screenRect.width/2 - splashScreen.getSize().width/2,
screenRect.y + screenRect.height/2 - splashScreen.getSize().height/2);
splashScreen.show();
}public void hideSplash()
{
if(splashScreen!=null)
{
splashScreen.setVisible(false);
splashScreen.dispose();
splashScreen = null;
splashLabel = null;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货