⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 user_imformation.java

📁 车票预定系统用 java实现的……
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/*
 * user_imformation.java
 *
 * Created on 2008年6月18日, 下午3:41
 */

package javaapplication1;
import java.awt.event.WindowEvent;
import javax.swing.*;
import java.awt.*;
import java.sql.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author  Administrator
 */
public class user_imformation extends javax.swing.JFrame {
     Connection con;//创建对象
        Statement sql;
         ResultSet rs;
    /** Creates new form user_imformation */
    public user_imformation() {
         setTitle("请输入用户信息");
        setBounds(300,50,40,20);
        setResizable(false);
        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.
     */
    // <editor-fold defaultstate="collapsed" desc=" 生成的代码 ">//GEN-BEGIN:initComponents
    private void initComponents() {
        jPanel1 = new javax.swing.JPanel();
        to = new javax.swing.JTextField();
        type = new javax.swing.JComboBox();
        jLabel9 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        time = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        from = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        ID = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        female = new javax.swing.JRadioButton();
        man = new javax.swing.JRadioButton();
        jLabel3 = new javax.swing.JLabel();
        name = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jButton3 = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        jPanel1.setBackground(new java.awt.Color(255, 204, 255));
        to.setBackground(new java.awt.Color(204, 204, 255));

        type.setBackground(new java.awt.Color(204, 204, 255));
        type.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "\u5927\u578b", "\u4e2d\u578b" }));
        type.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                typeActionPerformed(evt);
            }
        });

        jLabel9.setText("\u8f66\u578b\u8981\u6c42");

        jLabel7.setText("\u76ee\u7684\u5730");

        time.setBackground(new java.awt.Color(204, 204, 255));

        jLabel8.setText("\u65c5\u884c\u65f6\u95f4");

        from.setBackground(new java.awt.Color(204, 204, 255));

        jLabel6.setText("\u51fa\u53d1\u5730");

        ID.setBackground(new java.awt.Color(204, 204, 255));

        jLabel5.setText("\u8eab\u4efd\u8bc1");

        female.setBackground(new java.awt.Color(204, 204, 255));
        female.setText("\u5973");
        female.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        female.setMargin(new java.awt.Insets(0, 0, 0, 0));
        female.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                femaleItemStateChanged(evt);
            }
        });

        man.setBackground(new java.awt.Color(204, 204, 255));
        man.setSelected(true);
        man.setText("\u7537");
        man.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        man.setMargin(new java.awt.Insets(0, 0, 0, 0));
        man.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                manItemStateChanged(evt);
            }
        });

        jLabel3.setText("\u6027\u522b");

        name.setBackground(new java.awt.Color(204, 204, 255));

        jLabel2.setText("\u59d3\u540d");

        jLabel1.setFont(new java.awt.Font("宋体", 1, 24));
        jLabel1.setForeground(new java.awt.Color(204, 0, 0));
        jLabel1.setText("\u8bf7\u8f93\u5165\u7528\u6237\u4fe1\u606f");

        jButton3.setBackground(new java.awt.Color(204, 255, 204));
        jButton3.setText("\u6e05\u7a7a");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        jButton1.setBackground(new java.awt.Color(204, 255, 204));
        jButton1.setText("\u6dfb\u52a0");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButton2.setBackground(new java.awt.Color(204, 255, 204));
        jButton2.setText("\u67e5\u8be2");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(123, 123, 123)
                        .add(female)
                        .addContainerGap(258, Short.MAX_VALUE))
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                            .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel1)
                            .add(jPanel1Layout.createSequentialGroup()
                                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(jLabel5)
                                    .add(jLabel3)
                                    .add(jLabel2))
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 35, Short.MAX_VALUE)
                                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(man)
                                    .add(ID, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 107, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(name, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 65, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                        .addContainerGap(232, Short.MAX_VALUE))
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabel8)
                            .add(jLabel7)
                            .add(jLabel6)
                            .add(jLabel9))
                        .add(10, 10, 10)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jPanel1Layout.createSequentialGroup()
                                .add(from, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)
                                .add(192, 192, 192))
                            .add(jPanel1Layout.createSequentialGroup()
                                .add(to, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 59, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addContainerGap(293, Short.MAX_VALUE))
                            .add(jPanel1Layout.createSequentialGroup()
                                .add(time, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 192, Short.MAX_VALUE)
                                .add(160, 160, 160))
                            .add(jPanel1Layout.createSequentialGroup()
                                .add(type, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addContainerGap())))))
            .add(jPanel1Layout.createSequentialGroup()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -