?? 按鈕.java
字號:
/*
* 按鈕.java
*
* Created on 2007年8月22日, 下午8:20
*/
package org;
/**
*
* @author 法軍濤
*/
public class 按鈕 extends javax.swing.JFrame {
/** Creates new form 按鈕 */
public 按鈕() {
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() {
jButtonEnter = new javax.swing.JButton();
jButtonCancel = new javax.swing.JButton();
jLabelMessage = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jButtonEnter.setText("\u786e\u5b9a");
jButtonEnter.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonEnterActionPerformed(evt);
}
});
jButtonCancel.setText("\u53d6\u6d88");
jButtonCancel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonCancelActionPerformed(evt);
}
});
jLabelMessage.setFont(new java.awt.Font("宋體", 0, 25));
jLabelMessage.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabelMessage.setText("\u7528\u6237\u8fd8\u6ca1\u6709\u6309\u4e0b\u6309\u94ae");
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
.add(103, 103, 103)
.add(jButtonEnter)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 84, Short.MAX_VALUE)
.add(jButtonCancel))
.add(layout.createSequentialGroup()
.addContainerGap(122, Short.MAX_VALUE)
.add(jLabelMessage)))
.add(95, 95, 95))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.add(74, 74, 74)
.add(jLabelMessage)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 81, Short.MAX_VALUE)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jButtonEnter)
.add(jButtonCancel))
.add(88, 88, 88))
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void jButtonCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCancelActionPerformed
// TODO 將在此處添加您的處理代碼:
this.jLabelMessage.setText("你單擊了取消按鈕!");
}//GEN-LAST:event_jButtonCancelActionPerformed
private void jButtonEnterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonEnterActionPerformed
// TODO 將在此處添加您的處理代碼:
this.jLabelMessage.setText("你單擊了確定按鈕!");
}//GEN-LAST:event_jButtonEnterActionPerformed
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new 按鈕().setVisible(true);
}
});
}
// 變量聲明 - 不進行修改//GEN-BEGIN:variables
private javax.swing.JButton jButtonCancel;
private javax.swing.JButton jButtonEnter;
private javax.swing.JLabel jLabelMessage;
// 變量聲明結束//GEN-END:variables
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -