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

📄 frame1.java~80~

📁 该文件中包含有源代码及一部分的文档,该系统是一个小型的英语单词字典的系统.
💻 JAVA~80~
字号:
package english;

import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.*;
import java.awt.Color;
import java.awt.GridBagLayout;
import java.awt.*;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import com.borland.dx.sql.dataset.Database;
import com.borland.dx.sql.dataset.ConnectionDescriptor;


public class Frame1 extends JFrame {
    JPanel contentPane;
    BorderLayout borderLayout1 = new BorderLayout();
    JMenuBar jMenuBar1 = new JMenuBar();
    JMenu jMenuFile = new JMenu();
    JMenuItem jMenuFileExit = new JMenuItem();
    JToolBar jToolBar = new JToolBar();
    JButton jButton1 = new JButton();
    JButton jButton2 = new JButton();
    JButton jButton3 = new JButton();
    ImageIcon image1 = new ImageIcon(english.Frame1.class.getResource(
            "openFile.png"));
    ImageIcon image2 = new ImageIcon(english.Frame1.class.getResource(
            "closeFile.png"));
    ImageIcon image3 = new ImageIcon(english.Frame1.class.getResource(
            "help.png"));
    JTabbedPane jTabbedPane1 = new JTabbedPane();
    JPanel jPanel1 = new JPanel();
    JPanel jPanel2 = new JPanel();
    JPanel jPanel3 = new JPanel();
    JPanel jPanel4 = new JPanel();
    JPanel jPanel5 = new JPanel();
    BorderLayout borderLayout2 = new BorderLayout();
    BorderLayout borderLayout3 = new BorderLayout();
    BorderLayout borderLayout4 = new BorderLayout();
    BorderLayout borderLayout5 = new BorderLayout();
    BorderLayout borderLayout6 = new BorderLayout();
    JPanel jPanel6 = new JPanel();
    JEditorPane jEditorPane1 = new JEditorPane();
    JScrollPane jScrollPane1 = new JScrollPane(jEditorPane1,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                  JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    JPanel jPanel7 = new JPanel();
    JEditorPane jEditorPane2 = new JEditorPane();
    JScrollPane jScrollPane2 = new JScrollPane(jEditorPane2,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                  JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    JPanel jPanel8 = new JPanel();
    JEditorPane jEditorPane3 = new JEditorPane();
    JScrollPane jScrollPane3 = new JScrollPane(jEditorPane3,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                  JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    JPanel jPanel9 = new JPanel();
    JEditorPane jEditorPane4 = new JEditorPane();
    JScrollPane jScrollPane4 = new JScrollPane(jEditorPane4,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                  JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    JPanel jPanel10 = new JPanel();
    JEditorPane jEditorPane5 = new JEditorPane();
    JScrollPane jScrollPane5 = new JScrollPane(jEditorPane5,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                  JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    XYLayout xYLayout1 = new XYLayout();
    JPanel jPanel11 = new JPanel();
    JButton jButton4 = new JButton();
    JButton jButton5 = new JButton();
    XYLayout xYLayout2 = new XYLayout();
    XYLayout xYLayout3 = new XYLayout();
    JPanel jPanel12 = new JPanel();
    XYLayout xYLayout4 = new XYLayout();
    JButton jButton6 = new JButton();
    JButton jButton7 = new JButton();
    XYLayout xYLayout5 = new XYLayout();
    JPanel jPanel13 = new JPanel();
    JButton jButton8 = new JButton();
    JButton jButton9 = new JButton();
    XYLayout xYLayout6 = new XYLayout();
    XYLayout xYLayout7 = new XYLayout();
    JPanel jPanel14 = new JPanel();
    JButton jButton10 = new JButton();
    JButton jButton11 = new JButton();
    XYLayout xYLayout8 = new XYLayout();
    XYLayout xYLayout9 = new XYLayout();
    JPanel jPanel15 = new JPanel();
    JButton jButton12 = new JButton();
    JButton jButton13 = new JButton();
    XYLayout xYLayout10 = new XYLayout();
    Database database1 = new Database();
    JComboBox jComboBox1 = new JComboBox();
    JPanel jPanel16 = new JPanel();
    JScrollPane jScrollPane6 = new JScrollPane();
    JTextArea jTextArea1 = new JTextArea();
    XYLayout xYLayout11 = new XYLayout();
    public Frame1() {
        try {
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            jbInit();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }

    /**
     * Component initialization.
     *
     * @throws java.lang.Exception
     */
    private void jbInit() throws Exception {
        contentPane = (JPanel) getContentPane();
        contentPane.setLayout(borderLayout1);
        setSize(new Dimension(400, 300));
        setTitle("懒人学英语");
        jMenuFile.setText("File");
        jMenuFileExit.setText("Exit");
        jMenuFileExit.addActionListener(new Frame1_jMenuFileExit_ActionAdapter(this));
        database1.setConnection(new ConnectionDescriptor(
                "jdbc:odbc:odbcDataSource", "sa", "", false,
                "sun.jdbc.odbc.JdbcOdbcDriver"));
        jMenuBar1.add(jMenuFile);
        jMenuFile.add(jMenuFileExit);
        setJMenuBar(jMenuBar1);
        jButton1.setIcon(image1);
        jButton1.setToolTipText("Open File");
        jButton2.setIcon(image2);
        jButton2.setToolTipText("Close File");
        jButton3.setIcon(image3);
        jButton3.setToolTipText("Help");
        jPanel2.setLayout(borderLayout3);
        jPanel1.setLayout(borderLayout2);
        jPanel2.setLayout(borderLayout3);
        jPanel3.setLayout(borderLayout4);
        jPanel4.setLayout(borderLayout5);
        jPanel5.setLayout(borderLayout6);
        jEditorPane1.setPreferredSize(new Dimension(300, 50));
        jEditorPane1.setText("jEditorPane1");
        jEditorPane2.setPreferredSize(new Dimension(340, 50));
        jEditorPane2.setText("jEditorPane2");
        jEditorPane3.setPreferredSize(new Dimension(340, 50));
        jEditorPane3.setText("jEditorPane3");
        jEditorPane4.setPreferredSize(new Dimension(340, 50));
        jEditorPane4.setText("jEditorPane4");
        jEditorPane5.setPreferredSize(new Dimension(340, 50));
        jEditorPane5.setText("jEditorPane5");
        jPanel6.setLayout(xYLayout1);
        jButton4.setText("重置");
        jButton5.setText("保存");
        jPanel11.setLayout(xYLayout2);
        jPanel7.setLayout(xYLayout3);
        jPanel12.setLayout(xYLayout4);
        jButton6.setText("保存");
        jButton7.setText("重置");
        jPanel8.setLayout(xYLayout5);
        jButton8.setText("重置");
        jButton9.setText("保存");
        jPanel13.setLayout(xYLayout6);
        jPanel9.setLayout(xYLayout7);
        jButton10.setText("重置");
        jButton11.setText("保存");
        jPanel14.setLayout(xYLayout8);
        jPanel10.setLayout(xYLayout9);
        jButton12.setText("重置");
        jButton13.setText("保存");
        jPanel15.setLayout(xYLayout10);
        jScrollPane3.setPreferredSize(new Dimension(319, 69));
        jTextArea1.setText("jTextArea1");
        jPanel16.setLayout(xYLayout11);
        jToolBar.add(jButton1);
        jToolBar.add(jButton2);
        jToolBar.add(jButton3);
        contentPane.add(jTabbedPane1, java.awt.BorderLayout.CENTER);
        contentPane.add(jToolBar, BorderLayout.NORTH);
        jTabbedPane1.add(jPanel1, "\u53e3\u8bed\u7ec3\u4e60");
        jPanel1.add(jPanel6, java.awt.BorderLayout.SOUTH);
        jPanel7.add(jScrollPane2, new XYConstraints(2, 0, 312, 76));
        jPanel7.add(jPanel12, new XYConstraints(321, 4, 66, 68));
        jScrollPane2.getViewport().add(jEditorPane2);
        jPanel12.add(jButton6, new XYConstraints(4, 0, 62, 31));
        jPanel12.add(jButton7, new XYConstraints(5, 37, 62, 29));
        jTabbedPane1.add(jPanel3, "\u8bcd\u8bed\u63a5\u9f99");
        jPanel3.add(jPanel8, java.awt.BorderLayout.SOUTH);
        jPanel13.add(jButton9, new XYConstraints(8, 6, 63, 29));
        jPanel13.add(jButton8, new XYConstraints(9, 39, 62, 31));
        jPanel8.add(jScrollPane3, new XYConstraints(3, 3, 310, 75));
        jTabbedPane1.add(jPanel4, "\u6b4c\u66f2\u70b9\u64ad");
        jPanel4.add(jPanel9, java.awt.BorderLayout.SOUTH);
        jScrollPane3.getViewport().add(jEditorPane3);
        jPanel8.add(jPanel13, new XYConstraints(318, 1, 73, 72));
        jPanel14.add(jButton11, new XYConstraints(9, 2, 61, 29));
        jPanel14.add(jButton10, new XYConstraints(11, 40, 59, 29));
        jPanel9.add(jScrollPane4, new XYConstraints(4, 0, 305, 84));
        jTabbedPane1.add(jPanel5, "\u914d\u97f3\u79c0");
        jPanel5.add(jPanel10, java.awt.BorderLayout.SOUTH);
        jScrollPane4.getViewport().add(jEditorPane4);
        jPanel9.add(jPanel14, new XYConstraints(315, 5, 78, 68));
        jPanel10.add(jScrollPane5, new XYConstraints(5, 0, 298, 87));
        jPanel10.add(jPanel15, new XYConstraints(314, 0, 76, 80));
        jScrollPane5.getViewport().add(jEditorPane5);
        jPanel15.add(jButton13, new XYConstraints(10, 3, 64, 29));
        jPanel15.add(jButton12, new XYConstraints(12, 42, 60, 28));
        jPanel11.add(jButton5, new XYConstraints(5, 2, 60, 27));
        jPanel11.add(jButton4, new XYConstraints(6, 32, 61, 30));
        jPanel1.add(jPanel16, java.awt.BorderLayout.CENTER);
        jScrollPane6.getViewport().add(jTextArea1);
        jPanel6.add(jScrollPane1, new XYConstraints(4, 11, 312, 68));
        jTabbedPane1.add(jPanel2, "\u6210\u8bed\u6545\u4e8b");
        jPanel2.add(jPanel7, java.awt.BorderLayout.SOUTH);
        jScrollPane1.getViewport().add(jEditorPane1);
        jPanel6.add(jPanel11, new XYConstraints(321, 7, -1, 63));
        jPanel16.add(jScrollPane6, new XYConstraints(8, 5, 366, 164));
    }


void jMenuFileExit_actionPerformed(ActionEvent actionEvent) {
        System.exit(0);
   }
}
class Frame1_jMenuFileExit_ActionAdapter implements ActionListener {
    Frame1 adaptee;

    Frame1_jMenuFileExit_ActionAdapter(Frame1 adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent actionEvent) {
        adaptee.jMenuFileExit_actionPerformed(actionEvent);
    }
}



⌨️ 快捷键说明

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