?? dreplace.java
字號:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package xechanger;import java.awt.FlowLayout;import java.awt.GridLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JButton;import javax.swing.JCheckBox;import javax.swing.JDialog;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JPanel;import javax.swing.JTextField;/** * * @author Chohei */public class DReplace extends JDialog { private JTextField bbf; private JTextField aaf; private JLabel lb1; private JLabel lb2; private JCheckBox repa; private JPanel inpn; private JPanel lin1; private JPanel lin2; private JPanel lin3; private JPanel lin4; private JButton jbOK; private JButton jbCL; private boolean sts; public DReplace(JFrame aFrame) { super(aFrame, true); sts = false; bbf = new JTextField(20); aaf = new JTextField(20); lb1 = new JLabel("查 找:"); lb2 = new JLabel("替換為:"); jbOK = new JButton("替換"); jbCL = new JButton("取消"); repa = new JCheckBox("每個文件只替換一次"); setTitle("替換"); FlowLayout flv = new FlowLayout(FlowLayout.CENTER, 10, 5); inpn = new JPanel(); lin1 = new JPanel(flv); lin2 = new JPanel(flv); lin4 = new JPanel(flv); lin3 = new JPanel(flv); inpn.setLayout(new GridLayout(4, 1, 0, 0)); lin1.add(lb1); lin1.add(bbf); lin2.add(lb2); lin2.add(aaf); lin3.add(repa); lin4.add(jbOK); lin4.add(jbCL); inpn.add(lin1); inpn.add(lin2); inpn.add(lin3); inpn.add(lin4); setContentPane(inpn); this.setResizable(false); jbCL.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { clClick(e); } }); jbOK.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { okClick(e); } }); } private void clClick(ActionEvent e) { sts = false; this.setVisible(false); } private void okClick(ActionEvent e) { sts = true; this.setVisible(false); } public String getBef() { return bbf.getText(); } public String getAft() { return aaf.getText(); } public boolean isOnce() { return repa.isSelected(); } public boolean isOK() { return sts; }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -