dangsn
2025-01-16 d6e9b6f11fd8f36895eb70f092bdd8c412750111
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
package com.vci.client.workflow.eventEdit;
 
import java.awt.Dimension;
import java.awt.FlowLayout;
import javax.swing.BoxLayout;
import javax.swing.JButton;
 
import javax.swing.WindowConstants;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
 
import com.vci.client.ui.table.VCIBaseTableModel;
 
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
 
import java.awt.BorderLayout;
 
/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class EventEditPanel extends javax.swing.JPanel {
    private JScrollPane jsp;
    private JTable eventTable;
    private JPanel jPanel1;
    private JButton addBtn;
    private JButton saveBtn;
    private JPanel botPanel;
    private JButton delBtn;
    private JPanel btnPanel;
 
    /**
    * Auto-generated main method to display this 
    * JPanel inside a new JFrame.
    */
    public static void main(String[] args) {
        JFrame frame = new JFrame();
        frame.getContentPane().add(new EventEditPanel());
        frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
    }
    
    public EventEditPanel() {
        super();
        initGUI();
    }
    
    private void initGUI() {
        try {
            BorderLayout thisLayout = new BorderLayout();
            this.setLayout(thisLayout);
            setPreferredSize(new Dimension(400, 300));
            {
                jsp = new JScrollPane();
                this.add(jsp, BorderLayout.CENTER);
                jsp.setPreferredSize(new java.awt.Dimension(198, 254));
                {
                    String[] columName = new String[] { "key", "value" };
                    Class[] classes = new Class[]{String.class,String.class}; 
                    VCIBaseTableModel tableModel = new VCIBaseTableModel(columName, classes);
                    eventTable = new JTable();
                    jsp.setViewportView(eventTable);
                    eventTable.setModel(tableModel);
                }
            }
            {
                btnPanel = new JPanel();
                BorderLayout btnPanelLayout = new BorderLayout();
                btnPanel.setLayout(btnPanelLayout);
                this.add(btnPanel, BorderLayout.EAST);
            }
            {
                jPanel1 = new JPanel();
                BoxLayout jPanel1Layout = new BoxLayout(jPanel1, javax.swing.BoxLayout.Y_AXIS);
                jPanel1.setLayout(jPanel1Layout);
                this.add(jPanel1, BorderLayout.EAST);
                {
                    addBtn = new JButton();
                    jPanel1.add(addBtn);
                    addBtn.setText("添加");
                }
                {
                    delBtn = new JButton();
                    jPanel1.add(delBtn);
                    delBtn.setText("删除");
                }
            }
            {
                botPanel = new JPanel();
                FlowLayout botPanelLayout = new FlowLayout();
                this.add(botPanel, BorderLayout.SOUTH);
                botPanel.setLayout(botPanelLayout);
                {
                    saveBtn = new JButton();
                    botPanel.add(saveBtn);
                    saveBtn.setText("保存");
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
 
}