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

📄 gload.java

📁 在管理员表中初始插入数据 usn: admin, pwd: 21232F297A57A5A743894A0E4A801FC3 初始用户账号/密码: admin (密码为 md5 加密) SRC
💻 JAVA
字号:
import javax.swing.*;

import java.awt.*;
import javax.swing.text.JTextComponent;

public class Gload {
	public static Dimension de = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
	public static String usn = "";
	public static String pwd = "";
	public static String AppTitle = "图书管理";
	public static int YES = JOptionPane.OK_OPTION;
	public static int NO = JOptionPane.NO_OPTION;
	public static int RowNum = 54;
	public static int slcID = -1;
	
	public static String getText(JTextComponent ip) {
		if (ip == null)
			return "";
		String s = ip.getText();
		return s.replaceAll("'", "''");
	}
	
	public static void checkLogin(Component parent) {
		if (usn.equals("")) {
			MSG(parent, "非法进入", "警告");
			System.exit(1);
		}
	}

	public static void MSG(Component parent, String msg, String title) {
		JOptionPane.showMessageDialog(parent, msg, title, JOptionPane.OK_OPTION);
	}
	public static void MSG(Component parent, String msg) {
		MSG(parent, msg, "提示");
	}

	public static int Confirm(Component parent, String msg, String title) {
		return JOptionPane.showConfirmDialog(parent, msg, title, 0);
	}
	public static int Confirm(Component parent, String msg) {
		return Confirm(parent, msg, "确认");
	}

	public static void exit() {
		Conn.close();
		System.exit(0);
	}

	public static boolean checkNumber(String s) {
		try {
			Double.parseDouble(s);
			return true;
		} catch (Exception e) {
			return false;
		}
	}
}

⌨️ 快捷键说明

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