专业语言:简易图片浏览器

文章作者 100test 发表时间 2007:09:06 11:53:10
来源 100Test.Com百考试题网


/**
*
* @author new
*/
import java.awt.event.*.
import javax.swing.*.
import java.awt.*.
import java.io.*.

public class PictureFrame extends javax.swing.JFrame {

/** Creates new form PictureFrame */
public PictureFrame() {
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.
*/
//
private void initComponents() {
jPopupMenu1 = new javax.swing.JPopupMenu().
jPanel2 = new javax.swing.JPanel().
jLabel1 = new javax.swing.JLabel().
jButton1 = new javax.swing.JButton().
jButton2 = new javax.swing.JButton().
jMenuBar1 = new javax.swing.JMenuBar().
jMenu1 = new javax.swing.JMenu().
jMenuItem1 = new javax.swing.JMenuItem().
jMenuItem2 = new javax.swing.JMenuItem().
jMenuItem4 = new javax.swing.JMenuItem().
jMenu2 = new javax.swing.JMenu().
jMenuItem5 = new javax.swing.JMenuItem().
jMenuItem6 = new javax.swing.JMenuItem().

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE).
setTitle("PictureView Manager").
setBackground(new java.awt.Color(255, 255, 255)).
setBounds(new java.awt.Rectangle(200, 50, 500, 500)).
setMaximizedBounds(new java.awt.Rectangle(100, 200, 800, 800)).
setState(1).
jPanel2.setEnabled(false).
jLabel1.setIcon(new javax.swing.ImageIcon(".\\115.jpg")).
jLabel1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(255, 0, 0))).

jButton1.setText("\u7ee7\u7eed\u6d4f\u89c8").
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
JButton1Listener(evt).
}
}).

jButton2.setText("\u53d6\u6d88\u6d4f\u89c8").
jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton2MouseClicked(evt).
}
}).

javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2).
jPanel2.setLayout(jPanel2Layout).
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 417, Short.MAX_VALUE)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(88, 88, 88)
.addComponent(jButton1)
.addGap(60, 60, 60)
.addComponent(jButton2)
.addContainerGap(107, Short.MAX_VALUE))
).
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 559, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1)
.addComponent(jButton2))
.addContainerGap())
).

jMenu1.setText("\u6587\u4ef6(F)").
jMenuItem1.setText("\u65b0\u5efa(N)").
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
MenuItem1Listener(evt).
}
}).

jMenu1.add(jMenuItem1).

jMenuItem2.setText("\u6253\u5f00(O)").
jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
MenuItem2Listener(evt).
}
}).

jMenu1.add(jMenuItem2).

jMenuItem4.setText("\u9000\u51fa(E)").
jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
MenuItem4Listener(evt).
}
}).

jMenu1.add(jMenuItem4).

jMenuBar1.add(jMenu1).

jMenu2.setText("\u5e2e\u52a9(H)").
jMenuItem5.setText("\u5173\u4e8e(about)").
jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
aboutListener(evt).
}
}).

jMenu2.add(jMenuItem5).

/* jMenuItem6.setText("\u58f0\u660e(Declear)").
jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem6(evt).
}
}).



相关文章


运用JakartaStruts的七大实战心法
用Java实现几种常见的排序算法
MouseListener的实践例子
柏林墙还没有倒下论EJB的企业梦
专业语言:简易图片浏览器
JDK1.5编译中的一个奇怪问题
JDK6.0的新特性:轻量级Htt erver
强强携手将AJAX带入Ecli e
JavaSE6基于JSR105的XML签名之理论篇
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛