⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 splash.java

📁 图书管理系统v1.0是使用JAVA语言开发的解决图书基本管理的一个应用程序。 该系统能够实现简单的图书和用户管理
💻 JAVA
字号:
package lib;
import javax.swing.*;
import java.awt.*;

public class Splash {
	// A simple little method to show a title screen in the
	// center of the screen for a given amount of time.
	public static void showSplash(int duration) {
		JWindow splash = new JWindow();
		JPanel content = (JPanel) splash.getContentPane();

		// set the window's bounds, centering the window
		int width = 354;
		int height = 268;
		Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
		int x = (screen.width - width) / 2;
		int y = (screen.height - height) / 2;
		splash.setBounds(x, y, width, height);

		// build the splash screen
		JLabel label = new JLabel(new ImageIcon(ClassLoader.getSystemResource("images/splash.JPG")));
		JLabel copyrt = new JLabel("Copyright 2004", JLabel.CENTER);
		copyrt.setFont(new Font("Default", Font.BOLD, 10));
		//copyrt.setBorder(BorderFactory.createEtchedBorder());
		content.setBackground(Color.LIGHT_GRAY);
		//content.setBackground(new Color(232, 232, 228));
		content.add(label, BorderLayout.CENTER);
		content.add(copyrt, BorderLayout.SOUTH);
		content.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));

		// display it
		splash.setVisible(true);

		// Wait a little while, maybe while loading resources
		try {
			Thread.sleep(duration);
		}
		catch (Exception e) {
		}

		splash.setVisible(false);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -