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

📄 lookandfeeldemo.java

📁 精通JBuilder2006 源代码 精通JBuilder2006 源代码
💻 JAVA
字号:
package chapter6.uidesigner;

import javax.swing.*;
import java.awt.BorderLayout;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import javax.swing.border.TitledBorder;
import java.awt.Color;
import java.awt.Insets;
import javax.swing.BorderFactory;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class LookAndFeelDemo extends JFrame{
    public LookAndFeelDemo() {
        try {
            jbInit();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

    private void jbInit() throws Exception {
        this.getContentPane().setLayout(xYLayout1);
        jPanel1.setLayout(xYLayout2);
        jLabel1.setText("jLabel1");
        jTextField1.setText("jTextField1");
        jCheckBox1.setText("jCheckBox1");
        jTextArea1.setBackground(Color.white);
        jTextArea1.setBorder(titledBorder1);
        jTextArea1.setText("jTextArea1");
        jPasswordField1.setText("jPasswordField1");
        xYLayout1.setWidth(343);
        xYLayout1.setHeight(332);
        jButton1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 11));
        jButton1.setForeground(Color.red);
        jButton1.addActionListener(new LookAndFeelDemo_jButton1_actionAdapter(this));
        jPanel1.add(jCheckBox1, new XYConstraints(30, 87, 100, 24));
        jPanel1.add(jLabel1, new XYConstraints(36, 34, 80, 29));
        jPanel1.add(jSlider1, new XYConstraints(30, 131, 88, 26));
        jPanel1.add(jProgressBar1, new XYConstraints(37, 186, 98, 20));
        jPanel1.add(jScrollBar1, new XYConstraints(37, 227, 89, 43));
        jPanel1.add(jPasswordField1, new XYConstraints(184, 89, 97, -1));
        jPanel1.add(jTextField1, new XYConstraints(184, 34, 97, 31));
        jPanel1.add(jComboBox1, new XYConstraints(184, 132, 97, 21));
        jPanel1.add(jButton1, new XYConstraints(184, 180, 97, -1));
        jPanel1.add(jTextArea1, new XYConstraints(183, 227, 98, 48));
        this.getContentPane().add(jPanel1, new XYConstraints(4, 12, 333, 318));
        jButton1.setText("jButton1");
    }

    XYLayout xYLayout1 = new XYLayout();
    JPanel jPanel1 = new JPanel();
    XYLayout xYLayout2 = new XYLayout();
    JButton jButton1 = new JButton();
    JLabel jLabel1 = new JLabel();
    JTextField jTextField1 = new JTextField();
    JComboBox jComboBox1 = new JComboBox();
    TitledBorder titledBorder1 = new TitledBorder("");
    JCheckBox jCheckBox1 = new JCheckBox();
    JTextArea jTextArea1 = new JTextArea();
    JPasswordField jPasswordField1 = new JPasswordField();
    JSlider jSlider1 = new JSlider();
    JProgressBar jProgressBar1 = new JProgressBar();
    JScrollBar jScrollBar1 = new JScrollBar();
    TitledBorder titledBorder2 = new TitledBorder("");
    public void jButton1_actionPerformed(ActionEvent e) {

    }
}


class LookAndFeelDemo_jButton1_actionAdapter implements ActionListener {
    private LookAndFeelDemo adaptee;
    LookAndFeelDemo_jButton1_actionAdapter(LookAndFeelDemo adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jButton1_actionPerformed(e);
    }
}

⌨️ 快捷键说明

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