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

📄 replaceframe.java

📁 本设计基本上能够实现了课题的要求
💻 JAVA
字号:
package my;import java.awt.*;import java.awt.event.*;import javax.swing.*;import com.borland.jbcl.layout.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2006</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class ReplaceFrame extends JFrame {  JPanel contentPane;  XYLayout xYLayout1 = new XYLayout();  JLabel jLabel1 = new JLabel();  JScrollPane jScrollPane1 = new JScrollPane();  JTextArea jTextArea1 = new JTextArea();  JLabel jLabel2 = new JLabel();  JScrollPane jScrollPane2 = new JScrollPane();  JTextArea jTextArea2 = new JTextArea();  JButton jButton1 = new JButton();  JScrollPane jScrollPane3 = new JScrollPane();  JTextArea jTextArea3 = new JTextArea();  JLabel jLabel3 = new JLabel();   Caeser1 Dom = new Caeser1();  //Construct the frame  public ReplaceFrame() {    enableEvents(AWTEvent.WINDOW_EVENT_MASK);    try {      jbInit();    }    catch(Exception e) {      e.printStackTrace();    }  }  //Component initialization  private void jbInit() throws Exception  {    contentPane = (JPanel) this.getContentPane();    jLabel1.setFont(new java.awt.Font("隶书", 1, 15));    jLabel1.setForeground(Color.blue);    jLabel1.setText("请输入密文:");    contentPane.setMinimumSize(new Dimension(382, 284));    contentPane.setOpaque(true);    contentPane.setLayout(xYLayout1);    this.setSize(new Dimension(400, 400));    this.setTitle("代入法解密 ");    jLabel2.setFont(new java.awt.Font("隶书", 1, 15));    jLabel2.setForeground(new Color(255, 159, 228));    jLabel2.setText("解密结果:");    jButton1.setBackground(Color.orange);    jButton1.setFont(new java.awt.Font("隶书", 0, 15));    jButton1.setText("开始解密");    jButton1.addActionListener(new ReplaceFrame_jButton1_actionAdapter(this));    jLabel3.setFont(new java.awt.Font("隶书", 1, 15));    jLabel3.setForeground(new Color(138, 255, 0));    jLabel3.setText("分析说明:");    jTextArea1.setText("");    jTextArea2.setText("");    contentPane.add(jScrollPane1,   new XYConstraints(31, 47, 149, 106));    contentPane.add(jScrollPane2,  new XYConstraints(222, 46, 160, 110));    contentPane.add(jButton1, new XYConstraints(150, 169, 101, 28));    contentPane.add(jScrollPane3,    new XYConstraints(53, 220, 321, 104));    jScrollPane3.getViewport().add(jTextArea3, null);    contentPane.add(jLabel3,      new XYConstraints(58, 193, 76, 24));    contentPane.add(jLabel1, new XYConstraints(18, 16, 143, 28));    contentPane.add(jLabel2, new XYConstraints(210, 17, 103, 25));    jScrollPane2.getViewport().add(jTextArea2, null);    jScrollPane1.getViewport().add(jTextArea1, null);  }  //Overridden so we can exit when window is closed  protected void processWindowEvent(WindowEvent e) {    super.processWindowEvent(e);    if (e.getID() == WindowEvent.WINDOW_CLOSING) {      //System.exit(0);      dispose();    }  }  void jButton1_actionPerformed(ActionEvent e) {    String s = jTextArea1.getText();    Dom.SetText(s);    Dom.C_HDecode(2);    jTextArea2.setText(Dom.getout());    jTextArea3.setText(Dom.getexplain());  }}class ReplaceFrame_jButton1_actionAdapter implements java.awt.event.ActionListener {  ReplaceFrame adaptee;  ReplaceFrame_jButton1_actionAdapter(ReplaceFrame adaptee) {    this.adaptee = adaptee;  }  public void actionPerformed(ActionEvent e) {    adaptee.jButton1_actionPerformed(e);  }}

⌨️ 快捷键说明

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