From 2802d23f4a5c1c2b1cd88ddb60ea195756fa27a8 Mon Sep 17 00:00:00 2001 From: lixl1 Date: Thu, 28 Apr 2022 09:15:06 +0800 Subject: [PATCH] =?UTF-8?q?javaswing=E7=B3=BB=E7=BB=9F=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B5=8B=E8=AF=95=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/insigma/ui/SwingFrame.java | 67 ++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/src/main/java/com/insigma/ui/SwingFrame.java b/src/main/java/com/insigma/ui/SwingFrame.java index 064ab83..6247872 100644 --- a/src/main/java/com/insigma/ui/SwingFrame.java +++ b/src/main/java/com/insigma/ui/SwingFrame.java @@ -69,6 +69,10 @@ public class SwingFrame extends JFrame implements ActionListener { private JPanel startBackupPanel; private JPanel startRestorePanel; private JTabbedPane tabbedPane; + private JTextField textField_1; + private JTextField textField_2; + private JTextField textField_3; + private JTextField textField_4; /** * Launch the application. */ @@ -579,7 +583,70 @@ public class SwingFrame extends JFrame implements ActionListener { textField.setBounds(207, 91, 330, 24); startRestorePanel.add(textField); + JPanel textPanel = new JPanel(); + textPanel.setLayout(null); + textPanel.setBackground(new Color(220, 220, 220)); + tabbedPane.addTab("测试", null, textPanel, null); + JButton button_7 = new JButton("开始数据库服务"); + button_7.setFont(new Font("微软雅黑", Font.PLAIN, 15)); + button_7.setBounds(14, 13, 170, 35); + textPanel.add(button_7); + + JButton button_8 = new JButton("停止数据库服务"); + button_8.setFont(new Font("微软雅黑", Font.PLAIN, 15)); + button_8.setBounds(14, 61, 170, 24); + button_8.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + } + }); + textPanel.add(button_8); + + JButton button_9 = new JButton("开始中间件"); + button_9.setFont(new Font("微软雅黑", Font.PLAIN, 15)); + button_9.setBounds(14, 98, 170, 35); + button_9.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + } + }); + textPanel.add(button_9); + + JButton button_10 = new JButton("停止中间件"); + button_10.setFont(new Font("微软雅黑", Font.PLAIN, 15)); + button_10.setBounds(14, 153, 170, 35); + button_10.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + + } + }); + textPanel.add(button_10); + + JButton button_11 = new JButton("测试按钮"); + button_11.setFont(new Font("微软雅黑", Font.PLAIN, 15)); + button_11.setBounds(14, 226, 170, 35); + textPanel.add(button_11); + + textField_1 = new JTextField(); + textField_1.setBounds(247, 19, 170, 29); + textPanel.add(textField_1); + textField_1.setColumns(10); + + textField_2 = new JTextField(); + textField_2.setColumns(10); + textField_2.setBounds(247, 86, 170, 29); + textPanel.add(textField_2); + + textField_3 = new JTextField(); + textField_3.setColumns(10); + textField_3.setBounds(247, 159, 170, 29); + textPanel.add(textField_3); + + textField_4 = new JTextField(); + textField_4.setColumns(10); + textField_4.setBounds(247, 232, 170, 29); + textPanel.add(textField_4); // new Timer(500, new ActionListener() { // @Override // public void actionPerformed(ActionEvent e) {