diff --git a/.classpath b/.classpath index 4f2c72bc704e43db10af3dbb5a3cedd1e1e6d706..c71254a5ee3f80f486fd57f6eddb77580ccd2707 100644 --- a/.classpath +++ b/.classpath @@ -1,10 +1,11 @@ - - - - - - - - - - + + + + + + + + + + + diff --git a/src/dao/Userdao.java b/src/dao/Userdao.java new file mode 100644 index 0000000000000000000000000000000000000000..783925744b7ea8b06342f9336aea1af6cb84a5b9 --- /dev/null +++ b/src/dao/Userdao.java @@ -0,0 +1,32 @@ +package dao; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import model.User; + + +public class Userdao { + /** + * 登录验证 + * @param con + * @param user + * @return + * @throws Exception + */ +public User login(Connection con,User user)throws Exception{ + User resultUser=null; + String sql="select * from land where userName=? and password=?"; + PreparedStatement pstmt=con.prepareStatement(sql); + pstmt.setString(1,user.getUserName()); + pstmt.setString(2,user.getPassword()); + ResultSet rs=pstmt.executeQuery(); + if(rs.next()) { + resultUser=new User(); + resultUser.setId(rs.getInt("id")); + resultUser.setUserName(rs.getString("userName")); + resultUser.setPassword(rs.getString("password")); + } + return resultUser; + +} +} diff --git a/src/java2021autumn/Main.java b/src/java2021autumn/Main.java index c1318e3e34682abbe1bfc46c8e180f03b5046dd7..2d10c8e423e8ead7ccdb581ecf41b222241e6db9 100644 --- a/src/java2021autumn/Main.java +++ b/src/java2021autumn/Main.java @@ -1,10 +1,68 @@ -package java2021autumn; - -public class Main { - - public static void main(String[] args) { - // TODO Auto-generated method stub - - } - -} +package java2021autumn; +import javax.swing.*; +import javax.swing.table.AbstractTableModel; +import java.awt.*; +import java.awt.event.*; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Map; +import java.util.Vector; + +public class Main {private JFrame frame; +private String userNow; +public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + @Override + public void run() { + try { + Main window = new Main(); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); +} + private Main() { + initialize(); + } + private static void initialize() { + JFrame frame = new JFrame("超市信息管理系统"); + frame.setBounds(100, 100, 800, 450); + //窗口居中 + frame.setLocationRelativeTo(null); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.getContentPane().setLayout(null); + frame.setVisible(true); + + //添加窗口组件 + JLabel label = new JLabel(" 超市信息管理系统"); + JLabel labUsername = new JLabel("用户名"); + JLabel labPassword = new JLabel("密码"); + JTextField username = new JTextField(20); + JPasswordField password = new JPasswordField(20); + JButton btn1 = new JButton("登录"); + JButton btn2 = new JButton("退出"); + + frame.getContentPane().add(label); + frame.getContentPane().add(labUsername); + frame.getContentPane().add(labPassword); + frame.getContentPane().add(username); + frame.getContentPane().add(password); + frame.getContentPane().add(btn1); + frame.getContentPane().add(btn2); + + //设置组件属性 + label.setBounds(220, 40, 360, 75); + labUsername.setBounds(260, 150, 60, 40); + labPassword.setBounds(265, 220, 60, 40); + username.setBounds(320, 150, 180, 40); + password.setBounds(320, 220, 180, 40); + btn1.setBounds(250, 290, 100, 30); + btn2.setBounds(420, 290, 100, 30); + //设置文字的字体及大小 + label.setFont(new Font("", Font.BOLD, 30)); + }} \ No newline at end of file diff --git a/src/model/Good.java b/src/model/Good.java new file mode 100644 index 0000000000000000000000000000000000000000..1e1132d97aa97feff1167bc92325d649cef760f1 --- /dev/null +++ b/src/model/Good.java @@ -0,0 +1,31 @@ +package model; +/** + * 商品货物实体 + * @author 墨迹s + * + */ +public class Good { +private int id;//编号 +private String goodTypeName;//货物类别名称 +private String goodTypeDesc;//备注 + +public int getId() { + return id; +} +public void setId(int id) { + this.id = id; +} +public String getGoodTypeName() { + return goodTypeName; +} +public void setGoodTypeName(String goodTypeName) { + this.goodTypeName = goodTypeName; +} +public String getGoodTypeDesc() { + return goodTypeDesc; +} +public void setGoodTypeDesc(String goodTypeDesc) { + this.goodTypeDesc = goodTypeDesc; +} + +} diff --git a/src/model/User.java b/src/model/User.java new file mode 100644 index 0000000000000000000000000000000000000000..d58ba2197beaa6a1731bda0dc37ba4c66a739008 --- /dev/null +++ b/src/model/User.java @@ -0,0 +1,45 @@ +package model; +/** + * 用户实体 + * @author 墨迹s + * + */ +public class User { +private int id;//编号 +private String userName;//用户名 +private String password;//密码 + + +public User(String userName, String password) { + super(); + this.userName = userName; + this.password = password; +} +public User() {//必须加这个构造方法 否则new无参会报错 + super(); + // TODO 自动生成的构造函数存根 + } + +public int getId() { + return id; +} +public void setId(int id) { + this.id = id; +} +public String getUserName() { + return userName; +} +public void setUserName(String userName) { + this.userName = userName; +} +public String getPassword() { + return password; +} +public void setPassword(String password) { + this.password = password; +} + + + + +} diff --git a/src/util/DbUtil.java b/src/util/DbUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..41d4187e1d6bc314c85a346d95f03f9634c4f0eb --- /dev/null +++ b/src/util/DbUtil.java @@ -0,0 +1,47 @@ +package util; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; +/** + * 数据库工具类 + * @author 墨迹s + * + */ + public class DbUtil { + private String dbUrl="jdbc:derby:testDB_embeded;create=true"; + private String jdbcName="org.apache.derby.jdbc.EmbeddedDriver";//驱动名称 + + + + /** + * 获取数据库连接 + * @return + * @throws Exception + */ + public Connection getCon() throws Exception{ + //Class.forName(jdbcName); + Connection con=DriverManager.getConnection(dbUrl); + return con; + } + + //关闭数据库连接 + public void closeCon(Connection con)throws Exception{ + if(con!=null) { + con.close(); + } + } + public static void main(String[] args) { + DbUtil dbUtil=new DbUtil(); + try { + dbUtil.getCon(); + System.out.println("数据库连接成功!"); + } catch (Exception e) { + // TODO 自动生成的 catch 块 + e.printStackTrace(); + System.out.println("数据库连接失败!"); + } + } + } + + diff --git a/src/util/StringUtil.java b/src/util/StringUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..61281f6829477a6f47f8194141aed0dbb894fb42 --- /dev/null +++ b/src/util/StringUtil.java @@ -0,0 +1,23 @@ +package util; +/** + * 字符串工具类 + * @author 墨迹s + * + */ +public class StringUtil { + // 判断是否是空 +public static boolean isEmpty(String str) { + if(str==null||"".equals(str.trim())) { + return true; + }else { + return false; + } +} +public static boolean isNotEmpty(String str) { + if(str!=null&&!"".equals(str.trim())) { + return true; + }else { + return false; + } +} +} diff --git a/src/view/GoodAddInterfrm.java b/src/view/GoodAddInterfrm.java new file mode 100644 index 0000000000000000000000000000000000000000..d5e288cbb9c50c5c491e24a02acfe228f5d4f24a --- /dev/null +++ b/src/view/GoodAddInterfrm.java @@ -0,0 +1,118 @@ +package view; + +import java.awt.EventQueue; + +import javax.swing.JInternalFrame; +import javax.swing.GroupLayout; +import javax.swing.GroupLayout.Alignment; +import javax.swing.JLabel; +import javax.swing.JTextField; +import javax.swing.LayoutStyle.ComponentPlacement; +import javax.swing.JTextArea; +import javax.swing.JButton; +import java.awt.event.ActionListener; +import java.beans.PropertyVetoException; +import java.awt.event.ActionEvent; + +public class GoodAddInterfrm extends JInternalFrame { + private JTextField GoodTypeNameTxt; + private JTextArea GoodTypeDescTxt; + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + GoodAddInterfrm frame = new GoodAddInterfrm(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public GoodAddInterfrm() { + try { + setClosed(true); + } catch (PropertyVetoException e1) { + // TODO 自动生成的 catch 块 + e1.printStackTrace(); + } + setIconifiable(true); + setTitle("\u5546\u54C1\u7C7B\u522B\u6DFB\u52A0"); + setBounds(100, 100, 450, 300); + + JLabel lblNewLabel = new JLabel("\u5546\u54C1\u540D\u79F0"); + + JLabel lblNewLabel_1 = new JLabel("\u5546\u54C1\u63CF\u8FF0"); + + GoodTypeNameTxt = new JTextField(); + GoodTypeNameTxt.setColumns(10); + + JTextArea GoodTypeDescTxt = new JTextArea(); + + JButton btnNewButton = new JButton("\u6DFB\u52A0"); + + JButton btnNewButton_1 = new JButton("\u91CD\u7F6E"); + btnNewButton_1.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + resetValueActionPerformed(e); + + } + + }); + GroupLayout groupLayout = new GroupLayout(getContentPane()); + groupLayout.setHorizontalGroup( + groupLayout.createParallelGroup(Alignment.LEADING) + .addGroup(groupLayout.createSequentialGroup() + .addGap(55) + .addGroup(groupLayout.createParallelGroup(Alignment.LEADING) + .addGroup(groupLayout.createSequentialGroup() + .addComponent(btnNewButton, GroupLayout.PREFERRED_SIZE, 76, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(ComponentPlacement.RELATED, 73, Short.MAX_VALUE) + .addComponent(btnNewButton_1, GroupLayout.PREFERRED_SIZE, 79, GroupLayout.PREFERRED_SIZE)) + .addGroup(groupLayout.createSequentialGroup() + .addComponent(lblNewLabel_1, GroupLayout.PREFERRED_SIZE, 58, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(ComponentPlacement.UNRELATED) + .addComponent(GoodTypeDescTxt, GroupLayout.PREFERRED_SIZE, 160, GroupLayout.PREFERRED_SIZE)) + .addGroup(groupLayout.createSequentialGroup() + .addComponent(lblNewLabel, GroupLayout.PREFERRED_SIZE, 58, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(ComponentPlacement.UNRELATED) + .addComponent(GoodTypeNameTxt))) + .addContainerGap(155, Short.MAX_VALUE)) + ); + groupLayout.setVerticalGroup( + groupLayout.createParallelGroup(Alignment.LEADING) + .addGroup(groupLayout.createSequentialGroup() + .addGap(87) + .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE) + .addComponent(lblNewLabel) + .addComponent(GoodTypeNameTxt, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) + .addGap(33) + .addGroup(groupLayout.createParallelGroup(Alignment.LEADING) + .addComponent(lblNewLabel_1) + .addComponent(GoodTypeDescTxt, GroupLayout.PREFERRED_SIZE, 52, GroupLayout.PREFERRED_SIZE)) + .addGap(26) + .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE) + .addComponent(btnNewButton) + .addComponent(btnNewButton_1)) + .addContainerGap(29, Short.MAX_VALUE)) + ); + getContentPane().setLayout(groupLayout); + + } + //重置事件处理 + private void resetValueActionPerformed(ActionEvent evt) { + this.resetValue(); + } + //重置表单 + private void resetValue() { + this.GoodTypeNameTxt.setText(""); + this.GoodTypeDescTxt.setText(""); + } +} diff --git a/src/view/LogOnfrm.java b/src/view/LogOnfrm.java new file mode 100644 index 0000000000000000000000000000000000000000..fc122aba78b0e8f1b577d14befaf9ca48f36b0fc --- /dev/null +++ b/src/view/LogOnfrm.java @@ -0,0 +1,186 @@ +package view; + +import java.awt.EventQueue; +import java.awt.Font; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.sql.Connection; + +import javax.swing.GroupLayout; +import javax.swing.GroupLayout.Alignment; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JPasswordField; +import javax.swing.JTextField; +import javax.swing.LayoutStyle.ComponentPlacement; +import javax.swing.border.EmptyBorder; + +import dao.Userdao; +import model.User; +import util.DbUtil; +import util.StringUtil; + +public class LogOnfrm extends JFrame { + + private JPanel contentPane; + private JTextField userNameTxt; + private JPasswordField passwordTxt; + + private DbUtil dbUtil=new DbUtil(); + private Userdao userDao =new Userdao(); + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + LogOnfrm frame = new LogOnfrm(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public LogOnfrm() { + setResizable(false); + setTitle("\u7BA1\u7406\u5458\u767B\u5F55"); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(100, 100, 612, 401); + contentPane = new JPanel(); + contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); + setContentPane(contentPane); + + JLabel lblNewLabel = new JLabel("\u8D85\u5E02\u4FE1\u606F\u7BA1\u7406\u7CFB\u7EDF"); + lblNewLabel.setFont(new Font("华文新魏", Font.PLAIN, 33)); + + JLabel lblNewLabel_1 = new JLabel("\u7528\u6237\u540D"); + lblNewLabel_1.setFont(new Font("仿宋", Font.PLAIN, 25)); + + JLabel lblNewLabel_2 = new JLabel("\u5BC6 \u7801"); + lblNewLabel_2.setFont(new Font("仿宋", Font.PLAIN, 25)); + + userNameTxt = new JTextField(); + userNameTxt.setColumns(10); + + passwordTxt = new JPasswordField(); + + JButton btnNewButton = new JButton("\u767B\u5F55"); + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + loginActionPerformed(e); + } + }); + btnNewButton.setFont(new Font("黑体", Font.PLAIN, 21)); + + JButton btnNewButton_1 = new JButton("\u91CD\u7F6E"); + btnNewButton_1.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + resetValueActionPerformed(e); + } + }); + btnNewButton_1.setFont(new Font("黑体", Font.PLAIN, 21)); + GroupLayout gl_contentPane = new GroupLayout(contentPane); + gl_contentPane.setHorizontalGroup( + gl_contentPane.createParallelGroup(Alignment.LEADING) + .addGroup(gl_contentPane.createSequentialGroup() + .addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING) + .addGroup(gl_contentPane.createSequentialGroup() + .addGap(104) + .addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING, false) + .addGroup(gl_contentPane.createSequentialGroup() + .addGroup(gl_contentPane.createParallelGroup(Alignment.TRAILING, false) + .addComponent(lblNewLabel_2, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lblNewLabel_1, GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) + .addGap(18) + .addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING, false) + .addComponent(userNameTxt, GroupLayout.DEFAULT_SIZE, 208, Short.MAX_VALUE) + .addComponent(passwordTxt))) + .addGroup(gl_contentPane.createSequentialGroup() + .addComponent(btnNewButton, GroupLayout.PREFERRED_SIZE, 97, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(btnNewButton_1, GroupLayout.PREFERRED_SIZE, 97, GroupLayout.PREFERRED_SIZE)))) + .addGroup(gl_contentPane.createSequentialGroup() + .addGap(156) + .addComponent(lblNewLabel, GroupLayout.PREFERRED_SIZE, 272, GroupLayout.PREFERRED_SIZE))) + .addContainerGap(160, Short.MAX_VALUE)) + ); + gl_contentPane.setVerticalGroup( + gl_contentPane.createParallelGroup(Alignment.LEADING) + .addGroup(gl_contentPane.createSequentialGroup() + .addGap(43) + .addComponent(lblNewLabel) + .addGap(59) + .addGroup(gl_contentPane.createParallelGroup(Alignment.TRAILING) + .addComponent(userNameTxt, GroupLayout.PREFERRED_SIZE, 29, GroupLayout.PREFERRED_SIZE) + .addComponent(lblNewLabel_1)) + .addGap(45) + .addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING) + .addGroup(gl_contentPane.createSequentialGroup() + .addComponent(lblNewLabel_2) + .addGap(39)) + .addGroup(gl_contentPane.createSequentialGroup() + .addComponent(passwordTxt) + .addGap(36))) + .addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING) + .addComponent(btnNewButton) + .addGroup(gl_contentPane.createSequentialGroup() + .addPreferredGap(ComponentPlacement.RELATED) + .addComponent(btnNewButton_1))) + .addContainerGap(38, Short.MAX_VALUE)) + ); + contentPane.setLayout(gl_contentPane); + //设置Jframe居中显示 + this.setLocationRelativeTo(null);; + } + /** + * 登录事件处理 + * @param e + */ +private void loginActionPerformed(ActionEvent e) { + String userName=this.userNameTxt.getText(); + String password=new String(this.passwordTxt.getPassword()); + if(StringUtil.isEmpty(userName)) { + JOptionPane.showMessageDialog(null, "用户名不能为空喔"); + return; + } + if(StringUtil.isEmpty(password)) { + JOptionPane.showMessageDialog(null, "密码不能为空喔"); + return; + } + User user=new User(userName,password); + Connection con=null; + try { + con=dbUtil.getCon(); + User currentUser = userDao.login(con, user); + if(currentUser!=null) { + JOptionPane.showMessageDialog(null, "登录成功!"); + }else { + JOptionPane.showMessageDialog(null, "用户名或者密码错误!"); + } + }catch (Exception e1) { + // TODO 自动生成的 catch 块 + e1.printStackTrace(); + } + +} + +/** + * 重置事件处理 + * @param e + */ + private void resetValueActionPerformed(ActionEvent evt) { + // TODO 自动生成的方法存根 + this.userNameTxt.setText(""); + this.passwordTxt.setText(""); + + } +} diff --git a/src/view/MainFrm.java b/src/view/MainFrm.java new file mode 100644 index 0000000000000000000000000000000000000000..d33a014d5c4db6e113cd5929cb266727956b5c36 --- /dev/null +++ b/src/view/MainFrm.java @@ -0,0 +1,89 @@ +package view; + +import java.awt.BorderLayout; +import java.awt.EventQueue; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; +import javax.swing.JMenuBar; +import javax.swing.JMenu; +import javax.swing.JMenuItem; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import javax.swing.JTable; +import javax.swing.GroupLayout; +import javax.swing.GroupLayout.Alignment; + +public class MainFrm extends JFrame { + private JTable table; + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + MainFrm frame = new MainFrm(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public MainFrm() { + setTitle("\u8D85\u5E02\u4FE1\u606F\u7BA1\u7406\u7CFB\u7EDF\u4E3B\u754C\u9762"); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setBounds(100, 100, 679, 440); + + JMenuBar menuBar = new JMenuBar(); + setJMenuBar(menuBar); + + JMenu mnNewMenu = new JMenu("\u57FA\u672C\u64CD\u4F5C"); + menuBar.add(mnNewMenu); + + JMenu mnNewMenu_2 = new JMenu("\u5458\u5DE5\u7BA1\u7406"); + mnNewMenu.add(mnNewMenu_2); + + JMenu mnNewMenu_3 = new JMenu("\u5E93\u5B58\u7BA1\u7406"); + mnNewMenu.add(mnNewMenu_3); + + JMenu mnNewMenu_4 = new JMenu("\u9500\u552E\u7BA1\u7406"); + mnNewMenu.add(mnNewMenu_4); + + JMenu mnNewMenu_5 = new JMenu("\u8D26\u53F7\u7BA1\u7406"); + mnNewMenu.add(mnNewMenu_5); + + JMenu mnNewMenu_6 = new JMenu("\u9500\u552E\u7BA1\u7406"); + mnNewMenu.add(mnNewMenu_6); + + JMenu mnNewMenu_7 = new JMenu("\u4F1A\u5458\u7BA1\u7406"); + mnNewMenu.add(mnNewMenu_7); + + JMenu mnNewMenu_8 = new JMenu("\u8FDB\u8D27\u7BA1\u7406"); + mnNewMenu.add(mnNewMenu_8); + + JMenu mnNewMenu_1 = new JMenu("\u5173\u4E8E\u6211\u4EEC"); + menuBar.add(mnNewMenu_1); + + JMenuItem mntmNewMenuItem = new JMenuItem("\u5173\u4E8E\u7CFB\u7EDF"); + mntmNewMenuItem.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + SysInterfrm sysInterfrm=new SysInterfrm(); + sysInterfrm.setVisible(true); + table.add(sysInterfrm); + } + }); + mnNewMenu_1.add(mntmNewMenuItem); + getContentPane().setLayout(new BorderLayout(0, 0)); + + table = new JTable(); + getContentPane().add(table); + } +} diff --git a/src/view/SysInterfrm.java b/src/view/SysInterfrm.java new file mode 100644 index 0000000000000000000000000000000000000000..210a6cd7c148d5485724906f2e0cf3b8065a7a52 --- /dev/null +++ b/src/view/SysInterfrm.java @@ -0,0 +1,71 @@ +package view; + +import java.awt.EventQueue; + +import javax.swing.JInternalFrame; +import java.awt.Color; +import javax.swing.JLabel; +import java.awt.BorderLayout; +import javax.swing.GroupLayout; +import javax.swing.GroupLayout.Alignment; +import java.awt.Font; +import javax.swing.LayoutStyle.ComponentPlacement; + +public class SysInterfrm extends JInternalFrame { + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + SysInterfrm frame = new SysInterfrm(); + frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the frame. + */ + public SysInterfrm() { + setBackground(Color.LIGHT_GRAY); + setIconifiable(true); + setClosable(true); + setTitle("\u5173\u4E8E\u7CFB\u7EDF"); + setBounds(100, 100, 450, 300); + + JLabel lblNewLabel = new JLabel("\u8D85\u5E02\u4FE1\u606F\u7BA1\u7406\u7CFB\u7EDF"); + lblNewLabel.setFont(new Font("幼圆", Font.PLAIN, 32)); + + JLabel lblNewLabel_1 = new JLabel("20\u4FE1\u7BA11\u73ED 202025710107 \u9F9A\u8335\u838E"); + lblNewLabel_1.setFont(new Font("宋体", Font.BOLD, 18)); + GroupLayout groupLayout = new GroupLayout(getContentPane()); + groupLayout.setHorizontalGroup( + groupLayout.createParallelGroup(Alignment.LEADING) + .addGroup(groupLayout.createSequentialGroup() + .addGap(88) + .addComponent(lblNewLabel, GroupLayout.PREFERRED_SIZE, 276, GroupLayout.PREFERRED_SIZE) + .addContainerGap(74, Short.MAX_VALUE)) + .addGroup(Alignment.TRAILING, groupLayout.createSequentialGroup() + .addContainerGap(78, Short.MAX_VALUE) + .addComponent(lblNewLabel_1, GroupLayout.PREFERRED_SIZE, 309, GroupLayout.PREFERRED_SIZE) + .addGap(51)) + ); + groupLayout.setVerticalGroup( + groupLayout.createParallelGroup(Alignment.LEADING) + .addGroup(groupLayout.createSequentialGroup() + .addGap(38) + .addComponent(lblNewLabel, GroupLayout.PREFERRED_SIZE, 53, GroupLayout.PREFERRED_SIZE) + .addGap(27) + .addComponent(lblNewLabel_1, GroupLayout.PREFERRED_SIZE, 65, GroupLayout.PREFERRED_SIZE) + .addContainerGap(88, Short.MAX_VALUE)) + ); + getContentPane().setLayout(groupLayout); + + } +}