📄 mainapplet.java
字号:
package view;import java.awt.*;import java.awt.event.*;import java.applet.*;import com.borland.jbcl.layout.*;import javax.swing.*;import operation.*;import operation.*;import helper.*;import brgeometry.*;import com.versant.fund.*;import com.versant.trans.*;public class mainApplet extends Applet { static TransSession session = new TransSession("mydb"); private boolean isStandalone = false; private XYLayout xYLayout1 = new XYLayout(); private JButton jButton1 = new JButton(); private JLabel jLabel1 = new JLabel(); private JButton jButton2 = new JButton(); private JButton jButton3 = new JButton(); private JButton jButton4 = new JButton(); private JButton jButton5 = new JButton(); private JList jList1 = new JList(); private JLabel jLabel2 = new JLabel(); //Get a parameter value public String getParameter(String key, String def) { return isStandalone ? System.getProperty(key, def) : (getParameter(key) != null ? getParameter(key) : def); } //Construct the applet public mainApplet() { } //Initialize the applet public void init() { try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } //Component initialization public void setJtable(){ } private void jbInit() throws Exception { jButton1.setBackground(SystemColor.inactiveCaptionText); jButton1.setBorder(BorderFactory.createLineBorder(Color.black)); jButton1.setText("修改"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { jButton1_actionPerformed(e); } }); this.setLayout(xYLayout1); jLabel1.setBackground(Color.white); jLabel1.setFont(new java.awt.Font("Dialog", 1, 20)); jLabel1.setForeground(Color.red); jLabel1.setBorder(BorderFactory.createEtchedBorder()); jLabel1.setText("面向对象数据库边界表示法的实现"); jButton2.setBackground(SystemColor.inactiveCaptionText); jButton2.setBorder(BorderFactory.createLineBorder(Color.black)); jButton2.setText("删除"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { jButton2_actionPerformed(e); } }); jButton3.setBackground(SystemColor.inactiveCaptionText); jButton3.setBorder(BorderFactory.createLineBorder(Color.black)); jButton3.setText("添加"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { jButton3_actionPerformed(e); } }); jButton4.setBackground(SystemColor.inactiveCaptionText); jButton4.setBorder(BorderFactory.createLineBorder(Color.black)); jButton4.setText("查询"); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { jButton4_actionPerformed(e); } }); xYLayout1.setWidth(546); xYLayout1.setHeight(396); jButton5.setBackground(SystemColor.inactiveCaptionText); jButton5.setEnabled(false); jButton5.setBorder(BorderFactory.createLineBorder(Color.black)); jButton5.setText("帮助"); this.setBackground(SystemColor.info); jLabel2.setIcon(new ImageIcon(new java.net.URL("file:///E:/brGeometry2.1/main1.jpg"))); this.add(jList1, new XYConstraints(185, 55, -1, -1)); this.add(jLabel1, new XYConstraints(41, 46, 317, 49)); this.add(jButton3, new XYConstraints(43, 105, 69, 33)); this.add(jButton2, new XYConstraints(43, 143, 69, 33)); this.add(jButton1, new XYConstraints(45, 180, 69, 29)); this.add(jButton4, new XYConstraints(44, 214, 69, 29)); this.add(jButton5, new XYConstraints(45, 250, 69, 29)); this.add(jLabel2, new XYConstraints(117, 99, 319, 189)); } //Get Applet information public String getAppletInfo() { return "这是一个关于边界表示法的面向对象数据库的实现的应用"; } //Get parameter info public String[][] getParameterInfo() { return null; } void jButton3_actionPerformed(ActionEvent e) { AddDialog addDialog= new AddDialog(); addDialog.show(); } void jButton2_actionPerformed(ActionEvent e) { DeleteDialog deleteDialog= new DeleteDialog (); deleteDialog.show(); } void jButton1_actionPerformed(ActionEvent e) { ModifyDialog modifyDialog =new ModifyDialog(); modifyDialog .show(); } void jButton4_actionPerformed(ActionEvent e) { requireDialog rq=new requireDialog(); rq.show(); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -