Пример #1
0
  private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Andrey Lubchuck
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    scrollPane1 = new JScrollPane();
    textPane1 = new JTextPane();
    button1 = new JButton();
    buttonBar = new JPanel();
    okButton = new JButton();
    cancelButton = new JButton();

    // ======== this ========
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    // ======== dialogPane ========
    {
      dialogPane.setBorder(Borders.createEmptyBorder("7dlu, 7dlu, 7dlu, 7dlu"));

      // JFormDesigner evaluation mark
      dialogPane.setBorder(
          new javax.swing.border.CompoundBorder(
              new javax.swing.border.TitledBorder(
                  new javax.swing.border.EmptyBorder(0, 0, 0, 0),
                  "JFormDesigner Evaluation",
                  javax.swing.border.TitledBorder.CENTER,
                  javax.swing.border.TitledBorder.BOTTOM,
                  new java.awt.Font("Dialog", java.awt.Font.BOLD, 12),
                  java.awt.Color.red),
              dialogPane.getBorder()));
      dialogPane.addPropertyChangeListener(
          new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent e) {
              if ("border".equals(e.getPropertyName())) throw new RuntimeException();
            }
          });

      dialogPane.setLayout(new BorderLayout());

      // ======== contentPanel ========
      {
        contentPanel.setLayout(
            new FormLayout("17*(default, $lcgap), default", "6*(default, $lgap), default"));

        // ======== scrollPane1 ========
        {
          scrollPane1.setViewportView(textPane1);
        }
        contentPanel.add(scrollPane1, CC.xywh(4, 5, 12, 1));

        // ---- button1 ----
        button1.setText("text");
        button1.setMaximumSize(new Dimension(83, 23));
        button1.setMinimumSize(new Dimension(83, 23));
        contentPanel.add(button1, CC.xywh(21, 11, 11, 1, CC.CENTER, CC.DEFAULT));
      }
      dialogPane.add(contentPanel, BorderLayout.NORTH);

      // ======== buttonBar ========
      {
        buttonBar.setBorder(Borders.createEmptyBorder("5dlu, 0dlu, 0dlu, 0dlu"));
        buttonBar.setLayout(
            new FormLayout("$lcgap, default, $glue, $button, $rgap, $button", "pref"));

        // ---- okButton ----
        okButton.setText("OK");
        buttonBar.add(okButton, CC.xy(4, 1));

        // ---- cancelButton ----
        cancelButton.setText("Cancel");
        cancelButton.setMaximumSize(new Dimension(85, 23));
        cancelButton.setMinimumSize(new Dimension(85, 23));
        buttonBar.add(cancelButton, CC.xy(6, 1));
      }
      dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
  }