📄 briefanswerinfojpanel.java
字号:
package com.cnu.cie.olts.client.teacher;import java.awt.Dimension;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.ComboBoxModel;import javax.swing.DefaultComboBoxModel;import javax.swing.JButton;import javax.swing.JComboBox;import javax.swing.WindowConstants;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JTextArea;import javax.swing.JTextField;/*** 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 BriefAnswerInfoJPanel extends javax.swing.JPanel { private JLabel itemtitleLabel; private JTextArea itemcontentTextArea; private JLabel itemanswerLabel; private JButton fillhelpjButton; private JComboBox itemtypejComboBox; private JLabel itemtypejLabel; private JTextField itemscorejTextField; private JButton submitjButton; private JTextField itemdifficultyjTextField; private JLabel itemdifficultyjLabel; private JComboBox itemsubjectjComboBox; private JLabel itemsubjectjLabel; private JTextField itemlimittimejTextField; private JLabel itemlimittimejLabel; private JLabel itemscorejLabel; private JTextField itemanswerTextField; /** * 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 BriefAnswerInfoJPanel()); frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); frame.pack(); frame.setVisible(true); } public BriefAnswerInfoJPanel() { super(); initGUI(); } private void initGUI() { try { this.setPreferredSize(new java.awt.Dimension(509, 371)); this.setLayout(null); { itemtitleLabel = new JLabel(); this.add(itemtitleLabel); itemtitleLabel.setText("\u8bd5\u9898\u5185\u5bb9"); itemtitleLabel.setBounds(39, 91, 77, 24); } { itemcontentTextArea = new JTextArea(); this.add(itemcontentTextArea); itemcontentTextArea.setBounds(144, 80, 332, 54); } { itemanswerLabel = new JLabel(); this.add(itemanswerLabel); itemanswerLabel.setText("\u8bd5\u9898\u53c2\u8003\u7b54\u6848"); itemanswerLabel.setBounds(33, 169, 99, 29); } { itemanswerTextField = new JTextField(); this.add(itemanswerTextField); itemanswerTextField.setBounds(144, 169, 332, 29); } { itemscorejLabel = new JLabel(); this.add(itemscorejLabel); itemscorejLabel.setText("\u8bd5\u9898\u5206\u503c"); itemscorejLabel.setBounds(39, 222, 77, 23); } { itemscorejTextField = new JTextField(); this.add(itemscorejTextField); itemscorejTextField.setBounds(144, 223, 63, 21); } { itemlimittimejLabel = new JLabel(); this.add(itemlimittimejLabel); itemlimittimejLabel.setText("\u7b54\u9898\u65f6\u95f4(\u5206\u949f)"); itemlimittimejLabel.setBounds(263, 223, 102, 21); } { itemlimittimejTextField = new JTextField(); this.add(itemlimittimejTextField); itemlimittimejTextField.setBounds(389, 223, 87, 21); } { itemsubjectjLabel = new JLabel(); this.add(itemsubjectjLabel); itemsubjectjLabel.setText("\u6240\u5c5e\u79d1\u76ee"); itemsubjectjLabel.setBounds(39, 271, 77, 21); } { ComboBoxModel itemsubjectjComboBoxModel = new DefaultComboBoxModel( new String[] { "Item One", "Item Two" }); itemsubjectjComboBox = new JComboBox(); this.add(itemsubjectjComboBox); itemsubjectjComboBox.setModel(itemsubjectjComboBoxModel); itemsubjectjComboBox.setBounds(144, 267, 94, 25); } { itemdifficultyjLabel = new JLabel(); this.add(itemdifficultyjLabel); itemdifficultyjLabel.setText("\u96be\u5ea6\u7cfb\u6570"); itemdifficultyjLabel.setBounds(263, 269, 102, 20); } { itemdifficultyjTextField = new JTextField(); this.add(itemdifficultyjTextField); itemdifficultyjTextField.setBounds(389, 269, 87, 21); } { submitjButton = new JButton(); this.add(submitjButton); submitjButton.setText("\u63d0\u4ea4"); submitjButton.setBounds(174, 324, 110, 25); submitjButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { submitjButtonActionPerformed(evt); } }); } { itemtypejLabel = new JLabel(); this.add(itemtypejLabel); itemtypejLabel.setText("\u8bd5\u9898\u7c7b\u578b"); itemtypejLabel.setBounds(39, 28, 77, 21); } { ComboBoxModel itemtypejComboBoxModel = new DefaultComboBoxModel( new String[] { "Item One", "Item Two" }); itemtypejComboBox = new JComboBox(); this.add(itemtypejComboBox); itemtypejComboBox.setModel(itemtypejComboBoxModel); itemtypejComboBox.setBounds(144, 26, 126, 25); } { fillhelpjButton = new JButton(); this.add(fillhelpjButton); fillhelpjButton.setText("\u586b\u5199\u8bf4\u660e"); fillhelpjButton.setBounds(282, 28, 83, 21); fillhelpjButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { fillhelpjButtonActionPerformed(evt); } }); } } catch (Exception e) { e.printStackTrace(); } } private void submitjButtonActionPerformed(ActionEvent evt) { System.out.println("submitjButton.actionPerformed, event="+evt); //TODO add your code for submitjButton.actionPerformed } private void fillhelpjButtonActionPerformed(ActionEvent evt) { System.out.println("fillhelpjButton.actionPerformed, event="+evt); //TODO add your code for fillhelpjButton.actionPerformed }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -