该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
谢谢你 我想知道这个代码每一行都是手写的吗 我的意思是说用NetBeans直接添加事件 只要少写一小部分代码就可了 手写的代码怎么添加 下面是我用NetBeans画出界面生成的原代码: (希望能懂我的意思 呵呵)
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* NewJFrame.java
*
* Created on 2010-5-7, 13:52:11
*/
package Frame;
/**
*
* @author user
*/
public class NewJFrame extends javax.swing.JFrame {
/** Creates new form NewJFrame */
public NewJFrame() {
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")
//
private void initComponents() {
jPasswordField2 = new javax.swing.JPasswordField();
jTextField2 = new javax.swing.JTextField();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
jTextField1 = new javax.swing.JTextField();
jButton2 = new javax.swing.JButton();
org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(desktopapplication4.DesktopApplication4.class).getContext().getResourceMap(NewJFrame.class);
jPasswordField2.setText(resourceMap.getString("jPasswordField2.text")); // NOI18N
jPasswordField2.setName("jPasswordField2"); // NOI18N
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setName("Form"); // NOI18N
jTextField2.setText(resourceMap.getString("jTextField2.text")); // NOI18N
jTextField2.setName("jTextField2"); // NOI18N
jTextField2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {