Exemple #1
0
 /**
  * This method initializes jButtonSands
  *
  * @return javax.swing.JButton
  */
 private JButton getJButtonSands() {
   if (jButtonSands == null) {
     jButtonSands = new JButton();
     jButtonSands.setIcon(
         new ImageIcon(LobbySuite.class.getResource("/simplytech/image/SandsSuite.jpg")));
     jButtonSands.setVerticalAlignment(SwingConstants.BOTTOM);
     jButtonSands.setVerticalTextPosition(SwingConstants.BOTTOM);
     jButtonSands.setText("Sands Suite");
     jButtonSands.setPreferredSize(new Dimension(200, 200));
     jButtonSands.setHorizontalTextPosition(SwingConstants.CENTER);
     jButtonSands.setBackground(new Color(91, 155, 213));
     jButtonSands.setBounds(new Rectangle(565, 100, 161, 151));
     jButtonSands.setFont(new Font("Arial", Font.BOLD, 12));
     jButtonSands.addActionListener(
         new java.awt.event.ActionListener() {
           public void actionPerformed(java.awt.event.ActionEvent e) {
             JPanel panel = new SandsSuite(myFrame);
             myFrame.getContentPane().removeAll();
             myFrame.getContentPane().add(panel);
             myFrame.getContentPane().validate();
             myFrame.getContentPane().repaint();
           }
         });
   }
   return jButtonSands;
 }
Exemple #2
0
 /**
  * This method initializes jButtonPresidential
  *
  * @return javax.swing.JButton
  */
 private JButton getJButtonPresidential() {
   if (jButtonPresidential == null) {
     jButtonPresidential = new JButton();
     jButtonPresidential.setVerticalAlignment(SwingConstants.BOTTOM);
     jButtonPresidential.setVerticalTextPosition(SwingConstants.BOTTOM);
     jButtonPresidential.setLocation(new Point(800, 270));
     jButtonPresidential.setSize(new Dimension(161, 151));
     jButtonPresidential.setIcon(
         new ImageIcon(LobbySuite.class.getResource("/simplytech/image/PresidentialSuite.jpg")));
     jButtonPresidential.setText("Presidential Suite");
     jButtonPresidential.setHorizontalTextPosition(SwingConstants.CENTER);
     jButtonPresidential.setFont(new Font("Arial", Font.BOLD, 12));
     jButtonPresidential.setBackground(new Color(91, 155, 213));
     jButtonPresidential.addActionListener(
         new java.awt.event.ActionListener() {
           public void actionPerformed(java.awt.event.ActionEvent e) {
             JPanel panel = new PresidentialSuite(myFrame);
             myFrame.getContentPane().removeAll();
             myFrame.getContentPane().add(panel);
             myFrame.getContentPane().validate();
             myFrame.getContentPane().repaint();
           }
         });
   }
   return jButtonPresidential;
 }
 private void initButton(JButton button) {
   button.setText("");
   button.setBorder(RAISED_BORDER);
   button.setBorderPainted(false);
   button.setFocusPainted(false);
   button.setHorizontalAlignment(SwingConstants.CENTER);
   button.setVerticalAlignment(SwingConstants.CENTER);
 }
  public void initComponents() {
    /** ******************** The main container *************************** */
    Container container = this.getContentPane();
    container.setLayout(new BorderLayout());
    container.setBackground(Color.black);
    this.setSize(650, 600);
    this.addWindowListener(
        new WindowAdapter() {
          @Override
          public void windowClosing(WindowEvent e) {}
        });

    /** ************************* MAIN PANEL ******************************* */
    mainPanel = new JPanel();
    // If put to False: we see the container's background
    mainPanel.setOpaque(false);
    mainPanel.setLayout(new BorderLayout());
    container.add(mainPanel, BorderLayout.CENTER);

    allmessagesTextArea = new TextArea();
    allmessagesTextArea.setEditable(false);
    allmessagesTextArea.setFont(new Font("Dialog", 1, 12));
    allmessagesTextArea.setForeground(Color.black);
    allmessagesTextArea.append("Select a session in the list to view its messages");
    mainPanel.add(allmessagesTextArea, BorderLayout.CENTER);

    sessionsList = new List();
    sessionsList.addItemListener(
        new ItemListener() {
          @Override
          public void itemStateChanged(ItemEvent e) {
            showMessages(e);
          }
        });
    sessionsList.setForeground(Color.black);
    sessionsList.setFont(new Font("Dialog", 1, 14));
    mainPanel.add(sessionsList, BorderLayout.WEST);

    okButton = new JButton("  OK  ");
    okButton.setToolTipText("Returns to the main frame");
    okButton.setFont(new Font("Dialog", 1, 16));
    okButton.setFocusPainted(false);
    okButton.setBackground(Color.lightGray);
    okButton.setBorder(new BevelBorder(BevelBorder.RAISED));
    okButton.setVerticalAlignment(SwingConstants.CENTER);
    okButton.setHorizontalAlignment(SwingConstants.CENTER);
    container.add(okButton, BorderLayout.SOUTH);
    okButton.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent evt) {
            setVisible(false);
          }
        });
  }
 private void setLookLowered(JButton button) {
   button.setBorder(LOWERED_BORDER);
   button.setHorizontalAlignment(SwingConstants.RIGHT);
   button.setVerticalAlignment(SwingConstants.BOTTOM);
   button.setBorderPainted(true);
 }
 private void setLookRaised(JButton button) {
   button.setBorder(RAISED_BORDER);
   button.setHorizontalAlignment(SwingConstants.CENTER);
   button.setVerticalAlignment(SwingConstants.CENTER);
   button.setBorderPainted(true);
 }
  /**
   * Create a toolbar containing the given tools (if any).
   *
   * @param template Conta
   */
  protected void changeToolBar(JComponent[] template, IControlCenterPlugin selplugin) {
    // Setup the tool bar.
    if (toolbar == null) {
      toolbar = new JToolBar("Main Toolbar");
      getContentPane().add(BorderLayout.NORTH, toolbar);
      // Add standard entries (after gap).
      toolbar.add(Box.createGlue());
      toolcnt++;
      toolbar.addSeparator();
      toolcnt++;

      // ButtonGroup bg = new ButtonGroup();
      IControlCenterPlugin[] plugins = controlcenter.getPlugins();
      for (int i = 0; i < plugins.length; i++) {
        final IControlCenterPlugin plugin = plugins[i];
        // final JToggleButton button = new JToggleButton(new PluginAction(plugins[i]));
        final JButton button = new JButton(new PluginAction(plugins[i]));
        Icon ic = plugin.getToolIcon(selplugin.getName().equals(plugins[i].getName()));
        if (ic != null) button.setIcon(ic);
        else button.setText(plugins[i].getName());
        button.setText("A");
        button.putClientProperty("plugin", plugins[i]);
        button.setBorder(null);
        button.setText(null);
        button.setMinimumSize(BUTTON_DIM);
        button.setHorizontalAlignment(SwingConstants.CENTER);
        button.setVerticalAlignment(SwingConstants.CENTER);
        button.setToolTipText(plugins[i].getName());
        button
            .getModel()
            .addItemListener(
                new ItemListener() {
                  public void itemStateChanged(ItemEvent e) {
                    // System.out.println(plugin.getName()+" :"+button.isSelected());
                    button.setIcon(plugin.getToolIcon(button.isSelected()));
                  }
                });
        //	            if(plugins[i].getHelpID()!=null)
        //	            	SHelp.setupHelp(button, plugins[i].getHelpID());

        // bg.add(button);
        toolbar.add(button);
        toolcnt++;
      }
      toolbar.addSeparator();
      toolcnt++;
      toolbar.add(new JadexLogoButton(toolbar));
      toolcnt++;
    } else {
      while (toolbar.getComponentCount() > toolcnt) {
        //				Component	comp	= toolbar.getComponent(0);
        toolbar.remove(0);
        // if(lasttoolbar!=null)
        //	lasttoolbar.add(comp);
      }
    }

    for (int i = 0; template != null && i < template.length; i++) toolbar.add(template[i], i);
    // lasttoolbar	= template;

    // Select plugins
    for (int i = 0; i < toolbar.getComponentCount(); i++) {
      JComponent comp = (JComponent) toolbar.getComponent(i);
      if (comp.getClientProperty("plugin") != null) {
        IControlCenterPlugin pl = (IControlCenterPlugin) comp.getClientProperty("plugin");
        ((JButton) comp).setIcon(pl.getToolIcon(pl.equals(selplugin)));
        // ((JToggleButton)comp).setSelected(pluginname.equals(comp.getClientProperty("pluginname")));
      }
    }

    toolbar.validate();
    toolbar.repaint();

    // If toolbar has been dropped out -> pack the window (hack???).
    Container root = toolbar;
    while (root.getParent() != null && !(root instanceof Window)) root = root.getParent();
    if (root != null && !(root instanceof JFrame)) {
      ((Window) root).pack();
    }
  }
Exemple #8
0
  /** *********************************************************************** */
  private void initComponents() {

    /** ******************** The main container *************************** */
    Container container = this.getContentPane();
    container.setLayout(new BoxLayout(container, BoxLayout.Y_AXIS));
    // container.setLayout( new PercentLayout() );
    container.setBackground(Color.black);

    addWindowListener(
        new WindowAdapter() {
          @Override
          public void windowClosing(WindowEvent e) {
            System.out.println("Trace viewer closed!");
            // System.exit(0);
          }
        });

    /** ******************** Menu bar ************************************* */
    menuBar = new JMenuBar();
    setJMenuBar(menuBar);

    // Build a second menu in the menu bar.
    optionsMenu = new JMenu("      Options      ");
    optionsMenu.setBorder(new BevelBorder(BevelBorder.RAISED));
    optionsMenu.setToolTipText("Some options related to the GUI");
    animationMenuItem = new JMenuItem("    Animation    ");
    animationMenuItem.setToolTipText("Animation of the entire selected session");
    animationMenuItem.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent evt) {
            listenerTracesViewer.animationActionPerformed(evt);
          }
        });
    optionsMenu.add(animationMenuItem);
    menuBar.add(optionsMenu);

    // create a menu and add it to the menubar
    displayAllSessionsMenu = new JMenu("    Display Sessions    ");
    displayAllSessionsMenu.setBorder(new BevelBorder(BevelBorder.RAISED));
    displayAllSessionsMenu.setToolTipText(
        "Display all the retrieved sessions in a separate windows");
    displayAllSessionsMenu.addMouseListener(
        new MouseAdapter() {
          @Override
          public void mouseClicked(MouseEvent evt) {
            listenerTracesViewer.displayAllSessionsMouseEvent(evt);
          }
        });
    // add the Controls menu to the menu bar
    menuBar.add(displayAllSessionsMenu);

    // create a menu and add it to the menubar
    refreshMenu = new JMenu("   Refresh   ");
    refreshMenu.setBorder(new BevelBorder(BevelBorder.RAISED));
    refreshMenu.setBackground(new Color(51, 153, 255));
    refreshMenu.setToolTipText("Get the new traces");
    refreshMenu.addMouseListener(
        new MouseAdapter() {
          @Override
          public void mouseClicked(MouseEvent evt) {
            listenerTracesViewer.refreshActionPerformed(evt);
          }
        });
    // add the Controls menu to the menu bar
    menuBar.add(refreshMenu);

    // ...create and add some menus...
    menuBar.add(Box.createHorizontalGlue());

    helpMenu = new JMenu("    Help    ");
    helpMenu.setBorder(new BevelBorder(BevelBorder.RAISED));
    helpMenu.setToolTipText("Some useful notes about this tool");
    helpMenu.addMouseListener(
        new MouseAdapter() {
          @Override
          public void mouseClicked(MouseEvent evt) {
            listenerTracesViewer.helpMenuMouseEvent(evt);
          }
        });
    menuBar.add(helpMenu);

    aboutMenu = new JMenu("    About    ");
    aboutMenu.setBorder(new BevelBorder(BevelBorder.RAISED));
    aboutMenu.setToolTipText("Some advertises about the creators!");
    aboutMenu.addMouseListener(
        new MouseAdapter() {
          @Override
          public void mouseClicked(MouseEvent evt) {
            listenerTracesViewer.aboutMenuMouseEvent(evt);
          }
        });
    menuBar.add(aboutMenu);

    quitMenu = new JMenu("    Quit    ");
    quitMenu.setBorder(new BevelBorder(BevelBorder.RAISED));
    quitMenu.setToolTipText("Quit the traces viewer");
    quitMenu.addMouseListener(
        new MouseAdapter() {
          @Override
          public void mouseClicked(MouseEvent evt) {
            close();
          }
        });
    menuBar.add(quitMenu);

    /** ****************** FIRST PANEL ******************************* */
    firstPanel = new JPanel();
    // If put to False: we see the container's background
    firstPanel.setOpaque(false);
    firstPanel.setLayout(new PercentLayout());
    // firstPanel.setLayout(  new BorderLayout() );
    container.add(firstPanel);

    // Sub right panel:
    // topx %, topy %, width %, height % 73, 100-> 65, 95
    PercentLayoutConstraint firstPanelConstraint = new PercentLayoutConstraint(30, 0, 70, 100);
    tracesSessionsList = new TracesSessionsList();
    tracesSessionsList.addItemListener(
        new ItemListener() {
          @Override
          public void itemStateChanged(ItemEvent e) {
            listenerTracesViewer.tracesSessionsListStateChanged(e);
          }
        });
    tracesSessionsList.setForeground(Color.black);
    tracesSessionsList.setFont(new Font("Dialog", 1, 14));

    ScrollPane scroll = new ScrollPane(ScrollPane.SCROLLBARS_ALWAYS);
    TracesSession tracesSession = tracesSessions.firstElement();
    String name = tracesSession.getName();
    String logDescription = tracesSession.getLogDescription();
    String callId = tracesSessionsList.getCallId(name);
    String origin = tracesSessionsList.getOrigin(name);

    // Warning: to put before for the canvas!!!!
    TextArea messageContentTextArea = new TextArea();
    messageContentButton = new JButton("SIP Message:");
    if (name.equals("No available session, refresh")) {
      tracesCanvas = new TracesCanvas(tracesSession, messageContentTextArea, "unknown", this);
    } else if (logDescription == null || logDescription.trim().equals("")) {
      tracesCanvas = new TracesCanvas(tracesSession, messageContentTextArea, origin, this);
    } else {
      //  System.out.println("logDesc44:"+logDescription);
      tracesCanvas = new TracesCanvas(tracesSession, messageContentTextArea, logDescription, this);
    }

    tracesSessionsList.setTracesCanvas(tracesCanvas);
    // The ScrollPane for the Canvas
    scroll.add(tracesCanvas);
    firstPanel.add(scroll, firstPanelConstraint);

    /** ************************* SECOND PANEL ******************************* */

    //  left panel:
    secondPanel = new JPanel();
    secondPanel.setBackground(Color.black);
    // rows, columns
    //  secondPanel.setLayout(new GridLayout(3,1,0,0) );
    secondPanel.setLayout(new BorderLayout());
    // topx %, topy %, width %, height %
    PercentLayoutConstraint secondPanelConstraint = new PercentLayoutConstraint(0, 0, 30, 100);
    firstPanel.add(secondPanel, secondPanelConstraint);

    /** **************************** FIRST SUB PANEL ********************************* */

    // Sub left panel:
    firstSubPanel = new JPanel();
    firstSubPanel.setBackground(Color.black);
    // Top, left, bottom, right
    firstSubPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 7, 5));

    if (!standaloneViewer) {
      // rows, columns, gap, gap
      firstSubPanel.setLayout(new GridLayout(2, 1, 3, 6));
      secondPanel.add(firstSubPanel, BorderLayout.NORTH);

      JPanel panelGrid = new JPanel();
      panelGrid.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
      panelGrid.setLayout(new GridLayout(2, 1, 0, 0));

      JPanel panelBox = new JPanel();
      panelBox.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
      panelBox.setLayout(new BorderLayout());

      JLabel scriptLabel = new JLabel("Display the event script:");
      scriptLabel.setToolTipText("Display the content of the selected script");

      scriptLabel.setHorizontalAlignment(SwingConstants.CENTER);
      scriptLabel.setForeground(Color.black);
      scriptLabel.setFont(new Font("Dialog", 1, 14));
      // If put to true: we see the label's background
      scriptLabel.setOpaque(true);
      panelGrid.add(scriptLabel);

      choice = new Choice();
      panelBox.add(choice, BorderLayout.CENTER);

      scriptButton = new JButton("Open");
      scriptButton.setToolTipText("Get the script controlling the current session");
      scriptButton.setFont(new Font("Dialog", 1, 14));
      scriptButton.setFocusPainted(false);
      scriptButton.setBackground(new Color(186, 175, 175));
      scriptButton.setBorder(new BevelBorder(BevelBorder.RAISED));
      scriptButton.setVerticalAlignment(SwingConstants.CENTER);
      scriptButton.setHorizontalAlignment(SwingConstants.CENTER);
      panelBox.add(scriptButton, BorderLayout.EAST);
      scriptButton.addActionListener(
          new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent evt) {
              listenerTracesViewer.scriptActionPerformed(evt);
            }
          });
      panelGrid.add(panelBox);
      firstSubPanel.add(panelGrid);
      // initComboBox();

      /*
      refreshButton=new JButton("Refresh");
      refreshButton.setToolTipText("Refresh all the sessions");
      refreshButton.setFont(new Font ("Dialog", 1, 14));
      refreshButton.setFocusPainted(false);
      //refreshButton.setBackground(new Color(186,175,175));
      refreshButton.setBackground( new Color(51,153,255));
      refreshButton.setBorder(new BevelBorder(BevelBorder.RAISED));
      refreshButton.setVerticalAlignment(AbstractButton.CENTER);
      refreshButton.setHorizontalAlignment(AbstractButton.CENTER);
      firstSubPanel.add(refreshButton);
      refreshButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
               listenerTracesViewer.refreshActionPerformed(evt);
         }
      }
      );
       */
      ImageIcon icon;
      if (logoNist != null) {
        icon = new ImageIcon(logoNist);

        JLabel label = new JLabel(icon);
        label.setVisible(true);
        label.setToolTipText("The NIST logo!!!");
        // label.setHorizontalAlignment(AbstractButton.CENTER);
        label.setForeground(Color.black);
        // label.setFont(new Font ("Dialog", 1, 14));
        label.setOpaque(false);
        firstSubPanel.add(label);
      }
    } else {
      // rows, columns, gap, gap
      firstSubPanel.setLayout(new GridLayout(1, 1, 3, 6));
      secondPanel.add(firstSubPanel, BorderLayout.NORTH);

      ImageIcon icon;
      if (logoNist != null) {
        icon = new ImageIcon(logoNist);
        JLabel label = new JLabel(icon);
        label.setVisible(true);
        label.setToolTipText("The NIST logo!!!");
        label.setHorizontalAlignment(SwingConstants.CENTER);
        label.setForeground(Color.black);
        label.setFont(new Font("Dialog", 1, 14));
        label.setOpaque(false);
        firstSubPanel.add(label);
      }
    }

    /** **************** SECOND SUB PANEL *************************************** */
    JPanel panel = new JPanel();
    panel.setLayout(new GridLayout(2, 1, 0, 0));
    secondPanel.add(panel, BorderLayout.CENTER);
    secondSubPanel = new JPanel();
    secondSubPanel.setBackground(Color.black);
    secondSubPanel.setLayout(new BorderLayout());
    // secondPanel.add(secondSubPanel);
    panel.add(secondSubPanel);

    sessionsLabel = new JLabel("Sessions available:");
    sessionsLabel.setToolTipText("All the sessions currently available");
    // Alignment of the text
    sessionsLabel.setHorizontalAlignment(SwingConstants.CENTER);
    // Color of the text
    sessionsLabel.setForeground(Color.black);
    // Size of the text
    sessionsLabel.setFont(new Font("Dialog", 1, 14));
    // If put to true: we see the label's background
    sessionsLabel.setOpaque(true);
    sessionsLabel.setBackground(Color.lightGray);
    sessionsLabel.setBorder(BorderFactory.createLineBorder(Color.darkGray));
    secondSubPanel.add(sessionsLabel, BorderLayout.NORTH);

    ScrollPane scrollList = new ScrollPane(ScrollPane.SCROLLBARS_ALWAYS);
    scrollList.add(tracesSessionsList);
    // secondSubPanel.add(scrollList,BorderLayout.CENTER);
    secondSubPanel.add(tracesSessionsList, BorderLayout.CENTER);

    /** ****************** THIRD SUB PANEL *************************************** */
    thirdSubPanel = new JPanel();
    thirdSubPanel.setBackground(Color.black);
    thirdSubPanel.setLayout(new BorderLayout());
    // secondPanel.add(thirdSubPanel);
    panel.add(thirdSubPanel);

    messageContentButton.setToolTipText("Display all the content of the current SIP message");
    // Alignment of the text
    messageContentButton.setHorizontalAlignment(SwingConstants.CENTER);
    // Color of the text
    messageContentButton.setForeground(Color.black);
    // Size of the text
    messageContentButton.setFont(new Font("Dialog", 1, 14));
    // If put to true: we see the label's background
    messageContentButton.setOpaque(true);
    messageContentButton.setBackground(Color.lightGray);
    messageContentButton.setBorder(BorderFactory.createLineBorder(Color.darkGray));
    messageContentButton.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent evt) {
            listenerTracesViewer.debugActionPerformed(evt);
          }
        });
    messageContentTextArea.setBackground(Color.white);
    messageContentTextArea.setEditable(false);
    messageContentTextArea.setFont(new Font("Dialog", 1, 12));
    messageContentTextArea.setForeground(Color.black);
    thirdSubPanel.add(messageContentButton, BorderLayout.NORTH);
    thirdSubPanel.add(messageContentTextArea, BorderLayout.CENTER);

    validateTree();
  }
Exemple #9
0
 @Override
 public void setVerticalAlignment(int alignment) {
   super.setVerticalAlignment(alignment);
   if (label != null) label.setVerticalAlignment(alignment);
 }
Exemple #10
0
  private void initCenterRightPanel() {
    _centerRightPanel = new JPanel();
    add(_centerRightPanel, BorderLayout.CENTER);
    GridBagLayout gbl__centerRightPanel = new GridBagLayout();
    gbl__centerRightPanel.columnWidths = new int[] {0, 0, 0};
    gbl__centerRightPanel.rowHeights = new int[] {0, 0, 0, 0, 0, 0};
    gbl__centerRightPanel.columnWeights = new double[] {0.0, 0.0, Double.MIN_VALUE};
    gbl__centerRightPanel.rowWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
    _centerRightPanel.setLayout(gbl__centerRightPanel);

    _lblNetName = new JLabel("Network");
    _lblNetName.setHorizontalAlignment(SwingConstants.LEFT);
    GridBagConstraints gbc__lblNetName = new GridBagConstraints();
    gbc__lblNetName.fill = GridBagConstraints.VERTICAL;
    gbc__lblNetName.anchor = GridBagConstraints.WEST;
    gbc__lblNetName.insets = new Insets(0, 0, 5, 5);
    gbc__lblNetName.gridx = 0;
    gbc__lblNetName.gridy = 0;
    _centerRightPanel.add(_lblNetName, gbc__lblNetName);

    _txtNetName = new JTextField();
    _txtNetName.setText("<name>");
    _txtNetName.setColumns(15);
    GridBagConstraints gbc__txtNetName = new GridBagConstraints();
    gbc__txtNetName.insets = new Insets(0, 0, 5, 0);
    gbc__txtNetName.anchor = GridBagConstraints.NORTHWEST;
    gbc__txtNetName.gridx = 1;
    gbc__txtNetName.gridy = 0;
    _centerRightPanel.add(_txtNetName, gbc__txtNetName);

    _lblStructure = new JLabel("Structure:");
    GridBagConstraints gbc_lblStructure = new GridBagConstraints();
    gbc_lblStructure.anchor = GridBagConstraints.WEST;
    gbc_lblStructure.insets = new Insets(0, 0, 5, 5);
    gbc_lblStructure.gridx = 0;
    gbc_lblStructure.gridy = 1;
    _centerRightPanel.add(_lblStructure, gbc_lblStructure);

    _lblInputLayer = new JLabel("Input Layer");
    GridBagConstraints gbc__lblInputLayer = new GridBagConstraints();
    gbc__lblInputLayer.anchor = GridBagConstraints.WEST;
    gbc__lblInputLayer.insets = new Insets(0, 0, 5, 5);
    gbc__lblInputLayer.gridx = 0;
    gbc__lblInputLayer.gridy = 2;
    _centerRightPanel.add(_lblInputLayer, gbc__lblInputLayer);

    _txtInputNeurons = new JTextField();
    _txtInputNeurons.setText("<#neurons>");
    GridBagConstraints gbc__txtInputNeurons = new GridBagConstraints();
    gbc__txtInputNeurons.anchor = GridBagConstraints.WEST;
    gbc__txtInputNeurons.insets = new Insets(0, 0, 5, 0);
    gbc__txtInputNeurons.gridx = 1;
    gbc__txtInputNeurons.gridy = 2;
    _centerRightPanel.add(_txtInputNeurons, gbc__txtInputNeurons);
    _txtInputNeurons.setColumns(15);

    _lblMiddleLayers = new JLabel("Middle Layers");
    GridBagConstraints gbc__lblMiddleLayers = new GridBagConstraints();
    gbc__lblMiddleLayers.anchor = GridBagConstraints.NORTHWEST;
    gbc__lblMiddleLayers.insets = new Insets(0, 0, 5, 5);
    gbc__lblMiddleLayers.gridx = 0;
    gbc__lblMiddleLayers.gridy = 3;
    _centerRightPanel.add(_lblMiddleLayers, gbc__lblMiddleLayers);

    // Scroll panel
    _scrollPanel = new JPanel();
    GridBagConstraints gbc__scrollPanel = new GridBagConstraints();
    gbc__scrollPanel.fill = GridBagConstraints.HORIZONTAL;
    gbc__scrollPanel.anchor = GridBagConstraints.NORTH;
    gbc__scrollPanel.insets = new Insets(0, 0, 5, 0);
    gbc__scrollPanel.gridx = 1;
    gbc__scrollPanel.gridy = 3;
    _centerRightPanel.add(_scrollPanel, gbc__scrollPanel);
    _scrollPanel.setLayout(new BorderLayout(0, 0));

    _scrollCmdBar = new JPanel();
    FlowLayout fl__scrollCmdBar = (FlowLayout) _scrollCmdBar.getLayout();
    fl__scrollCmdBar.setVgap(2);
    fl__scrollCmdBar.setHgap(2);
    _scrollPanel.add(_scrollCmdBar, BorderLayout.SOUTH);

    _btnAddMiddleLayer = new JButton("+");
    _scrollCmdBar.add(_btnAddMiddleLayer);
    _btnAddMiddleLayer.setVerticalAlignment(SwingConstants.TOP);

    _btnDeleteMiddleLayer = new JButton("-");
    _scrollCmdBar.add(_btnDeleteMiddleLayer);
    _btnDeleteMiddleLayer.setVerticalAlignment(SwingConstants.TOP);

    _middleLayers = new JPanel();
    _middleLayers.setLayout(new VerticalLayout());

    _scrollMiddleLayers = new JScrollPane(_middleLayers);
    _scrollMiddleLayers.setPreferredSize(new Dimension(100, 120));
    _scrollPanel.add(_scrollMiddleLayers, BorderLayout.NORTH);

    _lblOutputLayer = new JLabel("Output Layer");
    GridBagConstraints gbc__lblOutputLayer = new GridBagConstraints();
    gbc__lblOutputLayer.anchor = GridBagConstraints.WEST;
    gbc__lblOutputLayer.insets = new Insets(0, 0, 0, 5);
    gbc__lblOutputLayer.gridx = 0;
    gbc__lblOutputLayer.gridy = 4;
    _centerRightPanel.add(_lblOutputLayer, gbc__lblOutputLayer);

    _txtOutputNeurons = new JTextField();
    _txtOutputNeurons.setText("<#neurons>");
    GridBagConstraints gbc__txtOutputNeurons = new GridBagConstraints();
    gbc__txtOutputNeurons.anchor = GridBagConstraints.WEST;
    gbc__txtOutputNeurons.gridx = 1;
    gbc__txtOutputNeurons.gridy = 4;
    _centerRightPanel.add(_txtOutputNeurons, gbc__txtOutputNeurons);
    _txtOutputNeurons.setColumns(15);
  }