?? replaceframe.java~5~
字號:
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(); //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.setOpaque(true); contentPane.setLayout(xYLayout1); this.setSize(new Dimension(400, 300)); 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("開始解密"); jLabel3.setFont(new java.awt.Font("隸書", 1, 15)); jLabel3.setForeground(new Color(138, 255, 0)); jLabel3.setText("分析說明:"); jTextArea1.setText(""); jTextArea2.setText(""); contentPane.add(jLabel1, new XYConstraints(38, 15, 143, 28)); contentPane.add(jScrollPane1, new XYConstraints(47, 47, 133, 106)); contentPane.add(jLabel2, new XYConstraints(237, 19, 103, 25)); contentPane.add(jScrollPane2, new XYConstraints(229, 46, 153, 110)); contentPane.add(jButton1, new XYConstraints(150, 169, 101, 28)); contentPane.add(jScrollPane3, new XYConstraints(53, 220, 315, 64)); contentPane.add(jLabel3, new XYConstraints(58, 193, 76, 24)); jScrollPane3.getViewport().add(jTextArea3, null); 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(); } }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -