Search in sources :

Example 21 with JTextField

use of javax.swing.JTextField in project pcgen by PCGen.

the class ConversionInputDialog method initComponents.

/**
	 * Initialises the user interface.
	 */
private void initComponents() {
    setLayout(new GridBagLayout());
    JLabel introLabel = new JLabel(introText);
    GridBagConstraints gbc = new GridBagConstraints();
    Utility.buildRelativeConstraints(gbc, GridBagConstraints.REMAINDER, 1, 1.0, 1.0);
    gbc.fill = GridBagConstraints.BOTH;
    gbc.insets = new Insets(10, 10, 5, 10);
    add(introLabel, gbc);
    field = new JTextField(20);
    Utility.buildRelativeConstraints(gbc, GridBagConstraints.REMAINDER, 1, 1.0, 0, GridBagConstraints.HORIZONTAL, GridBagConstraints.WEST);
    gbc.insets = new Insets(5, 10, 5, 10);
    add(field, gbc);
    JLabel dummy = new JLabel(" ");
    Utility.buildRelativeConstraints(gbc, 1, 1, 1.0, 0.0, GridBagConstraints.HORIZONTAL, GridBagConstraints.WEST);
    add(dummy, gbc);
    JButton okButton = new JButton(LanguageBundle.getString("in_ok"));
    okButton.addActionListener(this);
    getRootPane().setDefaultButton(okButton);
    Utility.buildRelativeConstraints(gbc, GridBagConstraints.REMAINDER, GridBagConstraints.REMAINDER, 0, 0, GridBagConstraints.NONE, GridBagConstraints.EAST);
    gbc.insets = new Insets(5, 5, 10, 10);
    add(okButton, gbc);
    pack();
    addWindowListener(new WindowAdapter() {

        @Override
        public void windowClosing(WindowEvent e) {
            result = field.getText();
            setVisible(false);
            logInput();
        }
    });
}
Also used : GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) WindowEvent(java.awt.event.WindowEvent) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) WindowAdapter(java.awt.event.WindowAdapter) JTextField(javax.swing.JTextField)

Example 22 with JTextField

use of javax.swing.JTextField in project pcgen by PCGen.

the class PurchaseModeFrame method initComponents.

private void initComponents() {
    purchaseScoreMinEdit = new JTextField(3);
    purchaseScoreMaxEdit = new JTextField(3);
    statusBar = new JLabel();
    currentPurchaseMethods = new JComboBoxEx();
    currentPurchaseMethods.setAutoSort(true);
    purchaseMethodPointsEdit = new JTextField(4);
    removeMethodButton = new JButton();
    AbstractButton okButton = new JButton();
    okButton.addActionListener(e -> CustomData.writePurchaseModeConfiguration());
    jScrollPane1 = new JScrollPane();
    getContentPane().setLayout(new GridBagLayout());
    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    setTitle(PurchaseModeFrame.TITLE);
    addWindowListener(new WindowAdapter() {

        @Override
        public void windowClosing(WindowEvent evt) {
            exitForm();
        }
    });
    Container jPanel1 = new JPanel();
    jPanel1.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 5));
    JLabel purchaseScoreMinLabel = new JLabel();
    //$NON-NLS-1$
    purchaseScoreMinLabel.setText(LanguageBundle.getString("in_Prefs_purchMin"));
    //$NON-NLS-1$
    purchaseScoreMinLabel.setToolTipText(LanguageBundle.getString("in_Prefs_purchMinTip"));
    purchaseScoreMinLabel.setPreferredSize(new Dimension(140, 15));
    jPanel1.add(purchaseScoreMinLabel);
    purchaseScoreMinEdit.setHorizontalAlignment(SwingConstants.RIGHT);
    purchaseScoreMinEdit.addActionListener(evt -> purchaseScoreMinValueActionPerformed());
    purchaseScoreMinEdit.addFocusListener(new FocusAdapter() {

        @Override
        public void focusLost(FocusEvent e) {
            purchaseScoreMinValueActionPerformed();
        }
    });
    jPanel1.add(purchaseScoreMinEdit);
    AbstractButton purchaseScoreMinIncreaseButton = new JButton();
    //$NON-NLS-1$
    purchaseScoreMinIncreaseButton.setText(LanguageBundle.getString("in_Prefs_plus"));
    //$NON-NLS-1$
    purchaseScoreMinIncreaseButton.setToolTipText(LanguageBundle.getString("in_Prefs_incMin"));
    purchaseScoreMinIncreaseButton.addActionListener(evt -> purchaseScoreMinIncreaseButtonActionPerformed());
    jPanel1.add(purchaseScoreMinIncreaseButton);
    AbstractButton purchaseScoreMinDecreaseButton = new JButton();
    //$NON-NLS-1$
    purchaseScoreMinDecreaseButton.setText(LanguageBundle.getString("in_Prefs_minus"));
    //$NON-NLS-1$
    purchaseScoreMinDecreaseButton.setToolTipText(LanguageBundle.getString("in_Prefs_decMin"));
    purchaseScoreMinDecreaseButton.addActionListener(evt -> purchaseScoreMinDecreaseButtonActionPerformed());
    jPanel1.add(purchaseScoreMinDecreaseButton);
    GridBagConstraints gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    getContentPane().add(jPanel1, gridBagConstraints);
    Container jPanel2 = new JPanel();
    jPanel2.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 5));
    JLabel purchaseScoreMaxLabel = new JLabel();
    //$NON-NLS-1$
    purchaseScoreMaxLabel.setText(LanguageBundle.getString("in_Prefs_purchMax"));
    //$NON-NLS-1$
    purchaseScoreMaxLabel.setToolTipText(LanguageBundle.getString("in_Prefs_purchMaxTip"));
    purchaseScoreMaxLabel.setPreferredSize(new Dimension(140, 15));
    jPanel2.add(purchaseScoreMaxLabel);
    purchaseScoreMaxEdit.setHorizontalAlignment(SwingConstants.RIGHT);
    purchaseScoreMaxEdit.addActionListener(evt -> purchaseScoreMaxValueActionPerformed());
    purchaseScoreMaxEdit.addFocusListener(new FocusAdapter() {

        @Override
        public void focusLost(FocusEvent e) {
            purchaseScoreMaxValueActionPerformed();
        }
    });
    jPanel2.add(purchaseScoreMaxEdit);
    AbstractButton purchaseScoreMaxIncreaseButton = new JButton();
    //$NON-NLS-1$
    purchaseScoreMaxIncreaseButton.setText(LanguageBundle.getString("in_Prefs_plus"));
    //$NON-NLS-1$
    purchaseScoreMaxIncreaseButton.setToolTipText(LanguageBundle.getString("in_Prefs_incMax"));
    purchaseScoreMaxIncreaseButton.addActionListener(evt -> purchaseScoreMaxIncreaseButtonActionPerformed());
    jPanel2.add(purchaseScoreMaxIncreaseButton);
    AbstractButton purchaseScoreMaxDecreaseButton = new JButton();
    //$NON-NLS-1$
    purchaseScoreMaxDecreaseButton.setText(LanguageBundle.getString("in_Prefs_minus"));
    //$NON-NLS-1$
    purchaseScoreMaxDecreaseButton.setToolTipText(LanguageBundle.getString("in_Prefs_decMax"));
    purchaseScoreMaxDecreaseButton.addActionListener(evt -> purchaseScoreMaxDecreaseButtonActionPerformed());
    jPanel2.add(purchaseScoreMaxDecreaseButton);
    GridBagConstraints bagConstraints = new GridBagConstraints();
    bagConstraints.gridx = 0;
    bagConstraints.gridy = 2;
    bagConstraints.fill = GridBagConstraints.HORIZONTAL;
    bagConstraints.anchor = GridBagConstraints.NORTHWEST;
    bagConstraints.weightx = 1.0;
    getContentPane().add(jPanel2, bagConstraints);
    JComponent purchaseMethodPanel = new JPanel();
    purchaseMethodPanel.setLayout(new GridBagLayout());
    purchaseMethodPanel.setBorder(BorderFactory.createTitledBorder(//$NON-NLS-1$
    LanguageBundle.getString("in_Prefs_allowPoints")));
    bagConstraints = new GridBagConstraints();
    bagConstraints.gridx = 0;
    bagConstraints.gridy = 3;
    bagConstraints.fill = GridBagConstraints.HORIZONTAL;
    bagConstraints.anchor = GridBagConstraints.NORTHWEST;
    bagConstraints.weightx = 1.0;
    getContentPane().add(purchaseMethodPanel, bagConstraints);
    Container purchaseMethodNamePanel = new JPanel();
    purchaseMethodNamePanel.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 5));
    JLabel savedMethodLabel = new JLabel();
    //$NON-NLS-1$
    savedMethodLabel.setText(LanguageBundle.getString("in_Prefs_savedMethods"));
    savedMethodLabel.setPreferredSize(new Dimension(140, 15));
    purchaseMethodNamePanel.add(savedMethodLabel);
    purchaseMethodNamePanel.add(currentPurchaseMethods);
    bagConstraints = new GridBagConstraints();
    bagConstraints.gridx = 0;
    bagConstraints.gridy = 0;
    bagConstraints.fill = GridBagConstraints.HORIZONTAL;
    bagConstraints.anchor = GridBagConstraints.NORTHWEST;
    bagConstraints.weightx = 1.0;
    getContentPane().add(purchaseMethodNamePanel, bagConstraints);
    purchaseMethodPanel.add(purchaseMethodNamePanel, bagConstraints);
    Container purchaseMethodPointsPanel = new JPanel();
    purchaseMethodPointsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 5));
    JLabel methodPointsLabel = new JLabel();
    //$NON-NLS-1$
    methodPointsLabel.setText(LanguageBundle.getString("in_Prefs_points"));
    methodPointsLabel.setPreferredSize(new Dimension(140, 15));
    purchaseMethodPointsPanel.add(methodPointsLabel);
    purchaseMethodPointsEdit.setHorizontalAlignment(SwingConstants.RIGHT);
    purchaseMethodPointsEdit.setEditable(false);
    //purchaseMethodPointsEdit.setText("10");
    purchaseMethodPointsPanel.add(purchaseMethodPointsEdit);
    bagConstraints = new GridBagConstraints();
    bagConstraints.gridx = 0;
    bagConstraints.gridy = 1;
    bagConstraints.fill = GridBagConstraints.HORIZONTAL;
    bagConstraints.anchor = GridBagConstraints.NORTHWEST;
    bagConstraints.weightx = 1.0;
    //		getContentPane().add(purchaseMethodPointsPanel, gridBagConstraints);
    purchaseMethodPanel.add(purchaseMethodPointsPanel, bagConstraints);
    currentPurchaseMethods.setPreferredSize(new Dimension(140, 21));
    currentPurchaseMethods.addItemListener(evt -> currentPurchaseMethodsActionPerformed());
    Container purchaseMethodButtonPanel = new JPanel();
    purchaseMethodButtonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
    AbstractButton addMethodButton = new JButton();
    //$NON-NLS-1$
    addMethodButton.setText(LanguageBundle.getString("in_Prefs_new"));
    addMethodButton.addActionListener(evt -> addMethodButtonActionPerformed());
    purchaseMethodButtonPanel.add(addMethodButton);
    //$NON-NLS-1$
    removeMethodButton.setText(LanguageBundle.getString("in_Prefs_remove"));
    removeMethodButton.addActionListener(evt -> removeMethodButtonActionPerformed());
    purchaseMethodButtonPanel.add(removeMethodButton);
    bagConstraints = new GridBagConstraints();
    bagConstraints.gridx = 0;
    bagConstraints.gridy = 2;
    bagConstraints.fill = GridBagConstraints.HORIZONTAL;
    bagConstraints.anchor = GridBagConstraints.NORTHWEST;
    bagConstraints.weightx = 1.0;
    purchaseMethodPanel.add(purchaseMethodButtonPanel, bagConstraints);
    //$NON-NLS-1$
    statusBar.setText(LanguageBundle.getString("in_Prefs_setCost"));
    statusBar.setBorder(new BevelBorder(BevelBorder.LOWERED));
    bagConstraints = new GridBagConstraints();
    bagConstraints.gridx = 0;
    bagConstraints.gridy = 6;
    bagConstraints.fill = GridBagConstraints.HORIZONTAL;
    bagConstraints.ipadx = 1;
    bagConstraints.ipady = 1;
    bagConstraints.insets = new Insets(1, 1, 1, 1);
    bagConstraints.anchor = GridBagConstraints.NORTHWEST;
    bagConstraints.weightx = 1.0;
    getContentPane().add(statusBar, bagConstraints);
    Container jPanel3 = new JPanel();
    jPanel3.setLayout(new FlowLayout(FlowLayout.RIGHT));
    //$NON-NLS-1$
    okButton.setText(LanguageBundle.getString("in_Prefs_OK"));
    //$NON-NLS-1$
    okButton.setToolTipText(LanguageBundle.getString("in_Prefs_OKTip"));
    okButton.addActionListener(evt -> okButtonActionPerformed());
    jPanel3.add(okButton);
    AbstractButton resetButton = new JButton();
    //$NON-NLS-1$
    resetButton.setText(LanguageBundle.getString("in_Prefs_Reset"));
    //$NON-NLS-1$
    resetButton.setToolTipText(LanguageBundle.getString("in_Prefs_ResetTip"));
    resetButton.addActionListener(evt -> resetButtonActionPerformed());
    jPanel3.add(resetButton);
    AbstractButton cancelButton = new JButton();
    //$NON-NLS-1$
    cancelButton.setText(LanguageBundle.getString("in_cancel"));
    //$NON-NLS-1$
    cancelButton.setToolTipText(LanguageBundle.getString("in_Prefs_CancelTip"));
    cancelButton.addActionListener(evt -> cancelButtonActionPerformed());
    jPanel3.add(cancelButton);
    /////////////////////////////////////////////////
    bagConstraints = new GridBagConstraints();
    bagConstraints.gridx = 0;
    bagConstraints.gridy = 5;
    bagConstraints.fill = GridBagConstraints.HORIZONTAL;
    bagConstraints.anchor = GridBagConstraints.EAST;
    bagConstraints.weightx = 1.0;
    getContentPane().add(jPanel3, bagConstraints);
    jScrollPane1.setViewportBorder(new BevelBorder(BevelBorder.LOWERED));
    jScrollPane1.setPreferredSize(new Dimension(100, 200));
    purchaseModel = new PurchaseModel();
    renewAbilityScoreCostTable();
    bagConstraints = new GridBagConstraints();
    bagConstraints.gridx = 0;
    bagConstraints.gridy = 0;
    bagConstraints.fill = GridBagConstraints.BOTH;
    bagConstraints.anchor = GridBagConstraints.NORTHWEST;
    bagConstraints.weightx = 1.0;
    bagConstraints.weighty = 1.0;
    getContentPane().add(jScrollPane1, bagConstraints);
    pack();
    initializeCurrentPurchaseMethods();
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) FocusAdapter(java.awt.event.FocusAdapter) GridBagConstraints(java.awt.GridBagConstraints) AbstractButton(javax.swing.AbstractButton) FlowLayout(java.awt.FlowLayout) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) BevelBorder(javax.swing.border.BevelBorder) JButton(javax.swing.JButton) JComponent(javax.swing.JComponent) JLabel(javax.swing.JLabel) WindowAdapter(java.awt.event.WindowAdapter) Dimension(java.awt.Dimension) JTextField(javax.swing.JTextField) FocusEvent(java.awt.event.FocusEvent) Container(java.awt.Container) WindowEvent(java.awt.event.WindowEvent) JComboBoxEx(pcgen.gui2.util.JComboBoxEx)

Example 23 with JTextField

use of javax.swing.JTextField 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 24 with JTextField

use of javax.swing.JTextField 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 25 with JTextField

use of javax.swing.JTextField 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)

Aggregations

JTextField (javax.swing.JTextField)450 JLabel (javax.swing.JLabel)270 JPanel (javax.swing.JPanel)236 JButton (javax.swing.JButton)135 BorderLayout (java.awt.BorderLayout)115 GridBagLayout (java.awt.GridBagLayout)94 Insets (java.awt.Insets)94 GridBagConstraints (java.awt.GridBagConstraints)93 Dimension (java.awt.Dimension)91 JCheckBox (javax.swing.JCheckBox)89 ActionEvent (java.awt.event.ActionEvent)84 ActionListener (java.awt.event.ActionListener)75 JScrollPane (javax.swing.JScrollPane)64 BoxLayout (javax.swing.BoxLayout)50 JTextArea (javax.swing.JTextArea)40 FlowLayout (java.awt.FlowLayout)39 JComboBox (javax.swing.JComboBox)39 JRadioButton (javax.swing.JRadioButton)37 ButtonGroup (javax.swing.ButtonGroup)35 JTable (javax.swing.JTable)34