Example #1
0
  public TasksPanelBase() {
    setLayout(new BorderLayout(0, 0));

    panel = new JPanel();
    panel.setBorder(
        new TitledBorder(null, "Tasks", TitledBorder.LEADING, TitledBorder.TOP, null, null));
    add(panel, BorderLayout.CENTER);
    panel.setOpaque(false);
    panel.setLayout(new BorderLayout(0, 0));

    scrollPane = new JScrollPane();
    scrollPane.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    panel.add(scrollPane, BorderLayout.CENTER);

    taskList = new JList();
    taskList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    taskList.setCellRenderer(new TaskListRenderer());
    scrollPane.setViewportView(taskList);

    buttonPanel = new JPanel();
    FlowLayout flowLayout = (FlowLayout) buttonPanel.getLayout();
    flowLayout.setVgap(0);
    flowLayout.setHgap(0);
    flowLayout.setAlignment(FlowLayout.RIGHT);
    panel.add(buttonPanel, BorderLayout.SOUTH);

    deleteButton = new JButton("");
    deleteButton.setActionCommand("delete");
    deleteButton.setIcon(
        new ImageIcon(TasksPanelBase.class.getResource("/resources/icons/delete.png")));
    buttonPanel.add(deleteButton);
  }
Example #2
0
  /** Create the panel. */
  public DictionaryPane() {
    setLayout(new BorderLayout(0, 0));

    JPanel panel = new JPanel();
    add(panel, BorderLayout.SOUTH);
    panel.setLayout(new BorderLayout(0, 0));

    JPanel panel_1 = new JPanel();
    FlowLayout flowLayout = (FlowLayout) panel_1.getLayout();
    flowLayout.setAlignment(FlowLayout.LEADING);
    panel.add(panel_1, BorderLayout.CENTER);

    JButton btnNewButton = new JButton("Add word");
    panel_1.add(btnNewButton);

    JButton btnRemoveWord = new JButton("Remove word");
    panel_1.add(btnRemoveWord);

    JPanel panel_2 = new JPanel();
    FlowLayout flowLayout_1 = (FlowLayout) panel_2.getLayout();
    flowLayout_1.setAlignment(FlowLayout.TRAILING);
    panel.add(panel_2, BorderLayout.EAST);

    JButton btnNewButton_1 = new JButton("Save");
    panel_2.add(btnNewButton_1);

    JPanel panel_3 = new JPanel();
    panel_3.setBorder(new EmptyBorder(5, 5, 0, 5));
    add(panel_3, BorderLayout.CENTER);
    panel_3.setLayout(new BorderLayout(0, 0));

    list = new JList<String>();
    panel_3.add(list);
  }
  /**
   * Builds reading lists tab.
   *
   * @return component.
   */
  protected JComponent buildReadingListsTab() {
    // Wording
    JComponent wording = msg(Strings.message("guide.dialog.readinglists.wording"));

    // Buttons
    Dimension btnSize = new Dimension(20, 20);
    btnAddReadingList.setPreferredSize(btnSize);
    btnRemoveList.setPreferredSize(btnSize);
    FlowLayout layout = new FlowLayout(FlowLayout.LEFT);
    JPanel bbar = new JPanel(layout);
    bbar.add(btnAddReadingList);
    bbar.add(btnRemoveList);
    layout.setHgap(0);
    layout.setVgap(0);

    // Panel
    BBFormBuilder builder = new BBFormBuilder("0:grow");
    builder.setDefaultDialogBorder();

    builder.append(wording);
    builder.appendUnrelatedComponentsGapRow(2);
    builder.appendRow("min:grow");
    builder.append(new JScrollPane(tblReadingLists), 1, CellConstraints.FILL, CellConstraints.FILL);
    builder.append(bbar);

    return builder.getPanel();
  }
Example #4
0
  /** @param model */
  private void build(CalendarModel model) {
    this._support = new CalendarSupport(model, new ModelListener());

    FlowLayout flowLayout = new FlowLayout(FlowLayout.LEFT);
    flowLayout.setHgap(3);
    flowLayout.setVgap(0);

    JPanel p = this._fieldPanel;
    JTextField hf = this._hourField;
    JTextField mf = this._minuteField;
    JTextField sf = this._secondField;

    p.setLayout(flowLayout);
    p.add(hf);
    p.add(this._hmSeparator);
    p.add(mf);
    p.add(this._msSeparator);
    p.add(sf);

    hf.setHorizontalAlignment(RIGHT);
    mf.setHorizontalAlignment(RIGHT);
    sf.setHorizontalAlignment(RIGHT);

    hf.setDocument(IntegerRangeLimitedDocument.decorate(hf.getDocument(), 0, 23));
    mf.setDocument(IntegerRangeLimitedDocument.decorate(mf.getDocument(), 0, 59));
    sf.setDocument(IntegerRangeLimitedDocument.decorate(sf.getDocument(), 0, 59));

    setLayout(new BorderLayout());
    this.add(p, BorderLayout.CENTER);
    updateUI();

    this._changedUI = true;
  }
Example #5
0
  public void initializeGUIComponents() {

    // Setup Data Panel
    editButton = new JButton("Edit");
    editButton.addActionListener(buttonController);
    JPanel buttonPanel = new JPanel();
    FlowLayout flowLayout = (FlowLayout) buttonPanel.getLayout();
    flowLayout.setAlignment(FlowLayout.RIGHT);
    buttonPanel.add(editButton);
    buttonPanel.add(Box.createHorizontalStrut(10));

    // Setup the Main Panel.
    setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Skills"));
    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

    // Setup TextField
    scrollPane = new JScrollPane();
    taSkills = new JTextArea();
    taSkills.setLineWrap(true);
    taSkills.setWrapStyleWord(true);
    taSkills.setEditable(false);
    scrollPane.setViewportView(taSkills);

    add(scrollPane);
    add(buttonPanel);
  }
Example #6
0
 public VolPanel(Dimension d, DetailVolPanel detailPanel) {
   super();
   this.detailPanel = detailPanel;
   this.bleuStyle = new Color(7, 174, 240);
   this.d = d;
   this.setPreferredSize(d);
   this.setBackground(bleuStyle);
   this.searchPanel = new JPanel();
   searchPanel.setLayout(new BorderLayout());
   this.searchPanel.setBackground(bleuStyle);
   searchField = new JTextField();
   searchField.setPreferredSize(new Dimension(400, 10));
   searchButton = new JButton("Rechercher");
   searchButton.setBackground(Color.WHITE);
   searchButton.setForeground(bleuStyle);
   searchButton.addActionListener(this);
   searchLabel = new JLabel("Rechercher un vol : ");
   listVolInit();
   searchPanel.setPreferredSize(new Dimension(d.width, 50));
   searchPanel.setBorder(new EmptyBorder(10, 0, 10, 0));
   searchPanel.add(searchField, BorderLayout.CENTER);
   searchPanel.add(searchButton, BorderLayout.EAST);
   this.add(searchPanel);
   scrollPane = new JScrollPane(list);
   scrollPane.setPreferredSize(new Dimension(d.width, 200));
   scrollPane.setBorder(BorderFactory.createLineBorder(bleuStyle));
   this.add(scrollPane);
   FlowLayout flay = new FlowLayout();
   flay.setHgap(0);
   flay.setVgap(0);
   this.setLayout(flay);
   ajoutInit();
 }
Example #7
0
  private void geometry() {
    // JComponent : Instanciation
    buttonStart = new JButton("Start");
    buttonStop = new JButton("Stop");
    buttonNext = new JButton("Suivant");
    buttonPrevious = new JButton("Précédent");

    // boutonStart.setSize(100, 40);
    // boutonStop.setSize(100, 40);

    // boutonStart.setLocation(10, 100);
    // boutonStop.setLocation(10, 300);

    buttonStart.setEnabled(true);
    buttonStop.setEnabled(false);
    buttonNext.setEnabled(true);
    buttonPrevious.setEnabled(true);

    // Layout : Specification
    {
      FlowLayout flowlayout = new FlowLayout(FlowLayout.CENTER);
      setLayout(flowlayout);

      flowlayout.setHgap(20);
      // flowlayout.setVgap(20);
    }

    // JComponent : add
    add(buttonStart);
    add(buttonStop);
    add(buttonNext);
    add(buttonPrevious);
  }
Example #8
0
  /** Creates the ui. */
  private void createUI() {
    JPanel panel = new JPanel();
    FlowLayout flowLayout = (FlowLayout) panel.getLayout();
    flowLayout.setAlignment(FlowLayout.TRAILING);
    getContentPane().add(panel, BorderLayout.SOUTH);

    JButton btnOk = new JButton(Localisation.getString(ExpressionPanelv2.class, "common.ok"));
    btnOk.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            okButtonPressed = true;

            setVisible(false);
          }
        });
    panel.add(btnOk);

    JButton btnCancel =
        new JButton(Localisation.getString(ExpressionPanelv2.class, "common.cancel"));
    btnCancel.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            okButtonPressed = false;

            setVisible(false);
          }
        });
    panel.add(btnCancel);
  }
Example #9
0
  protected void addCmdButton() {
    FlowLayout fl = new FlowLayout();
    fl.setAlignment(FlowLayout.RIGHT);
    buttonPanel.setLayout(fl);

    buttonPanel.add(bOk);
    buttonPanel.add(bExit);
  }
Example #10
0
  public LicenseDialog(Component parent) {
    setTitle("Licensing information");

    pnlButtons.add(bttnOk);

    cbLang.addItem("English");
    cbLang.addItem("Eesti");

    FlowLayout fl = new FlowLayout();
    fl.setAlignment(FlowLayout.LEFT);

    pnlHeader.setLayout(fl);

    pnlHeader.add(lblLang);
    pnlHeader.add(cbLang);

    pnlMain.setLayout(new BorderLayout());
    pnlMain.add(pnlHeader, BorderLayout.NORTH);
    pnlMain.add(scrollPane, BorderLayout.CENTER);
    pnlMain.add(pnlButtons, BorderLayout.SOUTH);

    taLicenseText.setText(getLicenseText());
    taLicenseText.setCaretPosition(0);
    taLicenseText.setLineWrap(true);
    taLicenseText.setEditable(false);
    taLicenseText.setWrapStyleWord(true);

    getContentPane().add(pnlMain);
    setPreferredSize(new Dimension(500, 600));
    setLocationRelativeTo(parent);

    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);

    bttnOk.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            if (evt.getSource() == bttnOk) {
              dispose();
            }
          } // end actionPerformed
        }); // end bttnOk Action Listener

    cbLang.addItemListener(
        new ItemListener() {
          public void itemStateChanged(final ItemEvent event) {
            if (event.getSource() == cbLang
                && event.getStateChange() == ItemEvent.SELECTED
                && cbLang.getItemCount() > 0) {
              taLicenseText.setText(getLicenseText());
              taLicenseText.setCaretPosition(0);
            }
          }
        }); // end cbLang item listener

    pack();
    setVisible(true);
  } // PortPropertiesDialog
Example #11
0
 public JRadioButton buildRadioButton(String label, boolean selected) {
   FlowLayout f = new FlowLayout();
   f.setAlignment(FlowLayout.LEFT);
   JPanel radioPanel = new JPanel(f);
   JRadioButton radioButton = new JRadioButton(label);
   radioButton.setSelected(selected);
   radioPanel.add(radioButton);
   return radioButton;
 }
Example #12
0
 public JCheckBox buildCheckBox(String label, boolean selected) {
   FlowLayout f = new FlowLayout();
   f.setAlignment(FlowLayout.LEFT);
   JPanel checkPanel = new JPanel(f);
   JCheckBox checkBox = new JCheckBox(label);
   checkBox.setSelected(selected);
   checkPanel.add(checkBox);
   return checkBox;
 }
Example #13
0
 protected PanelCity() {
   FlowLayout main = new FlowLayout();
   main.setHgap(0);
   main.setVgap(0);
   setLayout(main);
   setPreferredSize(
       new Dimension(
           City.SIZE * City.ESTATE_SIZE + BORDER_MARGIN,
           City.SIZE * City.ESTATE_SIZE + BORDER_MARGIN));
   setBackground(Color.BLACK);
 }
Example #14
0
 /**
  * This method initializes resultInitialPanel1
  *
  * @return javax.swing.JPanel
  */
 private JPanel getResultInitialPanel1() {
   if (resultInitialPanel1 == null) {
     FlowLayout flowLayout = new FlowLayout();
     flowLayout.setAlignment(FlowLayout.LEFT);
     resultInitialPanel1 = new JPanel();
     resultInitialPanel1.setLayout(flowLayout);
     resultInitialPanel1.setName("resultInitialPanel1");
     resultInitialPanel1.setBackground(WINDOW_BACKGROUND_COLOR);
   }
   return resultInitialPanel1;
 }
 /**
  * This method initializes panelResultados
  *
  * @return javax.swing.JPanel
  */
 JPanel getPanelResultados() {
   if (panelResultados == null) {
     FlowLayout flowLayout = new FlowLayout();
     flowLayout.setAlignment(java.awt.FlowLayout.LEFT);
     flowLayout.setVgap(10);
     flowLayout.setHgap(10);
     panelResultados = new JPanel();
     panelResultados.setLayout(flowLayout);
   }
   return panelResultados;
 }
Example #16
0
 public JTextField buildField(String labelText, String initText) {
   FlowLayout f = new FlowLayout();
   f.setAlignment(FlowLayout.LEFT);
   JPanel panel = new JPanel(f);
   JLabel label = new JLabel(labelText);
   JTextField text = new JTextField(initText);
   text.setColumns(8);
   panel.add(label);
   panel.add(text);
   return text;
 }
Example #17
0
 /**
  * This method initializes jLabel
  *
  * @return javax.swing.JLabel
  */
 private JPanel getStatusPanel() {
   if (statusPanel == null) {
     FlowLayout flowLayout = new FlowLayout();
     flowLayout.setAlignment(FlowLayout.LEFT);
     statusPanel = new JPanel();
     statusPanel.setLayout(flowLayout);
     statusPanel.add(getNumLineLabel(), null);
     statusPanel.add(new JSeparator(SwingConstants.VERTICAL), null);
     statusPanel.add(getStatusLabel(), null);
   }
   return statusPanel;
 }
Example #18
0
 /**
  * Constructs a toolbar with the given name.
  *
  * <p>The name is used when reading/writing XML configuration. It must not be null if you use this
  * feature.
  */
 public WtoolBar(String barName, TYPE type) {
   FlowLayout flowLayout = (FlowLayout) getLayout();
   flowLayout.setVgap(0);
   flowLayout.setHgap(0);
   flowLayout.setAlignment(FlowLayout.LEADING);
   this.barName = barName;
   this.type = type;
   this.setAlignmentX(LEFT_ALIGNMENT);
   this.setAlignmentY(TOP_ALIGNMENT);
   setOpaque(false);
   addSeparator(SEPARATOR_2x24);
 }
Example #19
0
  private void initTopPanel() {
    _topPanel = new JPanel();
    FlowLayout fl__topPanel = (FlowLayout) _topPanel.getLayout();
    fl__topPanel.setHgap(0);
    fl__topPanel.setVgap(0);
    fl__topPanel.setAlignment(FlowLayout.LEFT);
    add(_topPanel, BorderLayout.NORTH);

    _lblRunParamaters = new JLabel("Neural Network Training - Run Parameters");
    _lblRunParamaters.setVerticalAlignment(SwingConstants.TOP);
    _topPanel.add(_lblRunParamaters);
  }
 /* WARNING: THIS METHOD WILL BE REGENERATED. */
 private java.awt.FlowLayout getPanel1FlowLayout() {
   java.awt.FlowLayout ivjPanel1FlowLayout = null;
   try {
     /* Create part */
     ivjPanel1FlowLayout = new java.awt.FlowLayout();
     ivjPanel1FlowLayout.setAlignment(java.awt.FlowLayout.RIGHT);
   } catch (java.lang.Throwable ivjExc) {
     handleException(ivjExc);
   }
   ;
   return ivjPanel1FlowLayout;
 }
Example #21
0
  /** Inits the dialog. */
  @Override
  protected void initDialog() {
    /* align buttons to the right */
    final FlowLayout layout = new FlowLayout();
    layout.setAlignment(FlowLayout.RIGHT);

    if (buttonClass(cancelButton()) != null) {
      buttonClass(cancelButton()).getParent().setLayout(layout);
    }

    /* disable back button if there is no previous dialog */
    if (previousDialog == null && buttonClass(backButton()) != null) {
      SwingUtilities.invokeLater(
          new Runnable() {
            @Override
            public void run() {
              buttonClass(backButton()).setEnabled(false);
            }
          });
    }

    /* disable next and finish buttons */
    if (buttonClass(nextButton()) != null) {
      SwingUtilities.invokeLater(
          new Runnable() {
            @Override
            public void run() {
              buttonClass(nextButton()).setEnabled(false);
            }
          });
    }
    if (buttonClass(finishButton()) != null) {
      SwingUtilities.invokeLater(
          new Runnable() {
            @Override
            public void run() {
              buttonClass(finishButton()).setEnabled(false);
            }
          });
    }
    if (buttonClass(retryButton()) != null) {
      SwingUtilities.invokeLater(
          new Runnable() {
            @Override
            public void run() {
              buttonClass(retryButton()).setVisible(false);
              buttonClass(retryButton()).setBackgroundColor(Color.RED);
            }
          });
    }
    disableComponents();
  }
Example #22
0
  // initialize panneau du bas
  public void initPanneauBas() {
    final int X = PADDING_X + 10;
    final int LARG_PANNEAU_BAS = LARG_FENETRE - (2 * X);
    final int HAUT_PANNEAU_BAS =
        HAUT_FENETRE - haut.getHeight() - milieu.getHeight() - PADDING_Y - 50;
    final int VGAP = HAUT_PANNEAU_BAS / 2;

    FlowLayout flowlayout = new FlowLayout();
    flowlayout.setVgap(VGAP);

    bas.setLayout(flowlayout);
    bas.setBounds(X, milieu.getY() + milieu.getHeight(), LARG_PANNEAU_BAS, HAUT_PANNEAU_BAS);
  }
Example #23
0
 /* WARNING: THIS METHOD WILL BE REGENERATED. */
 private java.awt.FlowLayout getJPanel1FlowLayout() {
   java.awt.FlowLayout ivjJPanel1FlowLayout = null;
   try {
     /* Create part */
     ivjJPanel1FlowLayout = new java.awt.FlowLayout();
     ivjJPanel1FlowLayout.setVgap(10);
     ivjJPanel1FlowLayout.setHgap(60);
   } catch (Throwable ivjExc) {
     handleException(ivjExc);
   }
   ;
   return ivjJPanel1FlowLayout;
 }
Example #24
0
  private void initBottomPanel() {
    _bottomPanel = new JPanel();
    FlowLayout flowLayout = (FlowLayout) _bottomPanel.getLayout();
    flowLayout.setVgap(0);
    flowLayout.setHgap(0);
    flowLayout.setAlignment(FlowLayout.LEFT);
    add(_bottomPanel, BorderLayout.SOUTH);

    _lblDefSSE = new JLabel("SSE* = Sum of Squared Error");
    _lblDefSSE.setHorizontalAlignment(SwingConstants.LEFT);
    _lblDefSSE.setVerticalAlignment(SwingConstants.TOP);
    _bottomPanel.add(_lblDefSSE);
  }
Example #25
0
 /**
  * This method initializes resultProgressPanel4
  *
  * @return javax.swing.JPanel
  */
 private JPanel getResultProgressPanel4() {
   if (resultProgressPanel4 == null) {
     FlowLayout flowLayout = new FlowLayout();
     flowLayout.setAlignment(FlowLayout.LEFT);
     flowLayout.setHgap(0);
     resultProgressPanel4 = new JPanel();
     resultProgressPanel4.setLayout(flowLayout);
     resultProgressPanel4.setName("resultInProgressPanel4");
     resultProgressPanel4.setBackground(WINDOW_BACKGROUND_COLOR);
     resultProgressPanel4.add(getResultProgressBar4(), null);
   }
   return resultProgressPanel4;
 }
 /**
  * This method initializes panelStatus
  *
  * @return javax.swing.JPanel
  */
 private JPanel getPanelStatus() {
   if (panelStatus == null) {
     FlowLayout flowLayout1 = new FlowLayout();
     flowLayout1.setAlignment(java.awt.FlowLayout.LEFT);
     flowLayout1.setVgap(0);
     flowLayout1.setHgap(0);
     panelStatus = new JPanel();
     panelStatus.setLayout(flowLayout1);
     panelStatus.setPreferredSize(new Dimension(5, 25));
     panelStatus.add(getPanelServidorStatus(), null);
   }
   return panelStatus;
 }
Example #27
0
  /**
   * Descripción de Método
   *
   * @throws Exception
   */
  private void jbInit() throws Exception {
    this.setLayout(mainLayout);
    this.add(splitPane, BorderLayout.CENTER);
    splitPane.setOpaque(false);
    graphPanel.setLayout(graphLayout);

    //

    splitPane.add(graphPanel, JSplitPane.LEFT);
    splitPane.add(cardPanel, JSplitPane.RIGHT);
    splitPane.setBorder(null);
    splitPane.setName("gc_splitPane");

    //

    cardPanel.setLayout(cardLayout);
    cardPanel.add(srPane, "srPane"); // Sequence Important!
    cardPanel.add(mrPane, "mrPane");
    cardPanel.setBorder(null);
    cardPanel.setName("gc_cardPanel");

    // single row (w/o xPane it would be centered)

    srPane.setBorder(null);
    srPane.setName("gc_srPane");
    srPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    srPane.add(vPane, JSplitPane.TOP);
    srPane.setTopComponent(vPane);
    vPane.getViewport().add(xPanel, null);
    xPanel.add(vPanel);
    vPane.setBorder(null);
    xPanel.setLayout(xLayout);
    xPanel.setName("gc_xPanel");
    xLayout.setAlignment(FlowLayout.LEFT);
    xLayout.setHgap(0);
    xLayout.setVgap(0);

    // multi-row

    mrPane.setBorder(null);
    mrPane.getViewport().add(vTable, null);
    mrPane.setName("gc_mrPane");

    //

    graphPanel.setBorder(null);
    graphPanel.setName("gc_graphPanel");
    srPane.setDividerLocation(200);
  } // jbInit
Example #28
0
 private void init() {
   FlowLayout fo = new FlowLayout();
   this.setLayout(fo);
   fo.setAlignment(FlowLayout.LEFT);
   iconLabel = new JLabel();
   displayNameField = new JLabel(this.mart.getDisplayName());
   this.add(iconLabel);
   this.add(displayNameField);
   this.refreshIcon();
   this.addMouseListener(this);
   DragSource ds = new DragSource();
   ds.createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY, this);
   this.setBorder(BorderFactory.createLineBorder(this.getBackground()));
   this.setOpaque(true);
 }
Example #29
0
  /** コンストラクタ �?��ンポ�?ネント�?期化 */
  public LoungeFrame() {
    super("Lounge");

    setBounds(100, 100, 320, 500);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    JPanel topPanel = new JPanel();
    FlowLayout fl = new FlowLayout();
    fl.setAlignment(FlowLayout.LEFT);
    topPanel.setLayout(fl);
    topPanel.setPreferredSize(new Dimension(40, 40));

    joinBtn = new JButton("参加");
    joinBtn.setPreferredSize(new Dimension(60, 25));
    joinBtn.addActionListener(new JoinListener());
    topPanel.add(joinBtn);

    ceaseBtn = new JButton("退室");
    ceaseBtn.setPreferredSize(new Dimension(60, 25));
    ceaseBtn.addActionListener(new CeaseListener());
    ceaseBtn.setEnabled(false);
    topPanel.add(ceaseBtn);

    startBtn = new JButton("開始");
    startBtn.setPreferredSize(new Dimension(60, 25));
    startBtn.addActionListener(new StartListener());
    startBtn.setEnabled(false);
    topPanel.add(startBtn);

    JPanel mainPanel = new JPanel();
    FlowLayout fl2 = new FlowLayout();
    fl2.setAlignment(FlowLayout.CENTER);
    mainPanel.setLayout(fl2);
    mainPanel.setPreferredSize(new Dimension(400, 400));

    visitorPanel = new JScrollPane();
    visitorPanel.setPreferredSize(new Dimension(150, 300));
    mainPanel.add(visitorPanel);

    playerPanel = new JScrollPane();
    playerPanel.setPreferredSize(new Dimension(150, 300));
    mainPanel.add(playerPanel);

    add(topPanel, BorderLayout.NORTH);
    add(mainPanel, BorderLayout.CENTER);

    setVisible(true);
  }
 private void jbInit() throws Exception {
   border1 = BorderFactory.createEmptyBorder(20, 20, 20, 20);
   contentPane.setBorder(border1);
   contentPane.setLayout(borderLayout1);
   controlsPane.setLayout(gridLayout1);
   gridLayout1.setColumns(1);
   gridLayout1.setHgap(10);
   gridLayout1.setRows(0);
   gridLayout1.setVgap(10);
   okButton.setVerifyInputWhenFocusTarget(true);
   okButton.setMnemonic('O');
   okButton.setText("OK");
   buttonsPane.setLayout(flowLayout1);
   flowLayout1.setAlignment(FlowLayout.CENTER);
   messagePane.setEditable(false);
   messagePane.setText("");
   borderLayout1.setHgap(10);
   borderLayout1.setVgap(10);
   this.setTitle("Subscription Authorization");
   this.getContentPane().add(contentPane, BorderLayout.CENTER);
   contentPane.add(controlsPane, BorderLayout.SOUTH);
   controlsPane.add(responsesComboBox, null);
   controlsPane.add(buttonsPane, null);
   buttonsPane.add(okButton, null);
   contentPane.add(messageScrollPane, BorderLayout.CENTER);
   messageScrollPane.getViewport().add(messagePane, null);
 }