📄 dialoginputtext.java~11~
字号:
package propertyproj;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class DialogInputText extends JDialog {
JPanel panel1 = new JPanel();
BorderLayout borderLayout1 = new BorderLayout();
JTextArea jTextArea1 = new JTextArea();
public DialogInputText(Frame frame, String title, boolean modal) {
super(frame, title, modal);
try {
jbInit();
pack();
}
catch(Exception ex) {
ex.printStackTrace();
}
}
public DialogInputText() {
this(null, "参照输入", false);
}
private void jbInit() throws Exception {
panel1.setLayout(borderLayout1);
jTextArea1.setText("jTextArea1");
getContentPane().add(panel1);
panel1.add(jTextArea1, BorderLayout.CENTER);
this.setSize(200,150);
this.setModal(true);
}
/**
* getTextRef
*
* @param textValue String
* @return String
*/
public String getTextRef(String textValue) {
this.jTextArea1.setText(textValue);
this.show();
return this.jTextArea1.getText();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -