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

📄 loginframe.java

📁 This book code procedure according to the chapter arrangement, the 1st chapter of example under "1"
💻 JAVA
字号:
/* * LoginFrame.java * * Created on 2005年11月23日, 下午10:48 */package gui;/** * * @author  Admin */public class LoginFrame extends javax.swing.JFrame {        /** Creates new form LoginFrame */    public LoginFrame() {        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() {        jlUser = new javax.swing.JLabel();        jt1 = new javax.swing.JTextField();        jlPwd = new javax.swing.JLabel();        jt2 = new javax.swing.JPasswordField();        jButton1 = new javax.swing.JButton();        jButton2 = new javax.swing.JButton();        getContentPane().setLayout(new java.awt.GridLayout(3, 2));        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);        jlUser.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);        jlUser.setText("User\uff1a");        jlUser.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);        getContentPane().add(jlUser);        getContentPane().add(jt1);        jlPwd.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);        jlPwd.setText("Password\uff1a");        getContentPane().add(jlPwd);        jt2.setEchoChar('\u25cf');        getContentPane().add(jt2);        jButton1.setFont(new java.awt.Font("Dialog", 1, 14));        jButton1.setText("Login");        getContentPane().add(jButton1);        jButton2.setFont(new java.awt.Font("Dialog", 1, 14));        jButton2.setText("Cancel");        getContentPane().add(jButton2);        pack();    }    // </editor-fold>//GEN-END:initComponents        /**     * @param args the command line arguments     */    public static void main(String args[]) {        java.awt.EventQueue.invokeLater(new Runnable() {            public void run() {                new LoginFrame().setVisible(true);            }        });    }        // 变量声明 - 不进行修改//GEN-BEGIN:variables    private javax.swing.JButton jButton1;    private javax.swing.JButton jButton2;    private javax.swing.JLabel jlPwd;    private javax.swing.JLabel jlUser;    private javax.swing.JTextField jt1;    private javax.swing.JPasswordField jt2;    // 变量声明结束//GEN-END:variables    }

⌨️ 快捷键说明

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