?? 容器.java
字號:
/*
* 容器.java
*
* Created on 2007年8月22日, 下午7:53
*/
package org;
import javax.swing.SwingConstants;
import javax.swing.SwingConstants;
/**
*
* @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() {
jLabelImage = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabelImage.setIcon(new javax.swing.ImageIcon("E:\\我的圖片\\photoshop\\2.jpg"));
jLabelImage.setText("\u6f14\u793a\u56fe\u7247");
jLabelImage.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jLabelImageMouseClicked(evt);
}
public void mouseEntered(java.awt.event.MouseEvent evt) {
jLabelImageMouseEntered(evt);
}
public void mouseExited(java.awt.event.MouseEvent evt) {
jLabelImageMouseExited(evt);
}
});
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(jLabelImage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 675, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(128, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(jLabelImage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 477, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap(52, Short.MAX_VALUE))
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void jLabelImageMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabelImageMouseExited
// TODO 將在此處添加您的處理代碼:
this.jLabelImage.setVerticalTextPosition(SwingConstants.CENTER);
}//GEN-LAST:event_jLabelImageMouseExited
private void jLabelImageMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabelImageMouseEntered
// TODO 將在此處添加您的處理代碼:
this.jLabelImage.setVerticalTextPosition(SwingConstants.BOTTOM);
}//GEN-LAST:event_jLabelImageMouseEntered
private void jLabelImageMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabelImageMouseClicked
// TODO 將在此處添加您的處理代碼:
this.jLabelImage.setVerticalTextPosition(SwingConstants.TOP);
}//GEN-LAST:event_jLabelImageMouseClicked
/**
* @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.JLabel jLabelImage;
// 變量聲明結束//GEN-END:variables
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -