【Java开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了Java开源代码-AddJudge.java的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
/*
* AddJudge.java
*
* Created on 2008年8月9日, 下午5:02
*/
package com.Exam.controller;
import javax.swing.JOptionPane;
import com.Exam.bean.*;
import com.Exam.dao.FindQuestionDao;
/**
*
* @author Administrator
*/
public class AddJudge extends javax.swing.JFrame {
/** Creates new form AddJudge */
public AddJudge() {
initComponents();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jPanel1 = new javax.swing.JPanel();
addJudgejLabel = new javax.swing.JLabel();
idCountjLabel = new javax.swing.JLabel();
idjTextField = new javax.swing.JTextField();
idCountjLabel1 = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
NamejTextArea = new javax.swing.JTextArea();
answerJLabel = new javax.swing.JLabel();
answerjTextField1 = new javax.swing.JTextField();
addjButton = new javax.swing.JButton();
resjButton = new javax.swing.JButton();
resjButton1 = new javax.swing.JButton();
remarkLabel = new javax.swing.JLabel();
remarkjTextField = new javax.swing.JTextField();
jLabel1.setText("");
setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
formWindowClosing(evt);
}
});
setTitle("添加判断题");
addJudgejLabel.setText("添加判断题模块:");
idCountjLabel.setText("试题编号:");
FindQuestionDao findDao = new FindQuestionDao();
int id = findDao.findQMid();
idjTextField.setText(""+(id+1));
idjTextField.setEditable(false);
idCountjLabel1.setText("试题题目:");
NamejTextArea.setColumns(20);
NamejTextArea.setRows(5);
jScrollPane1.setViewportView(NamejTextArea);
answerJLabel.setText("试题答案:");
answerjTextField1.setText("");
addjButton.setText("添加");
addjButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
addjButtonActionPerformed(evt);
}
});
resjButton.setText("重置");
resjButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
resjButtonActionPerformed(evt);
}
});
resjButton1.setText("关闭");
resjButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
resjButton1ActionPerformed(evt);
}
});
remarkLabel.setText(" 备 注:");
remarkjTextField.setText("");
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap(100, Short.MAX_VALUE)
.addComponent(addJudgejLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(105, 105, 105))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(82, 82, 82)
.addComponent(addjButton)
.addGap(18, 18, 18)
.addComponent(resjButton)
.addGap(18, 18, 18)
.addComponent(resjButton1)
.addContainerGap(102, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(27, 27, 27)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(remarkLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(remarkjTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 248, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(idCountjLabel)
.addPreferredGap(javax.swing.LayoutStyle.Co