Example usage for javax.swing JTabbedPane SCROLL_TAB_LAYOUT

List of usage examples for javax.swing JTabbedPane SCROLL_TAB_LAYOUT

Introduction

In this page you can find the example usage for javax.swing JTabbedPane SCROLL_TAB_LAYOUT.

Prototype

int SCROLL_TAB_LAYOUT

To view the source code for javax.swing JTabbedPane SCROLL_TAB_LAYOUT.

Click Source Link

Document

Tab layout policy for providing a subset of available tabs when all the tabs will not fit within a single run.

Usage

From source file:org.nebulaframework.ui.swing.cluster.ClusterMainUI.java

/**
 * Primary UI Setup Operations//ww w.j a  v a  2  s  .  c  om
 */
private void setupUI() {

    setTitle("Nebula Grid - Cluster Manager");
    setSize(WIDTH, HEIGHT);

    /* -- Menu Bar -- */
    setJMenuBar(setupMenu());

    /* -- Content -- */

    setLayout(new BorderLayout());

    JPanel centerPanel = new JPanel();

    add(centerPanel, BorderLayout.CENTER);

    /* -- Setup Tabs -- */
    centerPanel.setLayout(new BorderLayout());
    JTabbedPane tabs = new JTabbedPane();
    tabs.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
    centerPanel.add(tabs);
    addUIElement("tabs", tabs); // Add to components map

    // General Tab
    tabs.addTab("General", setupGeneralTab());

    setupTrayIcon(this);

    // Create Job Start Hook
    ServiceEventsSupport.addServiceHook(new ServiceHookCallback() {
        public void onServiceEvent(final ServiceMessage message) {
            createJobTab(message.getMessage());
        }
    }, ServiceMessageType.JOB_START);
}

From source file:com.openbravo.pos.sales.restaurant.JRetailTicketsBagRestaurantMap.java

/**
 * Creates new form JTicketsBagRestaurant
 *//*w ww  .  j ava  2  s.c  o  m*/
public JRetailTicketsBagRestaurantMap(AppView app, RetailTicketsEditor panelticket, String businessType) {

    super(app, panelticket);
    this.m_App = app;
    dlReceipts = (DataLogicReceipts) app.getBean("com.openbravo.pos.sales.DataLogicReceipts");
    dlSales = (DataLogicSales) m_App.getBean("com.openbravo.pos.forms.DataLogicSales");
    dlSystem = (DataLogicSystem) m_App.getBean("com.openbravo.pos.forms.DataLogicSystem");

    m_restaurantmap = new JRetailTicketsBagRestaurant(app, this);
    m_PlaceCurrent = null;
    m_PlaceClipboard = null;
    customer = null;
    //Select all the floor details from db for showing the floor name in screen
    try {
        SentenceList sent = new StaticSentence(app.getSession(),
                "SELECT ID, NAME, IMAGE FROM FLOORS ORDER BY NAME", null, new SerializerReadClass(Floor.class));
        m_afloors = sent.list();

    } catch (BasicException eD) {
        m_afloors = new ArrayList<Floor>();
    }
    //Select all the tables details from db for showing the table names in screen
    try {
        SentenceList sent = new StaticSentence(app.getSession(),
                "SELECT ID, NAME, X, Y, FLOOR FROM PLACES WHERE NAME NOT LIKE 'takeaway' ORDER BY FLOOR", null,
                new SerializerReadClass(Place.class));
        m_aplaces = sent.list();
    } catch (BasicException eD) {
        m_aplaces = new ArrayList<Place>();
    }
    //Initialise the components
    initComponents();

    // add the Floors containers
    if (m_afloors.size() > 1) {
        // A tab container for 2 or more floors
        JTabbedPane jTabFloors = new JTabbedPane();
        jTabFloors.applyComponentOrientation(getComponentOrientation());
        jTabFloors.setBorder(new javax.swing.border.EmptyBorder(new Insets(5, 5, 5, 5)));
        jTabFloors.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
        jTabFloors.setFocusable(false);
        jTabFloors.setRequestFocusEnabled(false);
        m_jPanelMap.add(jTabFloors, BorderLayout.CENTER);

        for (Floor f : m_afloors) {
            f.getContainer().applyComponentOrientation(getComponentOrientation());

            JScrollPane jScrCont = new JScrollPane();
            jScrCont.applyComponentOrientation(getComponentOrientation());
            JPanel jPanCont = new JPanel();
            jPanCont.applyComponentOrientation(getComponentOrientation());

            jTabFloors.addTab(f.getName(), f.getIcon(), jScrCont);
            jScrCont.setViewportView(jPanCont);
            jPanCont.add(f.getContainer());
        }
    } else if (m_afloors.size() == 1) {
        // Just a frame for 1 floor
        Floor f = m_afloors.get(0);
        f.getContainer().applyComponentOrientation(getComponentOrientation());

        JPanel jPlaces = new JPanel();
        jPlaces.applyComponentOrientation(getComponentOrientation());
        jPlaces.setLayout(new BorderLayout());

        jPlaces.setBorder(new javax.swing.border.CompoundBorder(
                new javax.swing.border.EmptyBorder(new Insets(5, 5, 5, 5)),
                new javax.swing.border.TitledBorder(f.getName())));
        JScrollPane jScrCont = new JScrollPane();
        jScrCont.applyComponentOrientation(getComponentOrientation());
        JPanel jPanCont = new JPanel();
        jPanCont.applyComponentOrientation(getComponentOrientation());
        m_jPanelMap.add(jPlaces, BorderLayout.CENTER);
        jPlaces.add(jScrCont, BorderLayout.CENTER);
        jScrCont.setViewportView(jPanCont);
        jPanCont.add(f.getContainer());
    }

    // Add all the Table buttons.
    Floor currfloor = null;

    for (Place pl : m_aplaces) {
        int iFloor = 0;

        if (currfloor == null || !currfloor.getID().equals(pl.getFloor())) {
            // Look for a new floor
            do {
                currfloor = m_afloors.get(iFloor++);
            } while (!currfloor.getID().equals(pl.getFloor()));
        }

        currfloor.getContainer().add(pl.getButton());
        pl.setButtonBounds();
        pl.getButton().addActionListener(new MyActionListener(pl));
    }

    // Add the reservations panel
    m_jreservations = new JRetailTicketsBagRestaurantRes(app, this);
    add(m_jreservations, "res");
}

From source file:com.eviware.soapui.impl.wsdl.panels.request.AbstractWsdlRequestDesktopPanel.java

protected JComponent buildContent() {
    requestSplitPane = UISupport.createHorizontalSplit();
    requestSplitPane.setResizeWeight(0.5);
    requestSplitPane.setBorder(null);//  w w  w .  jav  a 2s  . co m

    submitButton = createActionButton(new SubmitAction(), true);
    cancelButton = createActionButton(new CancelAction(), false);
    splitButton = createActionButton(new ChangeSplitPaneOrientationAction(requestSplitPane), true);

    tabsButton = new JToggleButton(new ChangeToTabsAction());
    tabsButton.setPreferredSize(UISupport.TOOLBAR_BUTTON_DIMENSION);

    recreateButton = createActionButton(new RecreateRequestAction(request), true);
    cloneButton = createActionButton(new CloneRequestAction(request), true);
    createEmptyButton = createActionButton(new CreateEmptyRequestAction(request), true);

    submitButton.setEnabled(request.getEndpoint() != null && request.getEndpoint().trim().length() > 0);

    moveFocusAction = new MoveFocusAction();
    wsiValidateAction = new WSIValidateAction(request);
    wsiValidateAction.setEnabled(request.getResponse() != null);

    requestEditor = buildRequestEditor();
    responseEditor = buildResponseEditor();

    requestEditorTabs = new JTabbedPane(JTabbedPane.BOTTOM);
    requestEditorTabs.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
    requestEditorTabs.addTab("SOAP Request", requestEditor);
    requestEditorTabs.addTab("Request Attachments (" + request.getAttachmentCount() + ")",
            new AttachmentPanel(request, true));

    responseEditorTabs = new JTabbedPane(JTabbedPane.BOTTOM);
    responseEditorTabs.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
    responseEditorTabs.addTab("SOAP Response", responseEditor);
    responseEditorTabs.addTab(
            "Response Attachments ("
                    + (request.getResponse() == null ? 0 : request.getResponse().getAttachments().length) + ")",
            new AttachmentPanel(request, false));

    requestTabs = new JTabbedPane();
    requestTabPanel = UISupport.createTabPanel(requestTabs, true);

    requestEditorTabPanel = UISupport.createTabPanel(requestEditorTabs, false);
    responseEditorTabPanel = UISupport.createTabPanel(responseEditorTabs, false);

    if (request.getSettings().getBoolean(UISettings.START_WITH_REQUEST_TABS)) {
        requestTabs.addTab("Request", requestEditorTabPanel);
        requestTabs.addTab("Response", responseEditorTabPanel);
        splitButton.setEnabled(false);
        tabsButton.setSelected(true);
        return requestTabPanel;
    } else {
        requestSplitPane.setTopComponent(requestEditorTabPanel);
        requestSplitPane.setBottomComponent(responseEditorTabPanel);
        requestSplitPane.setDividerLocation(0.5);
        return requestSplitPane;
    }
}

From source file:au.org.ala.delta.editor.ui.ItemEditor.java

/**
 * Creates the user interface components of this dialog.
 *///w ww  . ja v a2 s.co  m
private void createUI() {

    JPanel content = new JPanel();
    JLabel lblTaxonNumber = new JLabel("Taxon Number:");
    lblTaxonNumber.setName("taxonNumberLabel");

    spinner = new JSpinner();
    spinner.setModel(new SpinnerNumberModel(1, 1, 1, 1));

    btnSelect = new JToggleButton("Select");
    btnSelect.setName("selectTaxonNumberButton");

    lblEditTaxonName = new JLabel(editTaxonLabelText);

    rtfEditor = new RtfEditor();
    editorScroller = new JScrollPane(rtfEditor);

    chckbxTreatAsVariant = new JCheckBox("Treat as Variant");
    chckbxTreatAsVariant.setName("treatAsVariantCheckbox");

    JPanel panel = new JPanel();

    btnDone = new JButton("Done");
    btnDone.setName("doneEditingTaxonButton");

    taxonSelectionList = new ItemList();

    GroupLayout groupLayout = new GroupLayout(content);
    groupLayout.setHorizontalGroup(groupLayout.createParallelGroup(Alignment.LEADING).addGroup(groupLayout
            .createSequentialGroup().addContainerGap()
            .addGroup(groupLayout.createParallelGroup(Alignment.LEADING).addGroup(groupLayout
                    .createSequentialGroup()
                    .addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
                            .addGroup(groupLayout.createSequentialGroup()
                                    .addGroup(groupLayout.createParallelGroup(Alignment.LEADING, false)
                                            .addComponent(spinner).addComponent(lblTaxonNumber,
                                                    GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                                    Short.MAX_VALUE))
                                    .addGap(18).addComponent(btnSelect))
                            .addComponent(chckbxTreatAsVariant))
                    .addGap(23)
                    .addGroup(groupLayout.createParallelGroup(Alignment.LEADING).addComponent(lblEditTaxonName)
                            .addComponent(editorScroller, GroupLayout.DEFAULT_SIZE, 703, Short.MAX_VALUE)))
                    .addGroup(groupLayout.createSequentialGroup()
                            .addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
                                    .addGroup(groupLayout.createSequentialGroup()
                                            .addGap(0, 759, Short.MAX_VALUE).addComponent(btnDone).addGap(5))
                                    .addComponent(panel, GroupLayout.DEFAULT_SIZE, 850, Short.MAX_VALUE))
                            .addGap(1)))
            .addGap(19)));
    groupLayout.setVerticalGroup(groupLayout.createParallelGroup(Alignment.LEADING).addGroup(groupLayout
            .createSequentialGroup().addContainerGap()
            .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE).addComponent(lblTaxonNumber)
                    .addComponent(lblEditTaxonName))
            .addPreferredGap(ComponentPlacement.RELATED)
            .addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
                    .addGroup(groupLayout.createSequentialGroup()
                            .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(spinner, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(btnSelect))
                            .addPreferredGap(ComponentPlacement.RELATED, 90, Short.MAX_VALUE)
                            .addComponent(chckbxTreatAsVariant))
                    .addComponent(editorScroller, GroupLayout.DEFAULT_SIZE, 131, Short.MAX_VALUE))
            .addGap(18).addComponent(panel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addPreferredGap(ComponentPlacement.UNRELATED)
            .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE).addComponent(btnDone)).addGap(17)));
    panel.setLayout(new BorderLayout(0, 0));

    JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
    imageDetails = new ImageDetailsPanel();
    imageDetails.setEnabled(false);
    tabbedPane.addTab("Images", imageDetails);
    panel.add(tabbedPane);
    content.setLayout(groupLayout);

    setPreferredSize(new Dimension(827, 500));
    setMinimumSize(new Dimension(748, 444));

    RtfToolBar toolbar = new RtfToolBar(this);
    toolbar.addEditor(rtfEditor);
    getContentPane().add(toolbar, BorderLayout.NORTH);
    getContentPane().add(content, BorderLayout.CENTER);
}

From source file:com.sec.ose.osi.ui.frm.main.identification.JPanIdentifyMain.java

/**
 * This method initializes jTabbedPane   
 *    /*from w  w  w.  ja  v a2s  .co m*/
 * @return javax.swing.JTabbedPane   
 */
public JTabbedPane getJTabbedPaneFileNavigation() {

    if (jTabbedPaneFileNavigation == null) {
        jTabbedPaneFileNavigation = new JTabbedPane();
        jTabbedPaneFileNavigation.addTab("Tree", null, getJScrollPaneTree(), null);
        jTabbedPaneFileNavigation.addTab("List", null, getJScrollPaneList(), null);
        jTabbedPaneFileNavigation.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
        jTabbedPaneFileNavigation.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                JTabbedPane pane = (JTabbedPane) e.getSource();
                int selectedTab = pane.getSelectedIndex();
                log.debug("[JPanIdentifyMain.getJTabbedPaneFileNavigation()]  selectedTab : " + selectedTab);

                SelectedFilePathInfo selectedFilePathInfo = IdentifyMediator.getInstance()
                        .getSelectedFilePathInfo();
                String selectedPath = selectedFilePathInfo.getSelectedPath();
                log.debug("[JPanIdentifyMain.getJTabbedPaneFileNavigation()]  selectedPath : " + selectedPath);
                IdentifyMediator.getInstance().setFilePointerToSelectedFile(selectedPath);

                actForTab(selectedTab);
                String projectName = IdentifyMediator.getInstance().getSelectedProjectName();
                refreshChildFrameForMatchedType(projectName);

            }

        });
    }
    return jTabbedPaneFileNavigation;
}

From source file:simMPLS.ui.simulator.JVentanaHija.java

/** Este mtodo es llamado desde el constructor para actualizar la mayor parte de
 * los atributos de la clase que tienen que ver con la interfaz de usuario. Es un
 * mtodo creado por NetBeans automaticamente.
 * @since 1.0/*from   www. j a v a  2 s .  c o m*/
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    diseElementoPopUp = new javax.swing.JPopupMenu();
    dEliminarMenuItem = new javax.swing.JMenuItem();
    dVerNombreMenuItem = new javax.swing.JCheckBoxMenuItem();
    jSeparator1 = new javax.swing.JSeparator();
    dPropiedadesMenuItem = new javax.swing.JMenuItem();
    diseFondoPopUp = new javax.swing.JPopupMenu();
    dVerNombresNodosMenuItem = new javax.swing.JMenuItem();
    dOcultarNombresNodosMenuItem = new javax.swing.JMenuItem();
    dVerNombresEnlacesMenuItem = new javax.swing.JMenuItem();
    dOcultarNombresEnlacesMenuItem = new javax.swing.JMenuItem();
    jSeparator2 = new javax.swing.JSeparator();
    dEliminarTodoMenuItem = new javax.swing.JMenuItem();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    panelDisenioSuperior = new javax.swing.JPanel();
    panelBotonesDisenio = new javax.swing.JPanel();
    iconoEmisor = new javax.swing.JLabel();
    iconoReceptor = new javax.swing.JLabel();
    iconoLER = new javax.swing.JLabel();
    iconoLERA = new javax.swing.JLabel();
    iconoLSR = new javax.swing.JLabel();
    iconoLSRA = new javax.swing.JLabel();
    iconoEnlace = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    panelDisenio = new simMPLS.ui.simulator.JPanelDisenio();
    panelSimulacionSuperior = new javax.swing.JPanel();
    panelBotonesSimulacion = new javax.swing.JPanel();
    iconoComenzar = new javax.swing.JLabel();
    iconoFinalizar = new javax.swing.JLabel();
    iconoReanudar = new javax.swing.JLabel();
    iconoPausar = new javax.swing.JLabel();
    barraDeProgreso = new javax.swing.JProgressBar();
    mlsPorTic = new javax.swing.JSlider();
    etiquetaMlsPorTic = new javax.swing.JLabel();
    crearTraza = new javax.swing.JCheckBox();
    jScrollPane2 = new javax.swing.JScrollPane();
    panelSimulacion = new simMPLS.ui.simulator.JSimulationPanel();
    panelAnalisisSuperior = new javax.swing.JPanel();
    panelSeleccionElemento = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    selectorElementoEstadisticas = new javax.swing.JComboBox();
    jScrollPane4 = new javax.swing.JScrollPane();
    panelAnalisis = new javax.swing.JPanel();
    panelFijo = new javax.swing.JPanel();
    etiquetaEstadisticasTituloEscenario = new javax.swing.JLabel();
    etiquetaEstadisticasNombreAutor = new javax.swing.JLabel();
    areaEstadisticasDescripcion = new javax.swing.JTextArea();
    etiquetaNombreElementoEstadistica = new javax.swing.JLabel();
    panelOpcionesSuperior = new javax.swing.JPanel();
    jScrollPane3 = new javax.swing.JScrollPane();
    panelOpciones = new javax.swing.JPanel();
    jPanel3 = new javax.swing.JPanel();
    jLabel5 = new javax.swing.JLabel();
    nombreEscenario = new javax.swing.JTextField();
    jLabel6 = new javax.swing.JLabel();
    nombreAutor = new javax.swing.JTextField();
    jLabel7 = new javax.swing.JLabel();
    descripcionEscenario = new javax.swing.JTextField();
    jPanel2 = new javax.swing.JPanel();
    jLabel3 = new javax.swing.JLabel();
    duracionMs = new javax.swing.JSlider();
    etiquetaDuracionMs = new javax.swing.JLabel();
    duracionNs = new javax.swing.JSlider();
    etiquetaDuracionNs = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    pasoNs = new javax.swing.JSlider();
    etiquetaPasoNs = new javax.swing.JLabel();

    diseElementoPopUp.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N

    dEliminarMenuItem.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    dEliminarMenuItem.setMnemonic(java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
            .getString("VentanaHija.PopUpDisenio.mne.Delete").charAt(0));
    java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes"); // NOI18N
    dEliminarMenuItem.setText(bundle.getString("VentanaHija.PopUpDisenio.Delete")); // NOI18N
    dEliminarMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            clicEnPopUpDisenioEliminar(evt);
        }
    });
    diseElementoPopUp.add(dEliminarMenuItem);

    dVerNombreMenuItem.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    dVerNombreMenuItem.setMnemonic(java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
            .getString("VentanaHija.PopUpDisenio.mne.verNombre").charAt(0));
    dVerNombreMenuItem.setText(bundle.getString("VentanaHija.PopUpDisenio.verNombre")); // NOI18N
    dVerNombreMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            clicEnPopUpDisenioVerNombre(evt);
        }
    });
    diseElementoPopUp.add(dVerNombreMenuItem);
    diseElementoPopUp.add(jSeparator1);

    dPropiedadesMenuItem.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    dPropiedadesMenuItem.setMnemonic(java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
            .getString("VentanaHija.PopUpDisenio.mne.Propiedades").charAt(0));
    dPropiedadesMenuItem.setText(bundle.getString("VentanaHija.PopUpDisenio.Propiedades")); // NOI18N
    dPropiedadesMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            clicEnPropiedadesPopUpDisenioElemento(evt);
        }
    });
    diseElementoPopUp.add(dPropiedadesMenuItem);

    diseFondoPopUp.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N

    dVerNombresNodosMenuItem.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    dVerNombresNodosMenuItem.setMnemonic(java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
            .getString("popUpDisenioFondo.mne.verTodosNodos").charAt(0));
    dVerNombresNodosMenuItem.setText(bundle.getString("popUpDisenioFondo.verTodosNodos")); // NOI18N
    dVerNombresNodosMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            clicEnPopUpDisenioFondoVerNombreNodos(evt);
        }
    });
    diseFondoPopUp.add(dVerNombresNodosMenuItem);

    dOcultarNombresNodosMenuItem.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    dOcultarNombresNodosMenuItem.setMnemonic(java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
            .getString("popUpDisenioFondo.mne.ocultarTodosNodos").charAt(0));
    dOcultarNombresNodosMenuItem.setText(bundle.getString("popUpDisenioFondo.ocultarTodosNodos")); // NOI18N
    dOcultarNombresNodosMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            clicEnPopUpDisenioFondoOcultarNombreNodos(evt);
        }
    });
    diseFondoPopUp.add(dOcultarNombresNodosMenuItem);

    dVerNombresEnlacesMenuItem.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    dVerNombresEnlacesMenuItem.setMnemonic(java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
            .getString("popUpDisenioFondo.mne.verTodosEnlaces").charAt(0));
    dVerNombresEnlacesMenuItem.setText(bundle.getString("popUpDisenioFondo.verTodosEnlaces")); // NOI18N
    dVerNombresEnlacesMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            clicEnPopUpDisenioFondoVerNombreEnlaces(evt);
        }
    });
    diseFondoPopUp.add(dVerNombresEnlacesMenuItem);

    dOcultarNombresEnlacesMenuItem.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    dOcultarNombresEnlacesMenuItem.setMnemonic(java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
            .getString("popUpDisenioFondo.mne.ocultarTodosEnlaces").charAt(0));
    dOcultarNombresEnlacesMenuItem.setText(bundle.getString("popUpDisenioFondo.ocultarTodosEnlaces")); // NOI18N
    dOcultarNombresEnlacesMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            clicEnPopUpDisenioFondoOcultarNombreEnlaces(evt);
        }
    });
    diseFondoPopUp.add(dOcultarNombresEnlacesMenuItem);
    diseFondoPopUp.add(jSeparator2);

    dEliminarTodoMenuItem.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    dEliminarTodoMenuItem.setMnemonic(java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
            .getString("popUpDisenioFondo.mne.eliminarTodo").charAt(0));
    dEliminarTodoMenuItem.setText(bundle.getString("popUpDisenioFondo.borrarTodo")); // NOI18N
    dEliminarTodoMenuItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            clicEnPopUpDisenioFondoEliminar(evt);
        }
    });
    diseFondoPopUp.add(dEliminarTodoMenuItem);

    setIconifiable(true);
    setMaximizable(true);
    setResizable(true);
    setTitle(bundle.getString("VentanaHija.Titulo")); // NOI18N
    setAutoscrolls(true);
    setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    setFrameIcon(dispensadorDeImagenes.obtenerIcono(simMPLS.ui.utils.TImagesBroker.ICONO_VENTANA_INTERNA_MENU));
    setNormalBounds(new java.awt.Rectangle(10, 10, 100, 100));
    setPreferredSize(new java.awt.Dimension(100, 100));
    setVisible(true);

    jTabbedPane1.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT);
    jTabbedPane1.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N

    panelDisenioSuperior.setLayout(new java.awt.BorderLayout());

    panelBotonesDisenio.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    panelBotonesDisenio.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

    iconoEmisor.setIcon(dispensadorDeImagenes.obtenerIcono(simMPLS.ui.utils.TImagesBroker.EMISOR_MENU));
    iconoEmisor.setToolTipText(bundle.getString("VentanaHija.Topic.Emisor")); // NOI18N
    iconoEmisor.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseEntered(java.awt.event.MouseEvent evt) {
            ratonEntraEnIconoEmisor(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            ratonSaleDeIconoEmisor(evt);
        }

        public void mousePressed(java.awt.event.MouseEvent evt) {
            clicEnAniadirEmisorDeTrafico(evt);
        }
    });
    panelBotonesDisenio.add(iconoEmisor);

    iconoReceptor.setIcon(dispensadorDeImagenes.obtenerIcono(simMPLS.ui.utils.TImagesBroker.RECEPTOR_MENU));
    iconoReceptor.setToolTipText(bundle.getString("VentanaHija.Topic.Receptor")); // NOI18N
    iconoReceptor.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseEntered(java.awt.event.MouseEvent evt) {
            ratonEntraEnIconoReceptor(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            ratonSaleDeIconoReceptor(evt);
        }

        public void mousePressed(java.awt.event.MouseEvent evt) {
            clicEnAniadirReceptor(evt);
        }
    });
    panelBotonesDisenio.add(iconoReceptor);

    iconoLER.setIcon(dispensadorDeImagenes.obtenerIcono(simMPLS.ui.utils.TImagesBroker.LER_MENU));
    iconoLER.setToolTipText(bundle.getString("VentanaHija.Topic.LER")); // NOI18N
    iconoLER.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseEntered(java.awt.event.MouseEvent evt) {
            ratonEntraEnIconoLER(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            ratonSaleDeIconoLER(evt);
        }

        public void mousePressed(java.awt.event.MouseEvent evt) {
            clicEnAniadirLER(evt);
        }
    });
    panelBotonesDisenio.add(iconoLER);

    iconoLERA.setIcon(dispensadorDeImagenes.obtenerIcono(simMPLS.ui.utils.TImagesBroker.LERA_MENU));
    iconoLERA.setToolTipText(bundle.getString("VentanaHija.Topic.LERActivo")); // NOI18N
    iconoLERA.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseEntered(java.awt.event.MouseEvent evt) {
            ratonEntraEnIconoLERA(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            ratonSaleDeIconoLERA(evt);
        }

        public void mousePressed(java.awt.event.MouseEvent evt) {
            clicEnAniadirLERA(evt);
        }
    });
    panelBotonesDisenio.add(iconoLERA);

    iconoLSR.setIcon(dispensadorDeImagenes.obtenerIcono(simMPLS.ui.utils.TImagesBroker.LSR_MENU));
    iconoLSR.setToolTipText(bundle.getString("VentanaHija.Topic.LSR")); // NOI18N
    iconoLSR.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseEntered(java.awt.event.MouseEvent evt) {
            ratonEntraEnIconoLSR(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            ratonSaleDeIconoLSR(evt);
        }

        public void mousePressed(java.awt.event.MouseEvent evt) {
            clicEnAniadirLSR(evt);
        }
    });
    panelBotonesDisenio.add(iconoLSR);

    iconoLSRA.setIcon(dispensadorDeImagenes.obtenerIcono(simMPLS.ui.utils.TImagesBroker.LSRA_MENU));
    iconoLSRA.setToolTipText(bundle.getString("VentanaHija.Topic.LSRActivo")); // NOI18N
    iconoLSRA.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseEntered(java.awt.event.MouseEvent evt) {
            ratonEntraEnIconoLSRA(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            ratonSaleDeIconoLSRA(evt);
        }

        public void mousePressed(java.awt.event.MouseEvent evt) {
            clicEnAniadirLSRA(evt);
        }
    });
    panelBotonesDisenio.add(iconoLSRA);

    iconoEnlace.setIcon(dispensadorDeImagenes.obtenerIcono(simMPLS.ui.utils.TImagesBroker.ENLACE_MENU));
    iconoEnlace.setToolTipText(bundle.getString("VentanaHija.Topic.Enlace")); // NOI18N
    iconoEnlace.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            clicEnAniadirEnlace(evt);
        }

        public void mouseEntered(java.awt.event.MouseEvent evt) {
            ratonEntraEnIconoEnlace(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            ratonSaleDeIconoEnlace(evt);
        }
    });
    panelBotonesDisenio.add(iconoEnlace);

    panelDisenioSuperior.add(panelBotonesDisenio, java.awt.BorderLayout.NORTH);

    jScrollPane1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));

    panelDisenio.setBackground(java.awt.Color.white);
    panelDisenio.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    panelDisenio.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            clicDerechoEnPanelDisenio(evt);
        }

        public void mousePressed(java.awt.event.MouseEvent evt) {
            clicEnPanelDisenio(evt);
        }

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            clicSoltadoEnPanelDisenio(evt);
        }
    });
    panelDisenio.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
        public void mouseDragged(java.awt.event.MouseEvent evt) {
            arrastrandoEnPanelDisenio(evt);
        }

        public void mouseMoved(java.awt.event.MouseEvent evt) {
            ratonSobrePanelDisenio(evt);
        }
    });
    panelDisenio.setLayout(null);
    jScrollPane1.setViewportView(panelDisenio);

    panelDisenioSuperior.add(jScrollPane1, java.awt.BorderLayout.CENTER);

    jTabbedPane1.addTab(bundle.getString("VentanaHija.Tab.Disenio"),
            dispensadorDeImagenes.obtenerIcono(simMPLS.ui.utils.TImagesBroker.DISENIO), panelDisenioSuperior,
            bundle.getString("VentanaHija.A_panel_to_design_network_topology")); // NOI18N

    panelSimulacionSuperior.setLayout(new java.awt.BorderLayout());

    panelBotonesSimulacion.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    panelBotonesSimulacion.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

    iconoComenzar.setIcon(dispensadorDeImagenes.obtenerIcono(simMPLS.ui.utils.TImagesBroker.BOTON_GENERAR));
    iconoComenzar.setToolTipText(bundle.getString("VentanaHija.Topic.Generar")); // NOI18N
    iconoComenzar.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseEntered(java.awt.event.MouseEvent evt) {
            ratonEntraEnIconoComenzar(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            ratonSaleDelIconoComenzar(evt);
        }

        public void mousePressed(java.awt.event.MouseEvent evt) {
            clicEnComenzar(evt);
        }
    });
    panelBotonesSimulacion.add(iconoComenzar);

    iconoFinalizar.setIcon(dispensadorDeImagenes.obtenerIcono(simMPLS.ui.utils.TImagesBroker.BOTON_PARAR));
    iconoFinalizar.setToolTipText(bundle.getString("VentanaHija.Topic.Finalizar")); // NOI18N
    iconoFinalizar.setEnabled(false);
    iconoFinalizar.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseEntered(java.awt.event.MouseEvent evt) {
            ratonEntraEnIconoFinalizar(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            ratonSaleDelIconoFinalizar(evt);
        }

        public void mousePressed(java.awt.event.MouseEvent evt) {
            clicEnFinalizar(evt);
        }
    });
    panelBotonesSimulacion.add(iconoFinalizar);

    iconoReanudar.setIcon(dispensadorDeImagenes.obtenerIcono(simMPLS.ui.utils.TImagesBroker.BOTON_COMENZAR));
    iconoReanudar.setToolTipText(bundle.getString("VentanaHija.Topic.Simulacion")); // NOI18N
    iconoReanudar.setEnabled(false);
    iconoReanudar.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseEntered(java.awt.event.MouseEvent evt) {
            ratonEntraEnIconoReanudar(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            ratonSaleDelIconoReanudar(evt);
        }

        public void mousePressed(java.awt.event.MouseEvent evt) {
            clicEnReanudar(evt);
        }
    });
    panelBotonesSimulacion.add(iconoReanudar);

    iconoPausar.setIcon(dispensadorDeImagenes.obtenerIcono(simMPLS.ui.utils.TImagesBroker.BOTON_PAUSA));
    iconoPausar.setToolTipText(bundle.getString("VentanaHija.Topic.Detener")); // NOI18N
    iconoPausar.setEnabled(false);
    iconoPausar.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseEntered(java.awt.event.MouseEvent evt) {
            ratonEntraEnIconoPausar(evt);
        }

        public void mouseExited(java.awt.event.MouseEvent evt) {
            ratonSaleDelIconoPausar(evt);
        }

        public void mousePressed(java.awt.event.MouseEvent evt) {
            clicAlPausar(evt);
        }
    });
    panelBotonesSimulacion.add(iconoPausar);

    barraDeProgreso.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    barraDeProgreso.setToolTipText(bundle.getString("VentanaHija.BarraProgreso.tooltip")); // NOI18N
    barraDeProgreso.setStringPainted(true);
    panelBotonesSimulacion.add(barraDeProgreso);

    mlsPorTic.setMajorTickSpacing(10);
    mlsPorTic.setMaximum(500);
    mlsPorTic.setMinimum(1);
    mlsPorTic.setMinorTickSpacing(1);
    mlsPorTic.setSnapToTicks(true);
    mlsPorTic.setToolTipText(bundle.getString("VentanaHija.Simulacion.SelectorDeVelocidad.tooltip")); // NOI18N
    mlsPorTic.setPreferredSize(new java.awt.Dimension(100, 20));
    mlsPorTic.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            mlsPorTicCambiado(evt);
        }
    });
    panelBotonesSimulacion.add(mlsPorTic);

    etiquetaMlsPorTic.setFont(new java.awt.Font("Dialog", 0, 10)); // NOI18N
    etiquetaMlsPorTic.setForeground(new java.awt.Color(102, 102, 102));
    panelBotonesSimulacion.add(etiquetaMlsPorTic);

    crearTraza.setText(bundle.getString("JVentanaHija.Create_trace_file")); // NOI18N
    panelBotonesSimulacion.add(crearTraza);

    panelSimulacionSuperior.add(panelBotonesSimulacion, java.awt.BorderLayout.NORTH);

    jScrollPane2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));

    panelSimulacion.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    panelSimulacion.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            ratonPulsadoYSoltadoEnPanelSimulacion(evt);
        }

        public void mousePressed(java.awt.event.MouseEvent evt) {
            clicEnPanelSimulacion(evt);
        }

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            ratonSoltadoEnPanelSimulacion(evt);
        }
    });
    panelSimulacion.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
        public void mouseDragged(java.awt.event.MouseEvent evt) {
            ratonArrastradoEnPanelSimulacion(evt);
        }

        public void mouseMoved(java.awt.event.MouseEvent evt) {
            ratonSobrePanelSimulacion(evt);
        }
    });
    jScrollPane2.setViewportView(panelSimulacion);

    panelSimulacionSuperior.add(jScrollPane2, java.awt.BorderLayout.CENTER);

    jTabbedPane1.addTab(bundle.getString("VentanaHija.Tab.Simulacion"),
            dispensadorDeImagenes.obtenerIcono(simMPLS.ui.utils.TImagesBroker.SIMULACION),
            panelSimulacionSuperior, bundle.getString("VentanaHija.A_panel_to_generate_and_play_simulation.")); // NOI18N

    panelAnalisisSuperior.setLayout(new java.awt.BorderLayout());

    panelSeleccionElemento.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    panelSeleccionElemento.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

    jLabel1.setText(bundle.getString("JVentanaHija.SelcUnElemParaVerDatos")); // NOI18N
    panelSeleccionElemento.add(jLabel1);

    selectorElementoEstadisticas.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "" }));
    selectorElementoEstadisticas.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            clicEnSeleccionalElementoEstadistica(evt);
        }
    });
    panelSeleccionElemento.add(selectorElementoEstadisticas);

    panelAnalisisSuperior.add(panelSeleccionElemento, java.awt.BorderLayout.NORTH);

    jScrollPane4.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));

    panelAnalisis.setBackground(new java.awt.Color(252, 246, 226));
    panelAnalisis.setLayout(new java.awt.GridBagLayout());

    panelFijo.setBackground(new java.awt.Color(252, 246, 226));
    panelFijo.setLayout(new java.awt.GridBagLayout());

    etiquetaEstadisticasTituloEscenario.setBackground(new java.awt.Color(252, 246, 226));
    etiquetaEstadisticasTituloEscenario.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
    etiquetaEstadisticasTituloEscenario.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    etiquetaEstadisticasTituloEscenario.setText(bundle.getString("JVentanaHija.TituloDelEscenario")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    panelFijo.add(etiquetaEstadisticasTituloEscenario, gridBagConstraints);

    etiquetaEstadisticasNombreAutor.setBackground(new java.awt.Color(252, 246, 226));
    etiquetaEstadisticasNombreAutor.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
    etiquetaEstadisticasNombreAutor.setForeground(new java.awt.Color(102, 0, 51));
    etiquetaEstadisticasNombreAutor.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    etiquetaEstadisticasNombreAutor.setText(bundle.getString("JVentanaHija.AutorDelEscenario")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    panelFijo.add(etiquetaEstadisticasNombreAutor, gridBagConstraints);

    areaEstadisticasDescripcion.setBackground(new java.awt.Color(252, 246, 226));
    areaEstadisticasDescripcion.setEditable(false);
    areaEstadisticasDescripcion.setFont(new java.awt.Font("MonoSpaced", 0, 11)); // NOI18N
    areaEstadisticasDescripcion.setLineWrap(true);
    areaEstadisticasDescripcion.setRows(3);
    areaEstadisticasDescripcion.setText(bundle.getString("JVentanaHija.DescripcionDelEscenario")); // NOI18N
    areaEstadisticasDescripcion.setWrapStyleWord(true);
    areaEstadisticasDescripcion.setMinimumSize(new java.awt.Dimension(500, 16));
    areaEstadisticasDescripcion.setPreferredSize(new java.awt.Dimension(500, 48));
    areaEstadisticasDescripcion.setAutoscrolls(false);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    panelFijo.add(areaEstadisticasDescripcion, gridBagConstraints);

    etiquetaNombreElementoEstadistica.setBackground(new java.awt.Color(252, 246, 226));
    etiquetaNombreElementoEstadistica.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
    etiquetaNombreElementoEstadistica.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    etiquetaNombreElementoEstadistica.setText(bundle.getString("JVentanaHija.SeleccioneNodoAInspeccionar")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    panelFijo.add(etiquetaNombreElementoEstadistica, gridBagConstraints);

    panelAnalisis.add(panelFijo, new java.awt.GridBagConstraints());

    jScrollPane4.setViewportView(panelAnalisis);

    panelAnalisisSuperior.add(jScrollPane4, java.awt.BorderLayout.CENTER);

    jTabbedPane1.addTab(bundle.getString("JVentanaHija.Analisis"),
            dispensadorDeImagenes.obtenerIcono(simMPLS.ui.utils.TImagesBroker.ANALISIS), panelAnalisisSuperior,
            bundle.getString("JVentanaHija.Analisis.Tooltip")); // NOI18N

    panelOpcionesSuperior.setLayout(new java.awt.BorderLayout());

    jScrollPane3.setBorder(null);

    panelOpciones.setPreferredSize(new java.awt.Dimension(380, 230));
    panelOpciones.setLayout(new java.awt.GridBagLayout());

    jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null,
            bundle.getString("VentanaHija.GParameters"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
            javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", 0, 12))); // NOI18N
    jPanel3.setLayout(new java.awt.GridBagLayout());

    jLabel5.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel5.setText(bundle.getString("VentanaHija.Scene_title")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel3.add(jLabel5, gridBagConstraints);

    nombreEscenario.setToolTipText(bundle.getString("VentanaHija.Type_a__title_of_the_scene")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 200.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel3.add(nombreEscenario, gridBagConstraints);

    jLabel6.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel6.setText(bundle.getString("VentanaHija.Scene_author")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel3.add(jLabel6, gridBagConstraints);

    nombreAutor.setToolTipText(bundle.getString("VentanaHija.Type_de_name_of_the_author")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 200.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel3.add(nombreAutor, gridBagConstraints);

    jLabel7.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel7.setText(bundle.getString("VentanaHija.Description")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel3.add(jLabel7, gridBagConstraints);

    descripcionEscenario.setToolTipText(bundle.getString("VentanaHija.Enter_a_short_description.")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 200.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel3.add(descripcionEscenario, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 350.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    panelOpciones.add(jPanel3, gridBagConstraints);

    jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null,
            bundle.getString("VentanaHija.TParameters"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
            javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", 0, 12))); // NOI18N
    jPanel2.setLayout(new java.awt.GridBagLayout());

    jLabel3.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel3.setText(bundle.getString("VentanaHija.Duration")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 100.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel2.add(jLabel3, gridBagConstraints);

    duracionMs.setMajorTickSpacing(10);
    duracionMs.setMaximum(10);
    duracionMs.setMinorTickSpacing(1);
    duracionMs.setToolTipText(
            bundle.getString("VentanaHija.Slide_it_to_change_the_ms._component_of_simulation_duration.")); // NOI18N
    duracionMs.setValue(0);
    duracionMs.setMaximumSize(new java.awt.Dimension(30, 20));
    duracionMs.setMinimumSize(new java.awt.Dimension(30, 24));
    duracionMs.setPreferredSize(new java.awt.Dimension(30, 20));
    duracionMs.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            clicEnDuracionMs(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 150.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel2.add(duracionMs, gridBagConstraints);

    etiquetaDuracionMs.setFont(new java.awt.Font("Dialog", 0, 10)); // NOI18N
    etiquetaDuracionMs.setForeground(new java.awt.Color(102, 102, 102));
    etiquetaDuracionMs.setText(bundle.getString("VentanaHija.ms.")); // NOI18N
    etiquetaDuracionMs.setMaximumSize(new java.awt.Dimension(30, 14));
    etiquetaDuracionMs.setMinimumSize(new java.awt.Dimension(30, 14));
    etiquetaDuracionMs.setPreferredSize(new java.awt.Dimension(30, 14));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 40.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel2.add(etiquetaDuracionMs, gridBagConstraints);

    duracionNs.setMajorTickSpacing(1000);
    duracionNs.setMaximum(999999);
    duracionNs.setMinorTickSpacing(100);
    duracionNs.setToolTipText(
            bundle.getString("VentanaHija.Slide_it_to_change_the_ns._component_of_simulation_duration.")); // NOI18N
    duracionNs.setValue(100000);
    duracionNs.setMaximumSize(new java.awt.Dimension(32767, 20));
    duracionNs.setMinimumSize(new java.awt.Dimension(36, 20));
    duracionNs.setPreferredSize(new java.awt.Dimension(200, 20));
    duracionNs.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            clicEnDuracionNs(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 150.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel2.add(duracionNs, gridBagConstraints);

    etiquetaDuracionNs.setFont(new java.awt.Font("Dialog", 0, 10)); // NOI18N
    etiquetaDuracionNs.setForeground(new java.awt.Color(102, 102, 102));
    etiquetaDuracionNs.setText(bundle.getString("VentanaHija.ns.")); // NOI18N
    etiquetaDuracionNs.setMaximumSize(new java.awt.Dimension(40, 14));
    etiquetaDuracionNs.setMinimumSize(new java.awt.Dimension(40, 14));
    etiquetaDuracionNs.setPreferredSize(new java.awt.Dimension(40, 14));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 100.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel2.add(etiquetaDuracionNs, gridBagConstraints);

    jLabel4.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel4.setText(bundle.getString("VentanaHija.Step")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 100.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel2.add(jLabel4, gridBagConstraints);

    pasoNs.setMajorTickSpacing(1000);
    pasoNs.setMaximum(999999);
    pasoNs.setMinimum(1);
    pasoNs.setMinorTickSpacing(100);
    pasoNs.setToolTipText(bundle.getString("VentanaHija.Slide_it_to_change_the_step_duration_(ns)..")); // NOI18N
    pasoNs.setValue(10000);
    pasoNs.setMaximumSize(new java.awt.Dimension(32767, 20));
    pasoNs.setPreferredSize(new java.awt.Dimension(100, 20));
    pasoNs.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            clicEnPasoNs(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel2.add(pasoNs, gridBagConstraints);

    etiquetaPasoNs.setFont(new java.awt.Font("Dialog", 0, 10)); // NOI18N
    etiquetaPasoNs.setForeground(new java.awt.Color(102, 102, 102));
    etiquetaPasoNs.setText(bundle.getString("VentanaHija.ns.")); // NOI18N
    etiquetaPasoNs.setMaximumSize(new java.awt.Dimension(40, 14));
    etiquetaPasoNs.setMinimumSize(new java.awt.Dimension(40, 14));
    etiquetaPasoNs.setPreferredSize(new java.awt.Dimension(40, 14));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 100.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel2.add(etiquetaPasoNs, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 350.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    panelOpciones.add(jPanel2, gridBagConstraints);

    jScrollPane3.setViewportView(panelOpciones);

    panelOpcionesSuperior.add(jScrollPane3, java.awt.BorderLayout.NORTH);

    jTabbedPane1.addTab(bundle.getString("VentanaHija.Options"),
            dispensadorDeImagenes.obtenerIcono(simMPLS.ui.utils.TImagesBroker.OPCIONES), panelOpcionesSuperior,
            bundle.getString("VentanaHija.Options_about_the_scene")); // NOI18N

    getContentPane().add(jTabbedPane1, java.awt.BorderLayout.CENTER);

    pack();
}

From source file:nz.govt.natlib.ndha.manualdeposit.metadata.MetaDataConfigurator.java

private void initComponents() {

    tabMain = new javax.swing.JTabbedPane();
    pnlApplicationData = new javax.swing.JPanel();
    pnlUsers = new javax.swing.JPanel();
    pnlUserGroupData = new javax.swing.JPanel();
    pnlMetaData = new javax.swing.JPanel();
    pnlSipStatusData = new javax.swing.JPanel();

    setTitle("Indigo MetaData Configurator");
    setDefaultCloseOperation(3);/*  w ww.j  a  v  a  2 s  .com*/
    addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowOpened(java.awt.event.WindowEvent evt) {
            formWindowOpened(evt);
        }

        public void windowClosing(java.awt.event.WindowEvent evt) {
            formWindowClosing(evt);
        }
    });

    javax.swing.GroupLayout pnlApplicationDataLayout = new javax.swing.GroupLayout(pnlApplicationData);
    pnlApplicationData.setLayout(pnlApplicationDataLayout);
    pnlApplicationDataLayout.setHorizontalGroup(pnlApplicationDataLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 884, Short.MAX_VALUE));
    pnlApplicationDataLayout.setVerticalGroup(pnlApplicationDataLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 429, Short.MAX_VALUE));

    tabMain.addTab("Maintain Application Data", pnlApplicationData);

    javax.swing.GroupLayout pnlUsersLayout = new javax.swing.GroupLayout(pnlUsers);
    pnlUsers.setLayout(pnlUsersLayout);
    pnlUsersLayout.setHorizontalGroup(pnlUsersLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 884, Short.MAX_VALUE));
    pnlUsersLayout.setVerticalGroup(pnlUsersLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 429, Short.MAX_VALUE));

    tabMain.addTab("Maintain Users", pnlUsers);

    javax.swing.GroupLayout pnlUserGroupDataLayout = new javax.swing.GroupLayout(pnlUserGroupData);
    pnlUserGroupData.setLayout(pnlUserGroupDataLayout);
    pnlUserGroupDataLayout.setHorizontalGroup(pnlUserGroupDataLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 884, Short.MAX_VALUE));
    pnlUserGroupDataLayout.setVerticalGroup(pnlUserGroupDataLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 429, Short.MAX_VALUE));

    tabMain.addTab("User Group Data", pnlUserGroupData);

    javax.swing.GroupLayout pnlMetaDataLayout = new javax.swing.GroupLayout(pnlMetaData);
    pnlMetaData.setLayout(pnlMetaDataLayout);
    pnlMetaDataLayout.setHorizontalGroup(pnlMetaDataLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 884, Short.MAX_VALUE));
    pnlMetaDataLayout.setVerticalGroup(pnlMetaDataLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 429, Short.MAX_VALUE));

    tabMain.addTab("Maintain Meta Data", pnlMetaData);

    javax.swing.GroupLayout pnlSipStatusDataLayout = new javax.swing.GroupLayout(pnlSipStatusData);
    pnlSipStatusData.setLayout(pnlSipStatusDataLayout);
    pnlSipStatusDataLayout.setHorizontalGroup(pnlSipStatusDataLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 884, Short.MAX_VALUE));
    pnlSipStatusDataLayout.setVerticalGroup(pnlSipStatusDataLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 429, Short.MAX_VALUE));

    tabMain.addTab("Maintain SIP status definitions", pnlSipStatusData);

    // Added by Ben - 6.12.2013
    // Surround main content in a scroll pane - to handle display on smaller screen resolutions.
    tabMain.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
    javax.swing.JScrollPane scrollFrame = new JScrollPane(tabMain);
    tabMain.setAutoscrolls(true);
    scrollFrame.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    scrollFrame.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(scrollFrame, javax.swing.GroupLayout.DEFAULT_SIZE, 889, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(scrollFrame, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE));

    pack();
}

From source file:org.domainmath.gui.MainFrame.java

/** 
 * Creates new form MainFrame.//  w ww  .ja v  a 2  s . c o m
 * @param args
 */
public MainFrame(String args[]) {

    // create folders called cache and log.
    cache = new File(System.getProperty("user.dir") + File.separator + "cache");
    logDir = new File(System.getProperty("user.dir") + File.separator + "log");
    worksDir = new File(System.getProperty("user.dir") + File.separator + "works");
    cache.mkdir();
    logDir.mkdir();

    if (!worksDir.exists()) {
        worksDir.mkdir();
    }

    parent_root = cache.getAbsolutePath() + File.separator;
    log_root = logDir.getAbsolutePath() + File.separator;
    preferencesDlg = new PreferencesDlg(this, true);
    layout_file = new File(System.getProperty("user.dir") + File.separator + "layout.ini");
    initComponents();
    new PackageLoader(this);
    new ToolsLoader(this);
    makeMenu();

    setIconImage(icon);
    Preferences pr2 = Preferences.userNodeForPackage(this.getClass());

    setSize(pr2.getInt("Frame_width", 800), pr2.getInt("Frame_height", 600));
    setLocationRelativeTo(null);

    FILE_TAB_INDEX = 0;

    //create octavepanel.
    octavePanel = new OctavePanel(this);
    commandArea = octavePanel.commandArea;

    octavePath = preferencesDlg.getPath();
    startupCmd = preferencesDlg.getStartupCmd();
    wantedToClearText = preferencesDlg.wantedToClearText();
    cmdLineOptions = preferencesDlg.getCmdLineOptions();

    // set up histroy widget.
    histArea = new RSyntaxTextArea();
    histArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_OCTAVE);
    histScrollPane = new RTextScrollPane(histArea);
    histScrollPane.setWheelScrollingEnabled(true);

    workspace = new WorkspacePanel(parent_root + "DomainMath_OctaveVariables.dat", this);
    dbstackPanel = new DbstackPanel(parent_root + "DomainMath_OctaveDbStack.dat", this);

    // create recent files menu.
    recentFileMenu = new RecentFileMenu("RecentFiles", MAX_NUM_RECENT_FILES) {
        @Override
        public void onSelectFile(String filePath, ActionEvent action_event) {
            onRecentFile(filePath, action_event);
        }
    };
    this.fileMenu.add(recentFileMenu, MainFrame.RECENT_MENU_ORDER);

    statusPanel = new StatusPanel();
    fileTab.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
    fileTreePanel = new FileTreePanel(this);
    quickHelpPanel = new QuickHelpPanel();
    pathPanel = new PathsPanel(parent_root + "DomainMath_OctavePaths.dat");
    pkgViewPanel = new PkgViewPanel(parent_root + "DomainMath_OctavePackages.dat", this);

    histPanel();
    this.popupTab();

    dir = pr2.get("DomainMath_StartUpDir", System.getProperty("user.dir"));

    if (dir.equals(worksDir.getAbsolutePath())) {
        startupDir = dir;
    } else {
        startupDir = worksDir.getAbsolutePath();
    }

    currentDirFileTab = null;
    fileTabView = new View("Code Editor", null, fileTab);
    pathsView = new View("Set Paths", null, pathPanel);
    pkgView = new View("Packages", null, pkgViewPanel);
    consoleScrollPane = new JScrollPane();
    consoleScrollPane.getVerticalScrollBar().setUnitIncrement(16);
    consoleScrollPane.setViewportView(octavePanel);
    consoleView = new View("Console", null, consoleScrollPane);
    arrayEditorView = new View("Array Editor", null, new ArrayEditorPanel());
    workspaceView = new View("Workspace", null, workspace);
    debuggerView = new View("Debugger", null, this.dbstackPanel);
    filesView = new View("Files", null, fileTreePanel);
    quickHelpView = new View("Quick Help", null, quickHelpPanel);
    createRootWindow();
    setDefaultLayout();

    add(rootWindow, BorderLayout.CENTER);
    add(statusPanel, BorderLayout.PAGE_END);
    dragNDrop();
    debugMarksList = new ArrayList<>();
    breakPointMarksList = new ArrayList<>();
    breakPointList = new ArrayList<>();
    fileTab2 = fileTab;
    if (args != null) {
        openStartUpFiles(args);
    }

}

From source file:org.executequery.gui.editor.QueryEditorResultsPanel.java

public QueryEditorResultsPanel(QueryEditor queryEditor, ResultSet rs) {

    super(JTabbedPane.BOTTOM, JTabbedPane.SCROLL_TAB_LAYOUT);

    this.queryEditor = queryEditor;

    setTabPopupEnabled(true);// www.  j a va 2  s  .  c om

    if (queryEditor != null) {
        addTabRollOverListener(this);
        addTabSelectionListener(this);
    }

    try {

        init();

    } catch (Exception e) {

        e.printStackTrace();
    }
}

From source file:org.freeplane.core.resources.components.OptionPanel.java

/**
 * This method builds the preferences panel.
 * A list of IPropertyControl is iterated through and
 * if the IPropertyControl is an instance of TabProperty,
 * it creates a new "tab" that can be clicked to reveal the appropriate panel.
 * If the previous selected tab was saved on close,
 * the appropriate tab is reopened.//from   www  . j a  va  2  s.  c om
 *
 * @param controlsTree  This is the data that needs to be built
 */
public void buildPanel(final DefaultMutableTreeNode controlsTree) {
    final JPanel centralPanel = new JPanel();
    centralPanel.setLayout(new GridLayout(1, 1));
    final JTabbedPane tabbedPane = new JTabbedPane();
    tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
    FormLayout bottomLayout = null;
    DefaultFormBuilder bottomBuilder = null;
    initControls(controlsTree);
    final Iterator<IPropertyControl> iterator = controls.iterator();
    int tabIndex = 0;
    while (iterator.hasNext()) {
        final IPropertyControl control = iterator.next();
        if (control instanceof TabProperty) {
            final TabProperty newTab = (TabProperty) control;
            bottomLayout = new FormLayout(newTab.getName(), "");
            bottomBuilder = new DefaultFormBuilder(bottomLayout);
            bottomBuilder.setDefaultDialogBorder();
            final JScrollPane bottomComponent = new JScrollPane(bottomBuilder.getPanel());
            UITools.setScrollbarIncrement(bottomComponent);
            final String tabName = TextUtils.getOptionalText(newTab.getLabel());
            tabStringToIndexMap.put(tabName, tabIndex);
            tabIndexToStringMap.put(tabIndex, tabName);
            tabbedPane.addTab(tabName, bottomComponent);
            tabIndex++;
        } else {
            control.layout(bottomBuilder);
        }
    }
    tabbedPane.addChangeListener(new ChangeListener() {
        public void stateChanged(final ChangeEvent event) {
            final JTabbedPane c = (JTabbedPane) event.getSource();
            selectedPanel = tabIndexToStringMap.get(c.getSelectedIndex());
        }
    });
    centralPanel.add(tabbedPane);
    if (selectedPanel != null && tabStringToIndexMap.containsKey(selectedPanel)) {
        // Without the containsKey call the loading of the tab "behaviour"/"behavior" gives a nullpointer exception
        tabbedPane.setSelectedIndex(tabStringToIndexMap.get(selectedPanel));
    }
    topDialog.getContentPane().add(centralPanel, BorderLayout.CENTER);
    final JButton cancelButton = new JButton();
    MenuBuilder.setLabelAndMnemonic(cancelButton, TextUtils.getRawText("cancel"));
    cancelButton.addActionListener(new ActionListener() {
        public void actionPerformed(final ActionEvent arg0) {
            closeWindow();
        }
    });
    final JButton okButton = new JButton();
    MenuBuilder.setLabelAndMnemonic(okButton, TextUtils.getRawText("ok"));
    okButton.addActionListener(new ActionListener() {
        public void actionPerformed(final ActionEvent arg0) {
            if (validate()) {
                closeWindow();
                feedback.writeProperties(getOptionProperties());
            }
        }
    });
    topDialog.getRootPane().setDefaultButton(okButton);
    topDialog.getContentPane().add(ButtonBarFactory.buildOKCancelBar(cancelButton, okButton),
            BorderLayout.SOUTH);
}