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

📄 helloframe.java~9~

📁 文件加密软件
💻 JAVA~9~
字号:
package com.borland.samples.welcome;

import javax.swing.*;
import java.awt.FlowLayout;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2006</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class Helloframe
    extends JFrame {
  public Helloframe() {
    System.out.println(System.currentTimeMillis());
    init();
    try {
      jbInit();
    }
    catch (Exception ex) {
      ex.printStackTrace();
    }
  }
  void init(){
    FlowLayout fl = new FlowLayout();
    JLabel j = new JLabel("hello word");
    JTextField jtf = new JTextField("          ");

    this.getContentPane().setLayout(fl);
    this.add(j);
    this.add(jtf);
    this.setSize(100,100);
    this.show(true);
  }

  private void jbInit() throws Exception {
    jTextArea1.setText("jTextArea1");
    this.getContentPane().add(jTextArea1);
    this.getContentPane().add(jButton1);
    jButton1.setText("jButton1");
    jButton1.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton1_actionPerformed(e);
      }
    });
  }

  JTextArea jTextArea1 = new JTextArea();
  JButton jButton1 = new JButton();
  public void jButton1_actionPerformed(ActionEvent e) {
    System.out.println(JOptionPane.showConfirmDialog(null, "输入次数已过", "提示",
					JOptionPane.CANCEL_OPTION));
  }
}

⌨️ 快捷键说明

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