Search in sources :

Example 21 with JTextArea

use of javax.swing.JTextArea in project yyl_example by Relucent.

the class ExcelBuilderUI method initContainer.

/**
	 * 初始化界面
	 */
private void initContainer() {
    Container container = frame.getContentPane();
    container.setLayout(null);
    JLabel label;
    label = new JLabel("xls文件夹:");
    label.setBounds(10, 10, 100, 20);
    container.add(label);
    txtExcel = new JTextField();
    txtExcel.setBounds(100, 10, 245, 20);
    txtExcel.setEditable(false);
    container.add(txtExcel);
    btnExcel = new JButton();
    btnExcel.setBounds(350, 10, 120, 20);
    btnExcel.setText("选择xls文件夹");
    container.add(btnExcel);
    label = new JLabel("输出文件:");
    label.setBounds(10, 35, 100, 20);
    container.add(label);
    txtOutFolder = new JTextField();
    txtOutFolder.setBounds(100, 35, 245, 20);
    txtOutFolder.setEditable(false);
    container.add(txtOutFolder);
    btnOutFolder = new JButton();
    btnOutFolder.setBounds(350, 35, 120, 20);
    btnOutFolder.setText("输出文件夹");
    container.add(btnOutFolder);
    label = new JLabel("模版文件:");
    label.setBounds(10, 60, 100, 20);
    container.add(label);
    txtTemplet = new JTextField();
    txtTemplet.setBounds(100, 60, 245, 20);
    txtTemplet.setEditable(false);
    container.add(txtTemplet);
    btnTemplet = new JButton();
    btnTemplet.setBounds(350, 60, 120, 20);
    btnTemplet.setText("选择模版文件");
    container.add(btnTemplet);
    txtDebug = new JTextArea();
    JScrollPane scroller = new JScrollPane(txtDebug);
    //	scroller.setBorder(BorderFactory.createLineBorder(new Color(0xFF0000)));
    scroller.setBounds(10, 85, 460, 250);
    container.add(scroller);
    btnConfirm = new JButton();
    btnConfirm.setBounds(130, 340, 100, 20);
    btnConfirm.setText("开始导出");
    container.add(btnConfirm);
    btnConfirm.setEnabled(false);
    btnCancel = new JButton();
    btnCancel.setBounds(250, 340, 100, 20);
    btnCancel.setText("清空控制台");
    container.add(btnCancel);
}
Also used : JScrollPane(javax.swing.JScrollPane) Container(java.awt.Container) JTextArea(javax.swing.JTextArea) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField)

Example 22 with JTextArea

use of javax.swing.JTextArea in project yyl_example by Relucent.

the class CertContent1 method initContent.

/**初始化界面*/
private void initContent() {
    container = new Container();
    container.setLayout(null);
    JLabel label;
    label = new JLabel("别名:");
    label.setBounds(10, 10, 70, 20);
    container.add(label);
    txtAlias = new JTextField();
    txtAlias.setBounds(80, 10, 120, 20);
    container.add(txtAlias);
    label = new JLabel("密匙:");
    label.setBounds(260, 10, 70, 20);
    container.add(label);
    txtKeypass = new JTextField();
    txtKeypass.setBounds(330, 10, 120, 20);
    container.add(txtKeypass);
    label = new JLabel("名称:");
    label.setBounds(10, 35, 70, 20);
    container.add(label);
    txtDnameCN = new JTextField();
    txtDnameCN.setBounds(80, 35, 120, 20);
    container.add(txtDnameCN);
    label = new JLabel("组织:");
    label.setBounds(260, 35, 70, 20);
    container.add(label);
    txtDnameOU = new JTextField();
    txtDnameOU.setBounds(330, 35, 120, 20);
    container.add(txtDnameOU);
    label = new JLabel("单位:");
    label.setBounds(10, 60, 70, 20);
    container.add(label);
    txtDnameO = new JTextField();
    txtDnameO.setBounds(80, 60, 120, 20);
    container.add(txtDnameO);
    label = new JLabel("城市:");
    label.setBounds(260, 60, 70, 20);
    container.add(label);
    txtDnameL = new JTextField();
    txtDnameL.setBounds(330, 60, 120, 20);
    container.add(txtDnameL);
    label = new JLabel("省份:");
    label.setBounds(10, 85, 70, 20);
    container.add(label);
    txtDnameBJ = new JTextField();
    txtDnameBJ.setBounds(80, 85, 120, 20);
    container.add(txtDnameBJ);
    label = new JLabel("国家:");
    label.setBounds(260, 85, 70, 20);
    container.add(label);
    txtDnameC = new JTextField();
    txtDnameC.setBounds(330, 85, 120, 20);
    container.add(txtDnameC);
    label = new JLabel("密码:");
    label.setBounds(10, 110, 70, 20);
    container.add(label);
    txtStorepass = new JTextField();
    txtStorepass.setBounds(80, 110, 120, 20);
    container.add(txtStorepass);
    label = new JLabel("时限:");
    label.setBounds(260, 110, 70, 20);
    container.add(label);
    txtValidity = new JTextField();
    txtValidity.setBounds(330, 110, 120, 20);
    container.add(txtValidity);
    label = new JLabel("算法:");
    label.setBounds(10, 135, 70, 20);
    container.add(label);
    txtKeyalg = new JTextField();
    txtKeyalg.setBounds(80, 135, 120, 20);
    container.add(txtKeyalg);
    label = new JLabel("长度:");
    label.setBounds(260, 135, 70, 20);
    container.add(label);
    txtKeysize = new JTextField();
    txtKeysize.setBounds(330, 135, 120, 20);
    container.add(txtKeysize);
    label = new JLabel("路径:");
    label.setBounds(10, 160, 70, 20);
    container.add(label);
    txtKeystore = new JTextField();
    txtKeystore.setBounds(80, 160, 373, 20);
    container.add(txtKeystore);
    txtDebug = new JTextArea();
    txtDebug.setEditable(false);
    JScrollPane scroller = new JScrollPane(txtDebug);
    scroller.setBorder(BorderFactory.createLineBorder(new Color(0xFF0000)));
    scroller.setBounds(10, 185, 460, 105);
    container.add(scroller);
    btnDisplay = new JButton();
    btnDisplay.setBounds(130, 300, 100, 20);
    btnDisplay.setText("显示脚本");
    container.add(btnDisplay);
    btnExecute = new JButton();
    btnExecute.setBounds(250, 300, 100, 20);
    btnExecute.setText("运行脚本");
    btnExecute.setEnabled(false);
    container.add(btnExecute);
    //别名
    txtAlias.setText("myKeystore");
    //密钥
    txtKeypass.setText("changeit");
    //名称
    txtDnameCN.setText("localhost");
    //组织
    txtDnameOU.setText("Inc");
    //单位
    txtDnameO.setText("dept");
    //城市
    txtDnameL.setText("bj");
    //省份
    txtDnameBJ.setText("bj");
    //国家
    txtDnameC.setText("cn");
    //密码
    txtStorepass.setText("changeit");
    //路径
    txtKeystore.setText("C:/my.keystore");
    //时限
    txtValidity.setText("360");
    txtValidity.setToolTipText("天数");
    //算法
    txtKeyalg.setText("RSA");
    //长度
    txtKeysize.setText("1024");
    txtKeysize.setToolTipText("512-1024");
}
Also used : JScrollPane(javax.swing.JScrollPane) Container(java.awt.Container) JTextArea(javax.swing.JTextArea) Color(java.awt.Color) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField)

Example 23 with JTextArea

use of javax.swing.JTextArea in project yyl_example by Relucent.

the class CertContent2 method initContent.

/** 初始化界面 */
private void initContent() {
    container = new Container();
    container.setLayout(null);
    JLabel label;
    label = new JLabel("证书库:");
    label.setBounds(10, 10, 70, 20);
    container.add(label);
    txtKeystore = new JTextField();
    txtKeystore.setBounds(80, 10, 300, 20);
    container.add(txtKeystore);
    btnKeystore = new JButton("浏览");
    btnKeystore.setBounds(380, 10, 70, 20);
    container.add(btnKeystore);
    label = new JLabel("别 名:");
    label.setBounds(10, 35, 70, 20);
    container.add(label);
    cboAlias = new JComboBox<String>();
    cboAlias.setBounds(80, 35, 120, 20);
    container.add(cboAlias);
    label = new JLabel("密 码:");
    label.setBounds(260, 35, 70, 20);
    container.add(label);
    txtStorepass = new JTextField();
    txtStorepass.setBounds(330, 35, 120, 20);
    container.add(txtStorepass);
    label = new JLabel("证书[cer]:");
    label.setBounds(10, 60, 70, 20);
    container.add(label);
    txtCerFile = new JTextField();
    txtCerFile.setBounds(80, 60, 370, 20);
    container.add(txtCerFile);
    txtDebug = new JTextArea();
    txtDebug.setEditable(false);
    JScrollPane scroller = new JScrollPane(txtDebug);
    scroller.setBorder(BorderFactory.createLineBorder(new Color(0xFF0000)));
    scroller.setBounds(10, 90, 460, 200);
    container.add(scroller);
    btnDisplay = new JButton();
    btnDisplay.setBounds(130, 300, 100, 20);
    btnDisplay.setText("显示脚本");
    container.add(btnDisplay);
    btnExecute = new JButton();
    btnExecute.setBounds(250, 300, 100, 20);
    btnExecute.setText("运行脚本");
    btnExecute.setEnabled(false);
    container.add(btnExecute);
    txtKeystore.setText("");
    cboAlias.addItem("");
    txtStorepass.setText("changeit");
    txtDebug.setText("");
}
Also used : JScrollPane(javax.swing.JScrollPane) Container(java.awt.Container) JTextArea(javax.swing.JTextArea) Color(java.awt.Color) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField)

Example 24 with JTextArea

use of javax.swing.JTextArea in project yyl_example by Relucent.

the class CertContent4 method initContent.

/** 初始化界面 */
private void initContent() {
    container = new Container();
    container.setLayout(null);
    JLabel label;
    label = new JLabel("证书[cer]:");
    label.setBounds(10, 10, 70, 20);
    container.add(label);
    txtCerFile = new JTextField();
    txtCerFile.setBounds(80, 10, 300, 20);
    container.add(txtCerFile);
    btnCerFile = new JButton("浏览");
    btnCerFile.setBounds(380, 10, 70, 20);
    container.add(btnCerFile);
    label = new JLabel("证书库:");
    label.setBounds(10, 35, 70, 20);
    container.add(label);
    txtKeystore = new JTextField();
    txtKeystore.setBounds(80, 35, 300, 20);
    container.add(txtKeystore);
    btnKeystore = new JButton("浏览");
    btnKeystore.setBounds(380, 35, 70, 20);
    container.add(btnKeystore);
    label = new JLabel("别 名:");
    label.setBounds(10, 60, 70, 20);
    container.add(label);
    txtAlias = new JTextField();
    txtAlias.setBounds(80, 60, 120, 20);
    container.add(txtAlias);
    label = new JLabel("密 码:");
    label.setBounds(260, 60, 70, 20);
    container.add(label);
    txtStorepass = new JTextField();
    txtStorepass.setBounds(330, 60, 120, 20);
    container.add(txtStorepass);
    txtDebug = new JTextArea();
    txtDebug.setEditable(false);
    JScrollPane scroller = new JScrollPane(txtDebug);
    scroller.setBorder(BorderFactory.createLineBorder(new Color(0xFF0000)));
    scroller.setBounds(10, 90, 460, 200);
    container.add(scroller);
    btnDisplay = new JButton();
    btnDisplay.setBounds(130, 300, 100, 20);
    btnDisplay.setText("显示脚本");
    container.add(btnDisplay);
    btnExecute = new JButton();
    btnExecute.setBounds(250, 300, 100, 20);
    btnExecute.setText("运行脚本");
    btnExecute.setEnabled(false);
    container.add(btnExecute);
    txtKeystore.setText("");
    txtCerFile.setText("");
    txtAlias.setText("");
    txtStorepass.setText("changeit");
    txtDebug.setText("");
}
Also used : JScrollPane(javax.swing.JScrollPane) Container(java.awt.Container) JTextArea(javax.swing.JTextArea) Color(java.awt.Color) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField)

Example 25 with JTextArea

use of javax.swing.JTextArea in project yyl_example by Relucent.

the class CertContent5 method initContent.

/** 初始化界面 */
private void initContent() {
    container = new Container();
    container.setLayout(null);
    JLabel label;
    label = new JLabel("证书库:");
    label.setBounds(10, 10, 70, 20);
    container.add(label);
    txtKeystore = new JTextField();
    txtKeystore.setBounds(80, 10, 300, 20);
    container.add(txtKeystore);
    btnKeystore = new JButton("浏览");
    btnKeystore.setBounds(380, 10, 70, 20);
    container.add(btnKeystore);
    label = new JLabel("别 名:");
    label.setBounds(10, 35, 70, 20);
    container.add(label);
    cboAlias = new JComboBox<String>();
    cboAlias.setBounds(80, 35, 120, 20);
    container.add(cboAlias);
    label = new JLabel("密 码:");
    label.setBounds(260, 35, 70, 20);
    container.add(label);
    txtStorepass = new JTextField();
    txtStorepass.setBounds(330, 35, 120, 20);
    container.add(txtStorepass);
    txtDebug = new JTextArea();
    txtDebug.setEditable(false);
    JScrollPane scroller = new JScrollPane(txtDebug);
    scroller.setBorder(BorderFactory.createLineBorder(new Color(0xFF0000)));
    scroller.setBounds(10, 90, 460, 200);
    container.add(scroller);
    btnDisplay = new JButton();
    btnDisplay.setBounds(130, 300, 100, 20);
    btnDisplay.setText("显示脚本");
    container.add(btnDisplay);
    btnExecute = new JButton();
    btnExecute.setBounds(250, 300, 100, 20);
    btnExecute.setText("运行脚本");
    btnExecute.setEnabled(false);
    container.add(btnExecute);
    txtKeystore.setText("");
    cboAlias.addItem("");
    txtStorepass.setText("changeit");
    txtDebug.setText("");
}
Also used : JScrollPane(javax.swing.JScrollPane) Container(java.awt.Container) JTextArea(javax.swing.JTextArea) Color(java.awt.Color) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField)

Aggregations

JTextArea (javax.swing.JTextArea)182 JScrollPane (javax.swing.JScrollPane)104 JPanel (javax.swing.JPanel)79 BorderLayout (java.awt.BorderLayout)60 JButton (javax.swing.JButton)59 JLabel (javax.swing.JLabel)59 Dimension (java.awt.Dimension)36 JTextField (javax.swing.JTextField)35 JFrame (javax.swing.JFrame)33 ActionEvent (java.awt.event.ActionEvent)26 Font (java.awt.Font)24 GridBagLayout (java.awt.GridBagLayout)23 GridBagConstraints (java.awt.GridBagConstraints)22 Insets (java.awt.Insets)22 ActionListener (java.awt.event.ActionListener)21 FlowLayout (java.awt.FlowLayout)20 Color (java.awt.Color)18 JCheckBox (javax.swing.JCheckBox)18 JSplitPane (javax.swing.JSplitPane)16 EmptyBorder (javax.swing.border.EmptyBorder)16