panelinputtext.java~4~

来自「利用jtable,设计属性编辑器程序设计实例。包括jtabe 编辑风格自定义」· JAVA~4~ 代码 · 共 68 行

JAVA~4~
68
字号
package propertyproj;import java.awt.*;import java.awt.event.ActionEvent;import javax.swing.*;// Referenced classes of package exdesigner.control://            DialogTextInputer, PanelTextField_jButton1_actionAdapterpublic class PanelInputText extends JPanel{    BorderLayout borderLayout1;    JButton jButton1;    JTextArea jTextArea1;    DialogTextInputer textInputer;    public PanelInputText()    {        borderLayout1 = new BorderLayout();        jButton1 = new JButton();        textInputer = new DialogTextInputer();        jTextArea1 = new JTextArea();        try        {            jbInit();        }        catch(Exception exception)        {            exception.printStackTrace();        }    }    public String getText()    {        return jTextArea1.getText();    }    void jButton1_actionPerformed(ActionEvent actionevent)    {        jTextArea1.setText(textInputer.showTextInputer(jTextArea1.getText()));    }    void jbInit()        throws Exception    {        setLayout(borderLayout1);        jButton1.setMaximumSize(new Dimension(20, 26));        jButton1.setMinimumSize(new Dimension(20, 26));        jButton1.setOpaque(true);        jButton1.setPreferredSize(new Dimension(20, 26));        jButton1.setText("...");        jButton1.addActionListener(new PanelTextField_jButton1_actionAdapter(this));        textInputer.setLocationRelativeTo(this);        jTextArea1.setFont(new Font("Dialog", 0, 11));        jTextArea1.setToolTipText("");        jTextArea1.setText("");        setFont(new Font("Dialog", 0, 11));        add(jButton1, "East");        add(jTextArea1, "Center");    }    public void setText(String s)    {        jTextArea1.setText(s);    }}

⌨️ 快捷键说明

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