Example usage for javax.swing GroupLayout DEFAULT_SIZE

List of usage examples for javax.swing GroupLayout DEFAULT_SIZE

Introduction

In this page you can find the example usage for javax.swing GroupLayout DEFAULT_SIZE.

Prototype

int DEFAULT_SIZE

To view the source code for javax.swing GroupLayout DEFAULT_SIZE.

Click Source Link

Document

Indicates the size from the component or gap should be used for a particular range value.

Usage

From source file:com.juanhg.angularmdisk.AngularMDiskApplet.java

private void autogeneratedCode() {
    JPanel panel_control = new JPanel();
    panel_control.setBorder(new CompoundBorder(new EtchedBorder(EtchedBorder.RAISED, null, null),
            new BevelBorder(BevelBorder.RAISED, null, null, null, null)));

    JPanel panelInputs = new JPanel();
    panelInputs.setToolTipText("");
    panelInputs.setBorder(new MatteBorder(1, 1, 1, 1, (Color) new Color(0, 0, 0)));

    JPanel panelTiempo = new JPanel();
    panelTiempo.setToolTipText("");
    panelTiempo.setBorder(new MatteBorder(1, 1, 1, 1, (Color) new Color(0, 0, 0)));

    btnPhase1 = new JButton("Lanzar Insecto");
    btnPhase1.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
            btnPhase1Event();//from   w  ww.ja v  a  2s. co  m
        }
    });
    btnPhase1.setEnabled(false);

    JPanel panelOutputs = new JPanel();
    panelOutputs.setToolTipText("");
    panelOutputs.setBorder(new MatteBorder(1, 1, 1, 1, (Color) new Color(0, 0, 0)));

    JPanel panelTitleOutputs = new JPanel();
    panelTitleOutputs.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null, null));

    JLabel labelOutputData = new JLabel("Datos de la Simulaci\u00F3n");
    labelOutputData.setFont(new Font("Tahoma", Font.PLAIN, 14));
    panelTitleOutputs.add(labelOutputData);

    lblDiskW = new JLabel("Velocidad Disco:");
    lblDiskW.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblDiskWValue = new JLabel();
    lblDiskWValue.setText("0");
    lblDiskWValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblCriticRadius = new JLabel("Radio Cr\u00EDtico:");
    lblCriticRadius.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblCriticRadiusValue = new JLabel();
    lblCriticRadiusValue.setText("0");
    lblCriticRadiusValue.setFont(new Font("Tahoma", Font.PLAIN, 14));
    GroupLayout gl_panelOutputs = new GroupLayout(panelOutputs);
    gl_panelOutputs.setHorizontalGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
            .addComponent(panelTitleOutputs, GroupLayout.DEFAULT_SIZE, 394, Short.MAX_VALUE)
            .addGroup(gl_panelOutputs.createSequentialGroup().addContainerGap()
                    .addGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_panelOutputs.createSequentialGroup()
                                    .addComponent(lblCriticRadius, GroupLayout.PREFERRED_SIZE, 119,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addGap(6))
                            .addGroup(gl_panelOutputs.createSequentialGroup()
                                    .addComponent(lblDiskW, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                            Short.MAX_VALUE)
                                    .addGap(26)))
                    .addGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
                            .addComponent(lblDiskWValue, GroupLayout.PREFERRED_SIZE, 147,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblCriticRadiusValue, GroupLayout.PREFERRED_SIZE, 147,
                                    GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(112, Short.MAX_VALUE)));
    gl_panelOutputs
            .setVerticalGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
                    .addGroup(gl_panelOutputs.createSequentialGroup()
                            .addComponent(panelTitleOutputs, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(ComponentPlacement.UNRELATED)
                            .addGroup(gl_panelOutputs.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(lblDiskW).addComponent(lblDiskWValue))
                            .addPreferredGap(ComponentPlacement.RELATED)
                            .addGroup(gl_panelOutputs.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(lblCriticRadius, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblCriticRadiusValue, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE))
                            .addGap(121)));
    panelOutputs.setLayout(gl_panelOutputs);

    panel_1 = new JPanel();
    panel_1.setBorder(new LineBorder(new Color(0, 0, 0)));
    GroupLayout gl_panel_control = new GroupLayout(panel_control);
    gl_panel_control.setHorizontalGroup(gl_panel_control.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panel_control.createSequentialGroup().addContainerGap().addGroup(gl_panel_control
                    .createParallelGroup(Alignment.LEADING)
                    .addGroup(gl_panel_control.createSequentialGroup()
                            .addGroup(gl_panel_control.createParallelGroup(Alignment.TRAILING)
                                    .addComponent(panelInputs, GroupLayout.PREFERRED_SIZE, 396,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(panelOutputs, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            396, Short.MAX_VALUE)
                                    .addComponent(panelTiempo, GroupLayout.DEFAULT_SIZE, 396, Short.MAX_VALUE))
                            .addGap(18))
                    .addGroup(gl_panel_control.createSequentialGroup()
                            .addComponent(panel_1, GroupLayout.PREFERRED_SIZE, 397, GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(17, Short.MAX_VALUE)))));
    gl_panel_control.setVerticalGroup(gl_panel_control.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panel_control.createSequentialGroup().addContainerGap()
                    .addComponent(panelInputs, GroupLayout.PREFERRED_SIZE, 202, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(panelOutputs, GroupLayout.PREFERRED_SIZE, 103, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(panelTiempo, GroupLayout.PREFERRED_SIZE, 210, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED, 15, Short.MAX_VALUE).addComponent(panel_1,
                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));

    JLabel lblNewLabel = new JLabel("GNU GENERAL PUBLIC LICENSE");
    panel_1.add(lblNewLabel);

    rdbtnCam1 = new JRadioButton("C\u00E1mara Fija");
    rdbtnCam1.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
            rdbtnCam1Event();
        }
    });
    rdbtnCam1.setSelected(true);

    rdbtnCam2 = new JRadioButton("C\u00E1mara M\u00F3vil");
    rdbtnCam2.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
            rdbtnCam2Event();
        }
    });

    btnLaunchSimulation = new JButton("Iniciar");
    btnLaunchSimulation.setFont(new Font("Tahoma", Font.PLAIN, 16));
    btnLaunchSimulation.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent event) {
            btnLaunchSimulationEvent(event);
        }
    });

    btnPauseContinue = new JButton("Pausar");
    btnPauseContinue.setFont(new Font("Tahoma", Font.PLAIN, 16));
    btnPauseContinue.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent event) {
            btnPauseContinueEvent(event);
        }
    });

    panel = new JPanel();
    panel.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null, null));

    label = new JLabel("Datos de la Simulaci\u00F3n");
    label.setFont(new Font("Tahoma", Font.PLAIN, 14));
    panel.add(label);
    GroupLayout gl_panelTiempo = new GroupLayout(panelTiempo);
    gl_panelTiempo.setHorizontalGroup(gl_panelTiempo.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panelTiempo.createSequentialGroup().addContainerGap()
                    .addGroup(gl_panelTiempo.createParallelGroup(Alignment.LEADING, false)
                            .addComponent(btnPhase1, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(btnLaunchSimulation, GroupLayout.DEFAULT_SIZE, 176, Short.MAX_VALUE))
                    .addGroup(gl_panelTiempo.createParallelGroup(Alignment.LEADING).addGroup(gl_panelTiempo
                            .createSequentialGroup().addGap(52)
                            .addGroup(gl_panelTiempo.createParallelGroup(Alignment.LEADING)
                                    .addComponent(rdbtnCam2).addComponent(rdbtnCam1, GroupLayout.PREFERRED_SIZE,
                                            113, GroupLayout.PREFERRED_SIZE)))
                            .addGroup(gl_panelTiempo.createSequentialGroup().addGap(21).addComponent(
                                    btnPauseContinue, GroupLayout.PREFERRED_SIZE, 168,
                                    GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(47, Short.MAX_VALUE))
            .addComponent(panel, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 394, Short.MAX_VALUE));
    gl_panelTiempo.setVerticalGroup(gl_panelTiempo.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panelTiempo.createSequentialGroup()
                    .addComponent(panel, GroupLayout.PREFERRED_SIZE, 31, GroupLayout.PREFERRED_SIZE).addGap(22)
                    .addGroup(gl_panelTiempo.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_panelTiempo.createSequentialGroup().addComponent(rdbtnCam1)
                                    .addPreferredGap(ComponentPlacement.RELATED).addComponent(rdbtnCam2))
                            .addComponent(btnPhase1, GroupLayout.PREFERRED_SIZE, 58,
                                    GroupLayout.PREFERRED_SIZE))
                    .addGap(18)
                    .addGroup(gl_panelTiempo.createParallelGroup(Alignment.LEADING)
                            .addComponent(btnPauseContinue, GroupLayout.PREFERRED_SIZE, 62,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnLaunchSimulation, GroupLayout.PREFERRED_SIZE, 62,
                                    GroupLayout.PREFERRED_SIZE))));
    panelTiempo.setLayout(gl_panelTiempo);

    JLabel LabelBugMass = new JLabel("Masa del Insecto");
    LabelBugMass.setFont(new Font("Tahoma", Font.PLAIN, 14));

    JLabel labelFallRadio = new JLabel("Radio de Ca\u00EDda");
    labelFallRadio.setFont(new Font("Tahoma", Font.PLAIN, 14));

    JLabel labelBugVelocity = new JLabel("Velocidad del Insecto");
    labelBugVelocity.setFont(new Font("Tahoma", Font.PLAIN, 14));

    JLabel labelDiskVelocity = new JLabel("Velocidad del Disco");
    labelDiskVelocity.setFont(new Font("Tahoma", Font.PLAIN, 14));

    JPanel panelTitle = new JPanel();
    panelTitle.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null, null));

    lblFallRadiusValue = new JLabel("10");
    lblFallRadiusValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblBugVelocityValue = new JLabel("1");
    lblBugVelocityValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblVelocityValue = new JLabel("0.5");
    lblVelocityValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblInitMassValue = new JLabel("30");
    lblInitMassValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    sliderBugInitMass = new JSlider();
    sliderBugInitMass.setValue(30);
    sliderBugInitMass.setMinimum(20);
    sliderBugInitMass.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent event) {
            sliderBugInitMassEvent();
        }
    });
    sliderBugInitMass.setMaximum(70);

    sliderFallRadius = new JSlider();
    sliderFallRadius.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
            sliderFallRadiusEvent();
        }
    });
    sliderFallRadius.setValue(10);
    sliderFallRadius.setMinorTickSpacing(1);
    sliderFallRadius.setMaximum(20);

    sliderBugVelocity = new JSlider();
    sliderBugVelocity.setValue(10);
    sliderBugVelocity.setMaximum(20);
    sliderBugVelocity.setMinimum(5);
    sliderBugVelocity.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
            sliderBugVelocityEvent();
        }
    });
    sliderBugVelocity.setMinorTickSpacing(1);

    sliderDiskVelocity = new JSlider();
    sliderDiskVelocity.setMaximum(10);
    sliderDiskVelocity.setMinimum(1);
    sliderDiskVelocity.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
            sliderDiskVelocityEvent();
        }
    });
    sliderDiskVelocity.setValue(5);
    sliderDiskVelocity.setMinorTickSpacing(1);

    JLabel lblCoeficienteDeRozamiento = new JLabel("Coef de Rozamiento");
    lblCoeficienteDeRozamiento.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblFrictionValue = new JLabel("0.25");
    lblFrictionValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    sliderFriction = new JSlider();
    sliderFriction.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent arg0) {
            sliderFrictionEvent();
        }
    });
    sliderFriction.setValue(25);
    sliderFriction.setMinorTickSpacing(1);
    sliderFriction.setMinimum(1);
    sliderFriction.setMaximum(90);

    GroupLayout gl_panelInputs = new GroupLayout(panelInputs);
    gl_panelInputs.setHorizontalGroup(gl_panelInputs.createParallelGroup(Alignment.TRAILING)
            .addGroup(gl_panelInputs.createSequentialGroup().addContainerGap()
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.TRAILING, false)
                            .addComponent(labelBugVelocity, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(LabelBugMass, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(labelFallRadio, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 120,
                                    Short.MAX_VALUE))
                    .addGap(18)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addComponent(lblInitMassValue, GroupLayout.PREFERRED_SIZE, 42,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblFallRadiusValue, GroupLayout.PREFERRED_SIZE, 56,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblBugVelocityValue, GroupLayout.PREFERRED_SIZE, 56,
                                    GroupLayout.PREFERRED_SIZE))
                    .addGap(18)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addComponent(sliderFallRadius, GroupLayout.PREFERRED_SIZE, 146,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(sliderBugInitMass, GroupLayout.PREFERRED_SIZE, 146,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(sliderBugVelocity, GroupLayout.PREFERRED_SIZE, 146,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(sliderDiskVelocity, GroupLayout.PREFERRED_SIZE, 146,
                                    GroupLayout.PREFERRED_SIZE))
                    .addGap(26))
            .addGroup(gl_panelInputs.createSequentialGroup().addContainerGap()
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.TRAILING)
                            .addComponent(lblCoeficienteDeRozamiento, Alignment.LEADING,
                                    GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
                            .addComponent(labelDiskVelocity, GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE))
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING, false)
                            .addGroup(Alignment.TRAILING,
                                    gl_panelInputs.createSequentialGroup()
                                            .addComponent(lblVelocityValue, GroupLayout.PREFERRED_SIZE, 43,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addGap(204))
                            .addGroup(Alignment.TRAILING,
                                    gl_panelInputs.createSequentialGroup()
                                            .addComponent(lblFrictionValue, GroupLayout.PREFERRED_SIZE, 56,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(ComponentPlacement.RELATED,
                                                    GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(sliderFriction, GroupLayout.PREFERRED_SIZE, 146,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addGap(26))))
            .addComponent(panelTitle, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 396, Short.MAX_VALUE));
    gl_panelInputs.setVerticalGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panelInputs.createSequentialGroup()
                    .addComponent(panelTitle, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addGap(8)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_panelInputs.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(LabelBugMass).addComponent(lblInitMassValue,
                                            GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE))
                            .addComponent(sliderBugInitMass, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_panelInputs.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(labelFallRadio).addComponent(lblFallRadiusValue,
                                            GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE))
                            .addComponent(sliderFallRadius, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addGap(11)
                    .addGroup(
                            gl_panelInputs.createParallelGroup(Alignment.LEADING).addComponent(labelBugVelocity)
                                    .addComponent(lblBugVelocityValue, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(sliderBugVelocity, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.UNRELATED)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_panelInputs.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(labelDiskVelocity).addComponent(lblVelocityValue,
                                            GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE))
                            .addComponent(sliderDiskVelocity, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_panelInputs.createSequentialGroup().addGap(12)
                                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.BASELINE)
                                            .addComponent(lblCoeficienteDeRozamiento,
                                                    GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE)
                                            .addComponent(lblFrictionValue, GroupLayout.PREFERRED_SIZE, 17,
                                                    GroupLayout.PREFERRED_SIZE)))
                            .addGroup(gl_panelInputs.createSequentialGroup()
                                    .addPreferredGap(ComponentPlacement.UNRELATED).addComponent(sliderFriction,
                                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE)))
                    .addGap(47)));

    JLabel lblDatosDeEntrada = new JLabel("Datos de Entrada");
    lblDatosDeEntrada.setFont(new Font("Tahoma", Font.PLAIN, 14));
    panelTitle.add(lblDatosDeEntrada);
    panelInputs.setLayout(gl_panelInputs);
    panel_control.setLayout(gl_panel_control);

    JPanel panel_visualizar = new JPanel();

    GroupLayout groupLayout = new GroupLayout(getContentPane());
    groupLayout.setHorizontalGroup(groupLayout.createParallelGroup(Alignment.LEADING)
            .addGroup(groupLayout.createSequentialGroup().addContainerGap()
                    .addComponent(panel_control, GroupLayout.PREFERRED_SIZE, 432, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(panel_visualizar, GroupLayout.PREFERRED_SIZE, 560, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(32, Short.MAX_VALUE)));
    groupLayout.setVerticalGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
            .addGroup(groupLayout.createSequentialGroup().addContainerGap()
                    .addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
                            .addComponent(panel_visualizar, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 598,
                                    Short.MAX_VALUE)
                            .addComponent(panel_control, Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 598,
                                    Short.MAX_VALUE))
                    .addContainerGap()));
    GridBagLayout gbl_panel_visualizar = new GridBagLayout();
    gbl_panel_visualizar.columnWidths = new int[] { 0, 0 };
    gbl_panel_visualizar.rowHeights = new int[] { 0, 0, 0 };
    gbl_panel_visualizar.columnWeights = new double[] { 1.0, Double.MIN_VALUE };
    gbl_panel_visualizar.rowWeights = new double[] { 1.0, 1.0, Double.MIN_VALUE };
    panel_visualizar.setLayout(gbl_panel_visualizar);

    JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    GridBagConstraints gbc_tabbedPane = new GridBagConstraints();
    gbc_tabbedPane.gridheight = 2;
    gbc_tabbedPane.fill = GridBagConstraints.BOTH;
    gbc_tabbedPane.gridx = 0;
    gbc_tabbedPane.gridy = 0;
    panel_visualizar.add(tabbedPane, gbc_tabbedPane);

    panelSimulation = new JPanelGrafica();
    tabbedPane.addTab("Simulacin", null, panelSimulation, null);
    panelSimulation.setBackground(Color.WHITE);

    getContentPane().setLayout(groupLayout);
}

From source file:de.dmarcini.submatix.pclogger.gui.spx42LogGraphPanel.java

/**
 * Initialisiere das Panel fr die Verbindungen Project: SubmatixBTForPC Package: de.dmarcini.submatix.pclogger.gui
 * /*w w  w  . j a va  2s .c  om*/
 * @author Dirk Marciniak (dirk_marciniak@arcor.de) Stand: 22.04.2012
 */
private void initPanel() {
    setLayout(new BorderLayout(0, 0));
    setBackground(Color.WHITE);
    topPanel = new JPanel();
    topPanel.setBackground(Color.WHITE);
    add(topPanel, BorderLayout.NORTH);
    deviceComboBox = new JComboBox<String>();
    deviceComboBox.setBackground(Color.WHITE);
    deviceComboBox.setMaximumRowCount(26);
    deviceComboBox.setFont(new Font("Dialog", Font.PLAIN, 12));
    deviceComboBox.setActionCommand("change_device_to_display");
    diveSelectComboBox = new JComboBox<String>();
    diveSelectComboBox.setBackground(Color.WHITE);
    diveSelectComboBox.setMaximumRowCount(26);
    diveSelectComboBox.setFont(new Font("Dialog", Font.PLAIN, 12));
    diveSelectComboBox.setActionCommand("change_dive_to_display");
    computeGraphButton = new JButton(LangStrings.getString("spx42LogGraphPanel.computeGraphButton.text")); //$NON-NLS-1$
    computeGraphButton.setMinimumSize(new Dimension(80, 23));
    computeGraphButton.setPreferredSize(new Dimension(80, 23));
    computeGraphButton.setSize(new Dimension(80, 23));
    computeGraphButton.setMaximumSize(new Dimension(80, 23));
    computeGraphButton.setActionCommand("show_log_graph");
    detailGraphButton = new JButton(LangStrings.getString("spx42LogGraphPanel.detailGraphButton.text")); //$NON-NLS-1$
    detailGraphButton.setMinimumSize(new Dimension(80, 23));
    detailGraphButton.setSize(new Dimension(80, 23));
    detailGraphButton.setPreferredSize(new Dimension(80, 23));
    detailGraphButton.setMaximumSize(new Dimension(80, 23));
    detailGraphButton.setActionCommand("set_detail_for_show_graph");
    GroupLayout gl_topPanel = new GroupLayout(topPanel);
    gl_topPanel.setHorizontalGroup(gl_topPanel.createParallelGroup(Alignment.TRAILING).addGroup(gl_topPanel
            .createSequentialGroup().addContainerGap().addComponent(deviceComboBox, 0, 270, Short.MAX_VALUE)
            .addGap(18)
            .addComponent(diveSelectComboBox, GroupLayout.PREFERRED_SIZE, 282, GroupLayout.PREFERRED_SIZE)
            .addGap(32)
            .addComponent(computeGraphButton, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                    GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(ComponentPlacement.RELATED).addComponent(detailGraphButton,
                    GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
            .addGap(18)));
    gl_topPanel.setVerticalGroup(gl_topPanel.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_topPanel.createSequentialGroup()
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(gl_topPanel.createParallelGroup(Alignment.BASELINE)
                            .addComponent(deviceComboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(computeGraphButton, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addComponent(detailGraphButton, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addComponent(diveSelectComboBox, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))));
    topPanel.setLayout(gl_topPanel);
    bottomPanel = new JPanel();
    bottomPanel.setBackground(Color.WHITE);
    add(bottomPanel, BorderLayout.SOUTH);
    maxDepthValueLabel = new JLabel("0");
    coldestTempValueLabel = new JLabel("0");
    diveLenValueLabel = new JLabel("0");
    notesLabel = new JLabel(LangStrings.getString("spx42LoglistPanel.diveNotesLabel.text")); //$NON-NLS-1$
    notesLabel.setForeground(new Color(0, 100, 0));
    notesLabel.setFont(new Font("Tahoma", Font.ITALIC, 12));
    notesEditButton = new JButton("...");
    notesEditButton.setActionCommand("edit_notes_for_dive");
    notesEditButton.setIcon(
            new ImageIcon(spx42LogGraphPanel.class.getResource("/de/dmarcini/submatix/pclogger/res/142.png")));
    notesEditButton.setForeground(new Color(0, 100, 0));
    diluentLabel = new JLabel(""); //$NON-NLS-1$
    diluentLabel.setForeground(new Color(0, 0, 128));
    diluentLabel.setFont(new Font("Segoe UI", Font.PLAIN, 12));
    GroupLayout gl_bottomPanel = new GroupLayout(bottomPanel);
    gl_bottomPanel.setHorizontalGroup(gl_bottomPanel.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_bottomPanel.createSequentialGroup().addContainerGap()
                    .addGroup(gl_bottomPanel.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_bottomPanel.createSequentialGroup()
                                    .addComponent(maxDepthValueLabel, GroupLayout.PREFERRED_SIZE, 206,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addGap(18)
                                    .addComponent(coldestTempValueLabel, GroupLayout.PREFERRED_SIZE, 211,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addGap(18)
                                    .addComponent(diveLenValueLabel, GroupLayout.PREFERRED_SIZE, 200,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addGap(18))
                            .addGroup(Alignment.TRAILING,
                                    gl_bottomPanel.createSequentialGroup()
                                            .addGroup(gl_bottomPanel.createParallelGroup(Alignment.TRAILING)
                                                    .addComponent(diluentLabel, Alignment.LEADING,
                                                            GroupLayout.DEFAULT_SIZE, 667, Short.MAX_VALUE)
                                                    .addComponent(notesLabel, GroupLayout.DEFAULT_SIZE, 653,
                                                            Short.MAX_VALUE))
                                            .addPreferredGap(ComponentPlacement.RELATED)))
                    .addComponent(notesEditButton, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)
                    .addGap(40)));
    gl_bottomPanel.setVerticalGroup(gl_bottomPanel.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_bottomPanel.createSequentialGroup().addGap(18).addGroup(gl_bottomPanel
                    .createParallelGroup(Alignment.LEADING)
                    .addGroup(gl_bottomPanel.createSequentialGroup()
                            .addGroup(gl_bottomPanel.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(notesEditButton).addComponent(notesLabel))
                            .addContainerGap())
                    .addGroup(Alignment.TRAILING,
                            gl_bottomPanel
                                    .createParallelGroup(Alignment.BASELINE).addComponent(maxDepthValueLabel)
                                    .addComponent(coldestTempValueLabel).addComponent(diveLenValueLabel))))
            .addGroup(gl_bottomPanel.createSequentialGroup().addContainerGap().addComponent(diluentLabel)));
    bottomPanel.setLayout(gl_bottomPanel);
    chartPanel = null;
}

From source file:de.tor.tribes.ui.algo.AttackTimePanel.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.// w ww . j a v a2  s.c  o  m
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    buttonGroup1 = new javax.swing.ButtonGroup();
    jPanel2 = new javax.swing.JPanel();
    jLabel2 = new javax.swing.JLabel();
    minSendTimeField = new de.tor.tribes.ui.components.DateTimeField();
    maxArriveTimeField = new de.tor.tribes.ui.components.DateTimeField();
    jLabel3 = new javax.swing.JLabel();
    jArriveInPastLabel = new javax.swing.JLabel();
    jPanel3 = new javax.swing.JPanel();
    jSendTimeFrame = new com.visutools.nav.bislider.BiSlider();
    dateTimeField = new de.tor.tribes.ui.components.DateTimeField();
    jPanel4 = new javax.swing.JPanel();
    jAlwaysButton = new javax.swing.JRadioButton();
    jDayButton = new javax.swing.JRadioButton();
    jExactTimeButton = new javax.swing.JRadioButton();
    jSeparator1 = new javax.swing.JSeparator();
    jLabel8 = new javax.swing.JLabel();
    jLabel9 = new javax.swing.JLabel();
    jPanel1 = new javax.swing.JPanel();
    jLabel5 = new javax.swing.JLabel();
    jLabel6 = new javax.swing.JLabel();
    jLabel7 = new javax.swing.JLabel();
    jPanel5 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTimeFrameList = new javax.swing.JList();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();

    setLayout(new java.awt.GridBagLayout());

    jPanel2.setLayout(new java.awt.GridBagLayout());

    jLabel2.setText("Enddatum");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel2.add(jLabel2, gridBagConstraints);

    minSendTimeField.setTimeEnabled(false);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel2.add(minSendTimeField, gridBagConstraints);

    maxArriveTimeField.setTimeEnabled(false);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel2.add(maxArriveTimeField, gridBagConstraints);

    jLabel3.setText("Startdatum");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel2.add(jLabel3, gridBagConstraints);

    jArriveInPastLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/warning.png"))); // NOI18N
    jArriveInPastLabel.setToolTipText("Die Ankunftzeit liegt in der Vergangenheit!");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    jPanel2.add(jArriveInPastLabel, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    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);
    add(jPanel2, gridBagConstraints);

    jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Einstellungen"));

    jSendTimeFrame.setToolTipText("Zeitfenster des Zeitrahmens");

    dateTimeField.setToolTipText("Datum und Uhrzeit des Zeitrahmens");
    dateTimeField.setEnabled(false);
    dateTimeField.setTimeEnabled(false);

    jPanel4.setLayout(new java.awt.GridBagLayout());

    buttonGroup1.add(jAlwaysButton);
    jAlwaysButton.setSelected(true);
    jAlwaysButton.setText("Immer");
    jAlwaysButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/att_remove.png"))); // NOI18N
    jAlwaysButton.setRolloverEnabled(false);
    jAlwaysButton.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/res/month.png"))); // NOI18N
    jAlwaysButton.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            fireValidityStateChangedEvent(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
    gridBagConstraints.weighty = 0.33;
    jPanel4.add(jAlwaysButton, gridBagConstraints);

    buttonGroup1.add(jDayButton);
    jDayButton.setText("Tag");
    jDayButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/att_remove.png"))); // NOI18N
    jDayButton.setRolloverEnabled(false);
    jDayButton.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/res/day.png"))); // NOI18N
    jDayButton.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            fireValidityStateChangedEvent(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weighty = 0.33;
    jPanel4.add(jDayButton, gridBagConstraints);

    buttonGroup1.add(jExactTimeButton);
    jExactTimeButton.setText("Zeitpunkt");
    jExactTimeButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/att_remove.png"))); // NOI18N
    jExactTimeButton.setRolloverEnabled(false);
    jExactTimeButton.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/res/date-time.png"))); // NOI18N
    jExactTimeButton.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            fireValidityStateChangedEvent(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTH;
    gridBagConstraints.weighty = 0.33;
    jPanel4.add(jExactTimeButton, gridBagConstraints);

    jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridheight = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
    gridBagConstraints.ipadx = 10;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.weighty = 1.0;
    jPanel4.add(jSeparator1, gridBagConstraints);

    jLabel8.setText("Datum/Zeit");

    jLabel9.setText("Zeitraum");

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap().addGroup(jPanel3Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.LEADING,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE)
                    .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.LEADING,
                            javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel3Layout.createSequentialGroup().addGap(18, 18, 18).addComponent(
                                    dateTimeField, javax.swing.GroupLayout.DEFAULT_SIZE, 372, Short.MAX_VALUE))
                            .addGroup(jPanel3Layout.createSequentialGroup().addGap(23, 23, 23).addComponent(
                                    jSendTimeFrame, javax.swing.GroupLayout.DEFAULT_SIZE, 371,
                                    Short.MAX_VALUE)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jPanel4,
                            javax.swing.GroupLayout.PREFERRED_SIZE, 97,
                            javax.swing.GroupLayout.PREFERRED_SIZE)));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.LEADING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                    .addGroup(jPanel3Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(dateTimeField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                    .addGap(37, 37, 37)
                                    .addGroup(jPanel3Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jSendTimeFrame,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 36,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addContainerGap()));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    add(jPanel3, gridBagConstraints);

    jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Zeitrahmenvorschau"));

    jLabel5.setBackground(new java.awt.Color(204, 204, 204));
    jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/move_out.png"))); // NOI18N
    jLabel5.setText("Am 13.04.11, von 10 bis 24 Uhr (Alle)");
    jLabel5.setToolTipText("Abschickzeitrahmen fr die gewhlten Einstellungen");
    jLabel5.setMaximumSize(new java.awt.Dimension(230, 16));
    jLabel5.setMinimumSize(new java.awt.Dimension(230, 16));
    jLabel5.setOpaque(true);
    jLabel5.setPreferredSize(new java.awt.Dimension(230, 16));

    jLabel6.setBackground(new java.awt.Color(204, 204, 204));
    jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/move_in.png"))); // NOI18N
    jLabel6.setText("Am 13.04.11, von 10 bis 24 Uhr (Alle)");
    jLabel6.setToolTipText("Ankunftszeitrahmen fr die gewhlten Einstellungen");
    jLabel6.setMaximumSize(new java.awt.Dimension(230, 16));
    jLabel6.setMinimumSize(new java.awt.Dimension(230, 16));
    jLabel6.setOpaque(true);
    jLabel6.setPreferredSize(new java.awt.Dimension(230, 16));

    jLabel7.setBackground(new java.awt.Color(204, 204, 204));
    jLabel7.setForeground(new java.awt.Color(153, 153, 153));
    jLabel7.setText("(Passenden Zeitrahmen per Drag&Drop in die Zeitrahmenliste ziehen)");

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 271, Short.MAX_VALUE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 271, Short.MAX_VALUE))
                    .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addContainerGap()));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(jLabel7)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    add(jPanel1, gridBagConstraints);

    jPanel5.setLayout(new java.awt.GridBagLayout());

    jScrollPane1.setBorder(javax.swing.BorderFactory.createTitledBorder("Verwendete Zeitrahmen"));
    jScrollPane1.setMinimumSize(new java.awt.Dimension(262, 60));

    jTimeFrameList.setToolTipText(
            "<html>Liste der verwendeten Zeitrahmen<br/>\nUm Zeitrahmen zu entfernen, markieren einen oder mehrere Zeitrahmen und drcke <i>Entf</i>\n</html>");
    jScrollPane1.setViewportView(jTimeFrameList);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridheight = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    jPanel5.add(jScrollPane1, gridBagConstraints);

    jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/red_x.png"))); // NOI18N
    jButton1.setToolTipText("Die gewhlten Zeitrahmen lschen");
    jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseReleased(java.awt.event.MouseEvent evt) {
            fireDeleteTimeFramesEvent(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.insets = new java.awt.Insets(15, 5, 5, 5);
    jPanel5.add(jButton1, gridBagConstraints);

    jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/refresh.png"))); // NOI18N
    jButton2.setToolTipText("Alle Zeitrahmen lschen");
    jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseReleased(java.awt.event.MouseEvent evt) {
            fireResetTimeFramesEvent(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.insets = new java.awt.Insets(15, 5, 5, 5);
    jPanel5.add(jButton2, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    add(jPanel5, gridBagConstraints);
}

From source file:AST.DesignPatternDetection.java

private void initComponents() {

    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner Evaluation license - Murat Oruc
    btPathFinder = new JButton();
    label1 = new JLabel();
    tfPath = new JTextField();
    label2 = new JLabel();
    cbSelectionDP = new JComboBox<>();
    btRun = new JButton();
    label3 = new JLabel();
    tfProjectName = new JTextField();
    label4 = new JLabel();
    tfThreshold = new JTextField();
    chbOverlap = new JCheckBox();
    btRunSgiso = new JButton();
    scrollPane1 = new JScrollPane();
    taInfo = new JTextArea();
    label5 = new JLabel();
    tfProgramPath = new JTextField();
    btProgramPath = new JButton();
    button1 = new JButton();
    button2 = new JButton();
    chbInnerClass = new JCheckBox();

    //======== this ========
    setTitle("DesPaD (Design Pattern Detector)");
    setIconImage(((ImageIcon) UIManager.getIcon("FileView.computerIcon")).getImage());
    addWindowListener(new WindowAdapter() {
        @Override/*w  ww.  jav a  2 s  . c o m*/
        public void windowClosing(WindowEvent e) {
            thisWindowClosing(e);
        }
    });
    Container contentPane = getContentPane();

    //---- btPathFinder ----
    btPathFinder.setText("...");
    btPathFinder.setFont(btPathFinder.getFont().deriveFont(btPathFinder.getFont().getSize() + 1f));
    btPathFinder.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            btPathFinderActionPerformed(e);
        }
    });

    //---- label1 ----
    label1.setText("Source Code Directory Path");

    //---- tfPath ----
    tfPath.setText("...");
    tfPath.setEditable(false);
    tfPath.setForeground(Color.blue);
    tfPath.setFont(tfPath.getFont().deriveFont(tfPath.getFont().getStyle() | Font.BOLD));

    //---- label2 ----
    label2.setText("Select Design Pattern");

    //---- cbSelectionDP ----
    cbSelectionDP.setModel(new DefaultComboBoxModel<>(
            new String[] { "FACTORY_METHOD", "PROTOTYPE", "ABSTRACT_FACTORY", "BUILDER", "SINGLETON",
                    "COMPOSITE", "FACADE", "DECORATOR", "DECORATOR2", "BRIDGE", "FLYWEIGHT", "ADAPTER", "PROXY",
                    "MEDIATOR", "STATE", "OBSERVER", "TEMPLATE_METHOD", "TEMPLATE_METHOD2", "COMMAND",
                    "CHAIN_OF_RESPONSIBILITY", "INTERPRETER", "MEMENTO", "ITERATOR", "STRATEGY", "VISITOR" }));

    //---- btRun ----
    btRun.setText("1. Build Model Graph");
    btRun.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            try {
                btRunActionPerformed(e);
            } catch (IOException | InterruptedException e1) {
                // TODO Auto-generated catch block
                e1.printStackTrace();
            }
        }
    });

    //---- label3 ----
    label3.setText("Project Name");

    //---- label4 ----
    label4.setText("Threshold");

    //---- tfThreshold ----
    tfThreshold.setText("0.0");

    //---- chbOverlap ----
    chbOverlap.setText("Overlap");

    //---- btRunSgiso ----
    btRunSgiso.setText("2. Run Subdue-Sgiso Algorithm");
    btRunSgiso.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            try {
                btRunSgisoActionPerformed(e);
            } catch (IOException | InterruptedException e1) {
                // TODO Auto-generated catch block
                e1.printStackTrace();
            }
        }
    });

    //======== scrollPane1 ========
    {
        scrollPane1.setViewportView(taInfo);
    }

    //---- label5 ----
    label5.setText("Program Directory Path");

    //---- tfProgramPath ----
    tfProgramPath.setEditable(false);
    tfProgramPath.setForeground(Color.blue);
    tfProgramPath.setFont(tfProgramPath.getFont().deriveFont(tfProgramPath.getFont().getStyle() | Font.BOLD));

    //---- btProgramPath ----
    btProgramPath.setText("...");
    btProgramPath.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            btProgramPathActionPerformed(e);
        }
    });

    //---- button1 ----
    button1.setText("3. Exclude overlap outputs");
    button1.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            try {
                button1ActionPerformed(e);
            } catch (FileNotFoundException e1) {
                // TODO Auto-generated catch block
                e1.printStackTrace();
            }
        }
    });

    //---- button2 ----
    button2.setText("4. Graph Representations");
    button2.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            try {
                button2ActionPerformed(e);
            } catch (IOException e1) {
                // TODO Auto-generated catch block
                e1.printStackTrace();
            }
        }
    });

    //---- chbInnerClass ----
    chbInnerClass.setText("Include Inner Classes");
    chbInnerClass.setSelected(true);

    GroupLayout contentPaneLayout = new GroupLayout(contentPane);
    contentPane.setLayout(contentPaneLayout);
    contentPaneLayout.setHorizontalGroup(
            contentPaneLayout.createParallelGroup().addGroup(contentPaneLayout.createSequentialGroup()
                    .addContainerGap().addGroup(contentPaneLayout
                            .createParallelGroup().addGroup(GroupLayout.Alignment.TRAILING,
                                    contentPaneLayout.createSequentialGroup().addComponent(label1).addGap(21,
                                            433, Short.MAX_VALUE))
                            .addGroup(contentPaneLayout
                                    .createSequentialGroup().addGroup(contentPaneLayout.createParallelGroup()
                                            .addComponent(label4).addGroup(contentPaneLayout
                                                    .createSequentialGroup().addGroup(contentPaneLayout
                                                            .createParallelGroup(GroupLayout.Alignment.TRAILING,
                                                                    false)
                                                            .addComponent(
                                                                    button1, GroupLayout.Alignment.LEADING,
                                                                    GroupLayout.DEFAULT_SIZE, 260,
                                                                    Short.MAX_VALUE)
                                                            .addComponent(tfThreshold,
                                                                    GroupLayout.Alignment.LEADING)
                                                            .addComponent(cbSelectionDP,
                                                                    GroupLayout.Alignment.LEADING,
                                                                    GroupLayout.DEFAULT_SIZE, 260,
                                                                    Short.MAX_VALUE)
                                                            .addComponent(label2, GroupLayout.Alignment.LEADING)
                                                            .addComponent(
                                                                    btRun, GroupLayout.Alignment.LEADING,
                                                                    GroupLayout.DEFAULT_SIZE, 260,
                                                                    Short.MAX_VALUE))
                                                    .addGap(30, 30, 30)
                                                    .addGroup(contentPaneLayout
                                                            .createParallelGroup(GroupLayout.Alignment.LEADING,
                                                                    false)
                                                            .addComponent(label3)
                                                            .addComponent(tfProjectName,
                                                                    GroupLayout.DEFAULT_SIZE, 260,
                                                                    Short.MAX_VALUE)
                                                            .addGroup(contentPaneLayout.createSequentialGroup()
                                                                    .addComponent(chbOverlap)
                                                                    .addPreferredGap(
                                                                            LayoutStyle.ComponentPlacement.RELATED,
                                                                            GroupLayout.DEFAULT_SIZE,
                                                                            Short.MAX_VALUE)
                                                                    .addComponent(chbInnerClass))
                                                            .addComponent(btRunSgiso, GroupLayout.DEFAULT_SIZE,
                                                                    260, Short.MAX_VALUE)
                                                            .addComponent(
                                                                    button2, GroupLayout.DEFAULT_SIZE, 260,
                                                                    Short.MAX_VALUE))))
                                    .addGap(0, 56, Short.MAX_VALUE))
                            .addGroup(GroupLayout.Alignment.TRAILING,
                                    contentPaneLayout.createSequentialGroup().addGroup(contentPaneLayout
                                            .createParallelGroup(GroupLayout.Alignment.TRAILING)
                                            .addComponent(scrollPane1, GroupLayout.DEFAULT_SIZE, 594,
                                                    Short.MAX_VALUE)
                                            .addGroup(contentPaneLayout.createSequentialGroup()
                                                    .addGroup(contentPaneLayout.createParallelGroup()
                                                            .addGroup(contentPaneLayout.createSequentialGroup()
                                                                    .addComponent(label5)
                                                                    .addGap(0, 418, Short.MAX_VALUE))
                                                            .addComponent(tfProgramPath,
                                                                    GroupLayout.DEFAULT_SIZE, 564,
                                                                    Short.MAX_VALUE)
                                                            .addComponent(
                                                                    tfPath, GroupLayout.Alignment.TRAILING,
                                                                    GroupLayout.DEFAULT_SIZE, 564,
                                                                    Short.MAX_VALUE))
                                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                                    .addGroup(contentPaneLayout
                                                            .createParallelGroup(GroupLayout.Alignment.LEADING,
                                                                    false)
                                                            .addComponent(btPathFinder,
                                                                    GroupLayout.DEFAULT_SIZE,
                                                                    GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                            .addComponent(btProgramPath,
                                                                    GroupLayout.DEFAULT_SIZE,
                                                                    GroupLayout.DEFAULT_SIZE,
                                                                    Short.MAX_VALUE))))
                                            .addContainerGap()))));
    contentPaneLayout.setVerticalGroup(contentPaneLayout.createParallelGroup().addGroup(contentPaneLayout
            .createSequentialGroup().addGap(29, 29, 29).addComponent(label1).addGap(5, 5, 5)
            .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                    .addComponent(tfPath, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(btPathFinder, GroupLayout.DEFAULT_SIZE, 31, Short.MAX_VALUE))
            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(label5)
            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
            .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                    .addComponent(tfProgramPath, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(btProgramPath))
            .addGap(18, 18, 18)
            .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(label2)
                    .addComponent(label3))
            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
            .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                    .addComponent(cbSelectionDP, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(tfProjectName, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addGap(18, 18, 18).addComponent(label4).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
            .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                    .addComponent(tfThreshold, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(chbOverlap).addComponent(chbInnerClass))
            .addGap(18, 18, 18)
            .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                    .addComponent(btRun, GroupLayout.PREFERRED_SIZE, 47, GroupLayout.PREFERRED_SIZE)
                    .addComponent(btRunSgiso, GroupLayout.PREFERRED_SIZE, 47, GroupLayout.PREFERRED_SIZE))
            .addGap(18, 18, 18)
            .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                    .addComponent(button2, GroupLayout.DEFAULT_SIZE, 45, Short.MAX_VALUE)
                    .addComponent(button1, GroupLayout.DEFAULT_SIZE, 45, Short.MAX_VALUE))
            .addGap(18, 18, 18).addComponent(scrollPane1, GroupLayout.DEFAULT_SIZE, 184, Short.MAX_VALUE)
            .addContainerGap()));
    setSize(630, 625);
    setLocationRelativeTo(null);
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:com.juanhg.pot.PotApplet.java

private void autogeneratedCode() {
    JPanel panel_control = new JPanel();
    panel_control.setBorder(new CompoundBorder(new EtchedBorder(EtchedBorder.RAISED, null, null),
            new BevelBorder(BevelBorder.RAISED, null, null, null, null)));

    JPanel panelInputs = new JPanel();
    panelInputs.setToolTipText("");
    panelInputs.setBorder(new MatteBorder(1, 1, 1, 1, (Color) new Color(0, 0, 0)));

    JPanel panelOutputs = new JPanel();
    panelOutputs.setToolTipText("");
    panelOutputs.setBorder(new MatteBorder(1, 1, 1, 1, (Color) new Color(0, 0, 0)));

    JPanel panelTitleOutputs = new JPanel();
    panelTitleOutputs.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null, null));

    JLabel labelOutputData = new JLabel("Datos de la Simulaci\u00F3n");
    labelOutputData.setFont(new Font("Tahoma", Font.PLAIN, 14));
    panelTitleOutputs.add(labelOutputData);

    JLabel lblW = new JLabel("W:");
    lblW.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblWValue = new JLabel();
    lblWValue.setText("-");
    lblWValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblQ = new JLabel("Q:");
    lblQ.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblQValue = new JLabel();
    lblQValue.setText("-");
    lblQValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblT2 = new JLabel("T:");
    lblT2.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblTOValue = new JLabel();
    lblTOValue.setText("-");
    lblTOValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblU = new JLabel("U:");
    lblU.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblP = new JLabel("P:");
    lblP.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblVO = new JLabel("V:");
    lblVO.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblVOValue = new JLabel();
    lblVOValue.setText("-");
    lblVOValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblPValue = new JLabel();
    lblPValue.setText("-");
    lblPValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblUValue = new JLabel();
    lblUValue.setText("-");
    lblUValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    GroupLayout gl_panelOutputs = new GroupLayout(panelOutputs);
    gl_panelOutputs.setHorizontalGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
            .addComponent(panelTitleOutputs, GroupLayout.DEFAULT_SIZE, 352, Short.MAX_VALUE)
            .addGroup(gl_panelOutputs.createSequentialGroup().addGap(31).addGroup(gl_panelOutputs
                    .createParallelGroup(Alignment.TRAILING)
                    .addGroup(gl_panelOutputs.createSequentialGroup()
                            .addGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING, false)
                                    .addComponent(lblQ, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                            Short.MAX_VALUE)
                                    .addComponent(lblW, GroupLayout.PREFERRED_SIZE, 43,
                                            GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(ComponentPlacement.RELATED)
                            .addGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
                                    .addComponent(lblWValue, GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE)
                                    .addComponent(lblQValue, GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE)))
                    .addGroup(Alignment.LEADING, gl_panelOutputs.createSequentialGroup()
                            .addComponent(lblT2, GroupLayout.PREFERRED_SIZE, 43, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(ComponentPlacement.RELATED).addComponent(lblTOValue,
                                    GroupLayout.PREFERRED_SIZE, 90, GroupLayout.PREFERRED_SIZE)))
                    .addGap(18)/*from   w w w .  ja v  a2  s  .  co m*/
                    .addGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_panelOutputs.createSequentialGroup()
                                    .addComponent(lblU, GroupLayout.PREFERRED_SIZE, 43,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addGap(6).addComponent(lblUValue, GroupLayout.PREFERRED_SIZE, 90,
                                            GroupLayout.PREFERRED_SIZE))
                            .addGroup(gl_panelOutputs.createSequentialGroup()
                                    .addComponent(lblP, GroupLayout.PREFERRED_SIZE, 43,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addGap(6).addComponent(lblPValue, GroupLayout.PREFERRED_SIZE, 90,
                                            GroupLayout.PREFERRED_SIZE))
                            .addGroup(gl_panelOutputs.createSequentialGroup()
                                    .addComponent(lblVO, GroupLayout.PREFERRED_SIZE, 43,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addGap(6).addComponent(lblVOValue, GroupLayout.PREFERRED_SIZE, 90,
                                            GroupLayout.PREFERRED_SIZE)))
                    .addGap(25)));
    gl_panelOutputs.setVerticalGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panelOutputs
                    .createSequentialGroup().addComponent(panelTitleOutputs, GroupLayout.PREFERRED_SIZE,
                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING).addGroup(gl_panelOutputs
                            .createSequentialGroup()
                            .addGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
                                    .addComponent(lblU, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblUValue, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE))
                            .addGap(6)
                            .addGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
                                    .addComponent(lblP, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblPValue, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE))
                            .addGap(6)
                            .addGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
                                    .addComponent(lblVO, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblVOValue, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE)))
                            .addGroup(gl_panelOutputs.createSequentialGroup().addGroup(gl_panelOutputs
                                    .createParallelGroup(Alignment.TRAILING)
                                    .addGroup(gl_panelOutputs.createSequentialGroup()
                                            .addComponent(lblW, GroupLayout.PREFERRED_SIZE, 17,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(ComponentPlacement.RELATED).addComponent(lblQ,
                                                    GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE))
                                    .addGroup(gl_panelOutputs.createSequentialGroup()
                                            .addComponent(lblWValue, GroupLayout.PREFERRED_SIZE, 17,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(ComponentPlacement.RELATED).addComponent(lblQValue,
                                                    GroupLayout.PREFERRED_SIZE, 17,
                                                    GroupLayout.PREFERRED_SIZE)))
                                    .addPreferredGap(ComponentPlacement.RELATED)
                                    .addGroup(gl_panelOutputs.createParallelGroup(Alignment.LEADING)
                                            .addComponent(lblT2, GroupLayout.PREFERRED_SIZE, 17,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addComponent(lblTOValue, GroupLayout.PREFERRED_SIZE, 17,
                                                    GroupLayout.PREFERRED_SIZE))))
                    .addContainerGap()));
    panelOutputs.setLayout(gl_panelOutputs);

    JPanel panelLicense = new JPanel();
    panelLicense.setBorder(new LineBorder(new Color(0, 0, 0)));

    JPanel panel_6 = new JPanel();
    panel_6.setBorder(new LineBorder(new Color(0, 0, 0)));
    GroupLayout gl_panel_control = new GroupLayout(panel_control);
    gl_panel_control
            .setHorizontalGroup(gl_panel_control.createParallelGroup(Alignment.LEADING)
                    .addGroup(Alignment.TRAILING, gl_panel_control.createSequentialGroup().addContainerGap()
                            .addGroup(gl_panel_control.createParallelGroup(Alignment.TRAILING)
                                    .addComponent(panelInputs, Alignment.LEADING, GroupLayout.PREFERRED_SIZE,
                                            346, Short.MAX_VALUE)
                                    .addComponent(panelOutputs, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(panel_6, GroupLayout.PREFERRED_SIZE, 346, Short.MAX_VALUE)
                                    .addComponent(panelLicense, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            346, Short.MAX_VALUE))
                            .addContainerGap()));
    gl_panel_control.setVerticalGroup(gl_panel_control.createParallelGroup(Alignment.TRAILING)
            .addGroup(gl_panel_control.createSequentialGroup().addContainerGap()
                    .addComponent(panelInputs, GroupLayout.DEFAULT_SIZE, 292, Short.MAX_VALUE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(panelOutputs, GroupLayout.PREFERRED_SIZE, 108, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(panel_6, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED).addComponent(panelLicense,
                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                    .addGap(24)));

    btnLaunchSimulation = new JButton("Iniciar");
    btnLaunchSimulation.setFont(new Font("Tahoma", Font.PLAIN, 16));
    btnLaunchSimulation.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent event) {
            btnLaunchSimulationEvent(event);
        }
    });
    GroupLayout gl_panel_6 = new GroupLayout(panel_6);
    gl_panel_6.setHorizontalGroup(gl_panel_6.createParallelGroup(Alignment.LEADING).addGroup(Alignment.TRAILING,
            gl_panel_6.createSequentialGroup().addContainerGap()
                    .addComponent(btnLaunchSimulation, GroupLayout.DEFAULT_SIZE, 324, Short.MAX_VALUE)
                    .addContainerGap()));
    gl_panel_6.setVerticalGroup(gl_panel_6.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panel_6
                    .createSequentialGroup().addContainerGap().addComponent(btnLaunchSimulation,
                            GroupLayout.PREFERRED_SIZE, 55, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(69, Short.MAX_VALUE)));
    panel_6.setLayout(gl_panel_6);

    JLabel lblNewLabel = new JLabel("GNU GENERAL PUBLIC LICENSE");
    panelLicense.add(lblNewLabel);

    lblT = new JLabel("Temperatura");
    lblT.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblV = new JLabel("Volumen");
    lblV.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblMo = new JLabel("Masa Inicial");
    lblMo.setFont(new Font("Tahoma", Font.PLAIN, 14));

    JPanel panelTitle = new JPanel();
    panelTitle.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null, null));

    lblVValue = new JLabel("15");
    lblVValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblMoValue = new JLabel("5");
    lblMoValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblTValue = new JLabel("300");
    lblTValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    sliderT = new JSlider();
    sliderT.setMinimum(280);
    sliderT.setMaximum(330);
    sliderT.setMinorTickSpacing(1);
    sliderT.setValue(300);
    sliderT.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent event) {
            sliderI1Event();
        }
    });

    sliderV = new JSlider();
    sliderV.setMinimum(3);
    sliderV.setMaximum(30);
    sliderV.setMinorTickSpacing(1);
    sliderV.setValue(15);
    sliderV.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
            sliderI2Event();
        }
    });

    sliderMo = new JSlider();
    sliderMo.setMinimum(1);
    sliderMo.setMaximum(1000);
    sliderMo.setValue(5);
    sliderMo.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
            sliderI3Event();
        }
    });

    lblM = new JLabel("Masa Final");
    lblM.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblMValue = new JLabel("4");
    lblMValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    sliderM = new JSlider();
    sliderM.setMinimum(1);
    sliderM.setMaximum(1000);
    sliderM.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent arg0) {
            sliderI4Event();
        }
    });
    sliderM.setValue(4);
    sliderM.setMinorTickSpacing(1);

    lblType = new JLabel("Combustible");
    lblType.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblTypeValue = new JLabel("Madera");
    lblTypeValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    sliderType = new JSlider();
    sliderType.setMinimum(1);
    sliderType.setMaximum(4);
    sliderType.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
            sliderI5Event();
        }
    });
    sliderType.setValue(1);
    sliderType.setMinorTickSpacing(1);

    lblMc = new JLabel("Masa Combustible");
    lblMc.setFont(new Font("Tahoma", Font.PLAIN, 14));

    lblMcValue = new JLabel("10");
    lblMcValue.setFont(new Font("Tahoma", Font.PLAIN, 14));

    sliderMc = new JSlider();
    sliderMc.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent arg0) {
            sliderI6Event();
        }
    });
    sliderMc.setMinimum(1);
    sliderMc.setValue(10);
    sliderMc.setMinorTickSpacing(1);
    sliderMc.setMaximum(50);

    btn1 = new JButton("1");
    btn1.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent arg0) {
            btn1function();
        }
    });

    btn2 = new JButton("2");
    btn2.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {

            btn1.setEnabled(true);
            btn2.setEnabled(false);
            btn3.setEnabled(true);

            lblT.setEnabled(true);
            lblTValue.setEnabled(true);
            sliderT.setEnabled(true);

            lblV.setEnabled(true);
            lblVValue.setEnabled(true);
            sliderV.setEnabled(true);

            lblMo.setEnabled(false);
            lblMoValue.setEnabled(false);
            sliderMo.setEnabled(false);

            lblM.setEnabled(false);
            lblMValue.setEnabled(false);
            sliderM.setEnabled(false);

            lblType.setEnabled(true);
            lblTypeValue.setEnabled(true);
            sliderType.setEnabled(true);

            lblMc.setEnabled(true);
            lblMcValue.setEnabled(true);
            sliderMc.setEnabled(true);

            model.setCurrentPhase(2);
            readInputs();
            updateFire();
            updateScrews();
            updatePot();

            updatePanels();
            repaint();
        }
    });

    btn3 = new JButton("3");
    btn3.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {

            btn1.setEnabled(true);
            btn2.setEnabled(true);
            btn3.setEnabled(false);

            lblT.setEnabled(true);
            lblTValue.setEnabled(true);
            sliderT.setEnabled(true);

            lblV.setEnabled(false);
            lblVValue.setEnabled(false);
            sliderV.setEnabled(false);

            lblMo.setEnabled(false);
            lblMoValue.setEnabled(false);
            sliderMo.setEnabled(false);

            lblM.setEnabled(true);
            lblMValue.setEnabled(true);
            sliderM.setEnabled(true);

            lblType.setEnabled(true);
            lblTypeValue.setEnabled(true);
            sliderType.setEnabled(true);

            lblMc.setEnabled(true);
            lblMcValue.setEnabled(true);
            sliderMc.setEnabled(true);

            model.setCurrentPhase(3);
            readInputs();
            updateFire();
            updateScrews();
            updatePot();

            updatePanels();
            repaint();
        }
    });

    GroupLayout gl_panelInputs = new GroupLayout(panelInputs);
    gl_panelInputs.setHorizontalGroup(gl_panelInputs.createParallelGroup(Alignment.TRAILING)
            .addComponent(panelTitle, GroupLayout.DEFAULT_SIZE, 383, Short.MAX_VALUE)
            .addGroup(gl_panelInputs.createSequentialGroup().addGap(25)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING).addGroup(Alignment.TRAILING,
                            gl_panelInputs.createSequentialGroup().addGroup(gl_panelInputs
                                    .createParallelGroup(Alignment.TRAILING).addGroup(gl_panelInputs
                                            .createSequentialGroup()
                                            .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                                                    .addComponent(lblV, GroupLayout.PREFERRED_SIZE, 120,
                                                            GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(lblMo, GroupLayout.DEFAULT_SIZE, 141,
                                                            Short.MAX_VALUE)
                                                    .addComponent(lblM, GroupLayout.PREFERRED_SIZE, 120,
                                                            GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(lblType, GroupLayout.PREFERRED_SIZE, 120,
                                                            GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(lblMc, GroupLayout.PREFERRED_SIZE, 118,
                                                            GroupLayout.PREFERRED_SIZE))
                                            .addGap(18))
                                    .addComponent(lblT, GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE))
                                    .addPreferredGap(ComponentPlacement.RELATED)
                                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                                            .addComponent(lblTValue, GroupLayout.PREFERRED_SIZE, 42,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addComponent(lblVValue, GroupLayout.PREFERRED_SIZE, 56,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addComponent(lblMoValue, GroupLayout.PREFERRED_SIZE, 56,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addComponent(lblMValue, GroupLayout.PREFERRED_SIZE, 56,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addComponent(lblTypeValue, GroupLayout.PREFERRED_SIZE, 70,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addComponent(lblMcValue, GroupLayout.PREFERRED_SIZE, 42,
                                                    GroupLayout.PREFERRED_SIZE))
                                    .addGap(4).addPreferredGap(ComponentPlacement.RELATED)
                                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                                            .addComponent(sliderMc, GroupLayout.PREFERRED_SIZE, 88,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addComponent(sliderType, GroupLayout.PREFERRED_SIZE, 88,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addComponent(sliderM, GroupLayout.PREFERRED_SIZE, 88,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addComponent(sliderMo, GroupLayout.DEFAULT_SIZE, 109,
                                                    Short.MAX_VALUE)
                                            .addComponent(sliderV, 0, 0, Short.MAX_VALUE)
                                            .addComponent(sliderT, 0, 0, Short.MAX_VALUE)))
                            .addGroup(gl_panelInputs.createSequentialGroup()
                                    .addComponent(btn1, GroupLayout.PREFERRED_SIZE, 94,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(ComponentPlacement.UNRELATED)
                                    .addComponent(btn2, GroupLayout.PREFERRED_SIZE, 93,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(ComponentPlacement.UNRELATED).addComponent(btn3,
                                            GroupLayout.PREFERRED_SIZE, 91, GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap()));
    gl_panelInputs.setVerticalGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panelInputs.createSequentialGroup()
                    .addComponent(panelTitle, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addGap(18)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_panelInputs.createParallelGroup(Alignment.BASELINE).addComponent(lblT)
                                    .addComponent(lblTValue, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE))
                            .addComponent(sliderT, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.UNRELATED)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_panelInputs.createParallelGroup(Alignment.BASELINE).addComponent(lblV)
                                    .addComponent(lblVValue, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE))
                            .addComponent(sliderV, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addGap(11)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING).addComponent(lblMo)
                            .addComponent(lblMoValue, GroupLayout.PREFERRED_SIZE, 17,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(sliderMo, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.UNRELATED)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addComponent(lblM, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblMValue, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE)
                            .addComponent(sliderM, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.UNRELATED)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addComponent(lblType, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE)
                            .addComponent(sliderType, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblTypeValue, GroupLayout.PREFERRED_SIZE, 17,
                                    GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.UNRELATED)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_panelInputs.createParallelGroup(Alignment.BASELINE)
                                    .addComponent(lblMcValue, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblMc, GroupLayout.PREFERRED_SIZE, 17,
                                            GroupLayout.PREFERRED_SIZE))
                            .addComponent(sliderMc, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.UNRELATED)
                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.LEADING)
                            .addGroup(gl_panelInputs.createSequentialGroup()
                                    .addComponent(btn1, GroupLayout.DEFAULT_SIZE, 55, Short.MAX_VALUE)
                                    .addGap(12))
                            .addGroup(gl_panelInputs.createSequentialGroup()
                                    .addGroup(gl_panelInputs.createParallelGroup(Alignment.BASELINE)
                                            .addComponent(btn2, GroupLayout.DEFAULT_SIZE, 54, Short.MAX_VALUE)
                                            .addComponent(btn3, GroupLayout.DEFAULT_SIZE, 56, Short.MAX_VALUE))
                                    .addContainerGap()))));

    JLabel lblDatosDeEntrada = new JLabel("Datos de Entrada");
    lblDatosDeEntrada.setFont(new Font("Tahoma", Font.PLAIN, 14));
    panelTitle.add(lblDatosDeEntrada);
    panelInputs.setLayout(gl_panelInputs);
    panel_control.setLayout(gl_panel_control);

    JPanel panel_visualizar = new JPanel();
    panel_visualizar.setBackground(UIManager.getColor("Button.background"));

    GroupLayout groupLayout = new GroupLayout(getContentPane());
    groupLayout.setHorizontalGroup(groupLayout.createParallelGroup(Alignment.LEADING)
            .addGroup(groupLayout.createSequentialGroup().addContainerGap()
                    .addComponent(panel_control, GroupLayout.PREFERRED_SIZE, 382, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(panel_visualizar, GroupLayout.PREFERRED_SIZE, 741, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(31, Short.MAX_VALUE)));
    groupLayout.setVerticalGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
            .addGroup(groupLayout.createSequentialGroup()
                    .addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
                            .addGroup(groupLayout.createSequentialGroup().addContainerGap().addComponent(
                                    panel_visualizar, GroupLayout.DEFAULT_SIZE, 568, Short.MAX_VALUE))
                            .addGroup(groupLayout.createSequentialGroup().addGap(12).addComponent(panel_control,
                                    GroupLayout.PREFERRED_SIZE, 568, Short.MAX_VALUE)))
                    .addContainerGap()));

    JPanel panel = new JPanel();
    panel.setBounds(0, 0, 345, 568);
    panel.setBackground(Color.WHITE);
    panel.setBorder(new LineBorder(new Color(0, 0, 0)));

    JPanel panel_1 = new JPanel();
    panel_1.setBounds(351, 0, 390, 568);
    panel_1.setBackground(Color.WHITE);
    panel_1.setBorder(new LineBorder(new Color(0, 0, 0)));

    JPanel panel33 = new JPanel();
    panel33.setBounds(1, 38, 388, 529);
    panel33.setBackground(Color.WHITE);

    JPanel panel_5 = new JPanel();
    panel_5.setBounds(1, 1, 388, 31);
    panel_5.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null, null));

    JLabel lblGrficas = new JLabel("Gr\u00E1ficas");
    lblGrficas.setFont(new Font("Tahoma", Font.PLAIN, 14));
    panel_5.add(lblGrficas);
    panel_visualizar.setLayout(null);

    JPanel panel32 = new JPanel();
    panel32.setBounds(1, 38, 343, 529);
    panel32.setBackground(Color.WHITE);

    JPanel panel_4 = new JPanel();
    panel_4.setBounds(1, 1, 343, 31);
    panel_4.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null, null));

    JLabel lblSimulacion = new JLabel("Simulaci\u00F3n");
    lblSimulacion.setFont(new Font("Tahoma", Font.PLAIN, 14));
    panel_4.add(lblSimulacion);
    panel_visualizar.add(panel);
    panel.setLayout(null);
    panel.add(panel_4);
    panel.add(panel32);

    panelPot = new JPanelGrafica();
    panelPot.setBackground(Color.WHITE);
    GroupLayout gl_panel32 = new GroupLayout(panel32);
    gl_panel32.setHorizontalGroup(gl_panel32.createParallelGroup(Alignment.LEADING).addComponent(panelPot,
            GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE));
    gl_panel32.setVerticalGroup(gl_panel32.createParallelGroup(Alignment.LEADING).addComponent(panelPot,
            GroupLayout.DEFAULT_SIZE, 529, Short.MAX_VALUE));
    panel32.setLayout(gl_panel32);
    panel_visualizar.add(panel_1);
    panel_1.setLayout(null);
    panel_1.add(panel33);

    panelGraficas = new JPanelGrafica();
    panelGraficas.setBackground(Color.WHITE);
    GroupLayout gl_panel33 = new GroupLayout(panel33);
    gl_panel33.setHorizontalGroup(gl_panel33.createParallelGroup(Alignment.LEADING).addComponent(panelGraficas,
            GroupLayout.DEFAULT_SIZE, 388, Short.MAX_VALUE));
    gl_panel33.setVerticalGroup(gl_panel33.createParallelGroup(Alignment.LEADING).addComponent(panelGraficas,
            GroupLayout.DEFAULT_SIZE, 529, Short.MAX_VALUE));
    panel33.setLayout(gl_panel33);
    panel_1.add(panel_5);

    getContentPane().setLayout(groupLayout);
}

From source file:com.floreantpos.ui.model.MenuItemForm.java

/** This method is called from within the constructor to
 * initialize the form./*from   w w  w  .j  av  a 2  s  . c o m*/
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
    lblStockCount = new JLabel(Messages.getString("MenuItemForm.17")); //$NON-NLS-1$
    tfStockCount = new DoubleTextField(1);
    cbDisableStockCount = new JCheckBox(Messages.getString("MenuItemForm.18")); //$NON-NLS-1$
    lblButtonColor = new JLabel(Messages.getString("MenuItemForm.19")); //$NON-NLS-1$
    tabbedPane = new javax.swing.JTabbedPane();
    tabGeneral = new javax.swing.JPanel();
    lfname = new javax.swing.JLabel();
    lfname.setHorizontalAlignment(SwingConstants.TRAILING);
    tfName = new com.floreantpos.swing.FixedLengthTextField(20);
    lgroup = new javax.swing.JLabel();
    lgroup.setHorizontalAlignment(SwingConstants.TRAILING);
    cbGroup = new javax.swing.JComboBox();
    cbGroup.setPreferredSize(new Dimension(198, 0));
    btnNewGroup = new javax.swing.JButton();
    lblPrice = new javax.swing.JLabel();
    lblPrice.setHorizontalAlignment(SwingConstants.TRAILING);
    tfPrice = new DoubleTextField(20);
    tfPrice.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
    tfDescription = new JTextArea(new FixedLengthDocument(255));

    //tfDescription.setDocument(;
    tfUnitName = new FixedLengthTextField(20);
    lTax = new javax.swing.JLabel();
    lTax.setHorizontalAlignment(SwingConstants.TRAILING);
    cbTax = new javax.swing.JComboBox();
    btnNewTax = new javax.swing.JButton();
    lDiscountRate = new javax.swing.JLabel();
    lDiscountRate.setHorizontalAlignment(SwingConstants.TRAILING);
    lPercentage = new javax.swing.JLabel();
    tfDiscountRate = new DoubleTextField(18);
    tfDiscountRate.setHorizontalAlignment(SwingConstants.TRAILING);
    chkVisible = new javax.swing.JCheckBox();
    tabModifier = new javax.swing.JPanel();
    btnNewModifierGroup = new javax.swing.JButton();
    btnDeleteModifierGroup = new javax.swing.JButton();
    btnEditModifierGroup = new javax.swing.JButton();
    jScrollPane1 = new javax.swing.JScrollPane();
    tableTicketItemModifierGroups = new javax.swing.JTable();
    tabShift = new javax.swing.JPanel();
    tabPrice = new javax.swing.JPanel();
    tabButtonStyle = new javax.swing.JPanel();
    btnDeleteShift = new javax.swing.JButton();
    btnAddShift = new javax.swing.JButton();
    btnNewPrice = new javax.swing.JButton();
    btnUpdatePrice = new javax.swing.JButton();
    btnDeletePrice = new javax.swing.JButton();
    btnDeleteAll = new javax.swing.JButton();
    btnDefaultValue = new javax.swing.JButton();
    jScrollPane2 = new javax.swing.JScrollPane();
    jScrollPane3 = new javax.swing.JScrollPane();
    shiftTable = new javax.swing.JTable();
    priceTable = new javax.swing.JTable();
    cbPrinterGroup = new JComboBox<PrinterGroup>(new DefaultComboBoxModel<PrinterGroup>(
            PrinterGroupDAO.getInstance().findAll().toArray(new PrinterGroup[0])));
    cbPrinterGroup.setPreferredSize(new Dimension(226, 0));

    tfTranslatedName = new FixedLengthTextField(20);
    tfTranslatedName.setLength(120);

    lblUnitName = new JLabel(Messages.getString("MenuItemForm.23")); //$NON-NLS-1$
    lblKitchenPrinter = new JLabel(Messages.getString("MenuItemForm.27")); //$NON-NLS-1$
    lgroup.setText(Messages.getString("LABEL_GROUP")); //$NON-NLS-1$
    lfname.setText(Messages.getString("LABEL_NAME")); //$NON-NLS-1$
    tfName.setLength(120);
    lblTranslatedName = new JLabel(Messages.getString("MenuItemForm.lblTranslatedName.text")); //$NON-NLS-1$
    tfBarcode = new FixedLengthTextField(20);
    tfSortOrder = new IntegerTextField(20);
    lblSortOrder = new JLabel(Messages.getString("MenuItemForm.lblSortOrder.text")); //$NON-NLS-1$
    tfSortOrder.setText(""); //$NON-NLS-1$
    lblBarcode = new JLabel(Messages.getString("MenuItemForm.lblBarcode.text")); //$NON-NLS-1$
    cbTax.setPreferredSize(new Dimension(198, 0));
    ///lblButtonColor = new JLabel(Messages.getString("MenuItemForm.lblButtonColor.text")); //$NON-NLS-1$
    btnButtonColor = new JButton(); //$NON-NLS-1$
    btnButtonColor.setPreferredSize(new Dimension(228, 40));
    lblTextColor = new JLabel(Messages.getString("MenuItemForm.lblTextColor.text")); //$NON-NLS-1$
    btnTextColor = new JButton(Messages.getString("MenuItemForm.SAMPLE_TEXT")); //$NON-NLS-1$
    //   btnTextColor.setPreferredSize(new Dimension(228, 40));
    cbShowTextWithImage = new JCheckBox(Messages.getString("MenuItemForm.40")); //$NON-NLS-1$
    cbShowTextWithImage.setActionCommand(Messages.getString("MenuItemForm.41")); //$NON-NLS-1$
    lTax.setText(Messages.getString("LABEL_TAX")); //$NON-NLS-1$
    btnNewTax.setText("..."); //$NON-NLS-1$
    cbFractionalUnit = new JCheckBox(Messages.getString("MenuItemForm.24")); //$NON-NLS-1$

    btnNewGroup.setText("..."); //$NON-NLS-1$
    btnNewGroup.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            doCreateNewGroup(evt);
        }
    });

    if (Application.getInstance().isPriceIncludesTax()) {
        lblPrice.setText(Messages.getString("LABEL_SALES_PRICE_INCLUDING_TAX")); //$NON-NLS-1$
    } else {
        lblPrice.setText(Messages.getString("LABEL_SALES_PRICE_EXCLUDING_TAX")); //$NON-NLS-1$
    }

    tfPrice.setHorizontalAlignment(javax.swing.JTextField.RIGHT);

    lTax.setText(Messages.getString("LABEL_TAX")); //$NON-NLS-1$

    btnNewTax.setText("..."); //$NON-NLS-1$
    btnNewTax.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnNewTaxdoCreateNewTax(evt);
        }
    });

    lDiscountRate.setText(com.floreantpos.POSConstants.DISCOUNT_RATE + ":"); //$NON-NLS-1$

    lPercentage.setText("%"); //$NON-NLS-1$

    chkVisible.setText(com.floreantpos.POSConstants.VISIBLE);
    chkVisible.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    chkVisible.setMargin(new java.awt.Insets(0, 0, 0, 0));
    tabbedPane.addTab(com.floreantpos.POSConstants.GENERAL, tabGeneral);
    tabbedPane.setPreferredSize(new Dimension(750, 470));

    btnNewModifierGroup.setText(com.floreantpos.POSConstants.ADD);
    btnNewModifierGroup.setActionCommand("AddModifierGroup"); //$NON-NLS-1$
    btnNewModifierGroup.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnNewModifierGroupActionPerformed(evt);
        }
    });

    btnDeleteModifierGroup.setText(com.floreantpos.POSConstants.DELETE);
    btnDeleteModifierGroup.setActionCommand("DeleteModifierGroup"); //$NON-NLS-1$

    btnEditModifierGroup.setText(com.floreantpos.POSConstants.EDIT);
    btnEditModifierGroup.setActionCommand("EditModifierGroup"); //$NON-NLS-1$

    menuItemMGListModel = new MenuItemMGListModel();
    tableTicketItemModifierGroups.setModel(menuItemMGListModel);

    btnNewModifierGroup.addActionListener(this);
    btnEditModifierGroup.addActionListener(this);
    btnDeleteModifierGroup.addActionListener(this);
    btnAddShift.addActionListener(this);
    btnDeleteShift.addActionListener(this);

    tfDiscountRate.setDocument(new DoubleDocument());

    tabGeneral.setLayout(new MigLayout("insets 20", "[][]20px[][]", "[][][][][][][][][][][][][]")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    /*JLabel lblImage = new JLabel(Messages.getString("MenuItemForm.28")); //$NON-NLS-1$
    lblImage.setHorizontalAlignment(SwingConstants.TRAILING);
    tabGeneral.add(lblImage, "cell 0 0,right"); //$NON-NLS-1$
            
    lblImagePreview = new JLabel(""); //$NON-NLS-1$
    lblImagePreview.setHorizontalAlignment(JLabel.CENTER);
    lblImagePreview.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    lblImagePreview.setPreferredSize(new Dimension(100, 100));
    tabGeneral.add(lblImagePreview, "cell 1 0"); //$NON-NLS-1$
            
    JButton btnSelectImage = new JButton("..."); //$NON-NLS-1$
    btnSelectImage.addActionListener(new ActionListener() {
       public void actionPerformed(ActionEvent e) {
    doSelectImageFile();
       }
    });
    tabGeneral.add(btnSelectImage, "cell 1 0"); //$NON-NLS-1$
            
    btnClearImage = new JButton(Messages.getString("MenuItemForm.34")); //$NON-NLS-1$
    btnClearImage.addActionListener(new ActionListener() {
       public void actionPerformed(ActionEvent e) {
    doClearImage();
       }
    });
    tabGeneral.add(btnClearImage, "cell 1 0"); //$NON-NLS-1$
    */

    tabGeneral.add(lfname, "cell 0 1 ,right"); //$NON-NLS-1$
    tabGeneral.add(tfName, "cell 1 1,grow"); //$NON-NLS-1$

    tabGeneral.add(lblTranslatedName, "cell 0 2,right"); //$NON-NLS-1$
    tabGeneral.add(tfTranslatedName, "cell 1 2,grow"); //$NON-NLS-1$

    /*tabGeneral.add(new JLabel("Description"), "cell 0 3,right");
    JScrollPane scrlDescription = new JScrollPane(tfDescription, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    tabGeneral.add(scrlDescription, "cell 1 3");*/

    tabGeneral.add(lblUnitName, "cell 0 3,right"); //$NON-NLS-1$
    tabGeneral.add(tfUnitName, "cell 1 3,grow"); //$NON-NLS-1$
    JLabel lblBuyPrice = new JLabel(Messages.getString("LABEL_BUY_PRICE")); //$NON-NLS-1$

    tabGeneral.add(lblBuyPrice, "cell 0 4,alignx right"); //$NON-NLS-1$
    tfBuyPrice = new DoubleTextField(20);
    tfBuyPrice.setHorizontalAlignment(SwingConstants.TRAILING);
    tabGeneral.add(tfBuyPrice, "cell 1 4,grow"); //$NON-NLS-1$

    tabGeneral.add(lblPrice, "cell 0 5,alignx right"); //$NON-NLS-1$
    tabGeneral.add(tfPrice, "cell 1 5,grow"); //$NON-NLS-1$

    tabGeneral.add(lgroup, "cell 0 6,alignx right"); //$NON-NLS-1$
    tabGeneral.add(cbGroup, "cell 1 6"); //$NON-NLS-1$
    tabGeneral.add(btnNewGroup, "cell 1 6"); //$NON-NLS-1$

    tabGeneral.add(lblBarcode, "cell 0 7,alignx right"); //$NON-NLS-1$
    tabGeneral.add(tfBarcode, "cell 1 7,grow"); //$NON-NLS-1$

    tabGeneral.add(lblSortOrder, "cell 0 8,alignx right"); //$NON-NLS-1$
    tabGeneral.add(tfSortOrder, "cell 1 8,grow"); //$NON-NLS-1$

    tabGeneral.add(lblStockCount, "cell 0 9,alignx right"); //$NON-NLS-1$
    tabGeneral.add(tfStockCount, "cell 1 9,grow"); //$NON-NLS-1$

    //tabGeneral.add(cbShowTextWithImage, "cell 1 8"); //$NON-NLS-1$
    tabGeneral.add(chkVisible, "cell 1 10"); //$NON-NLS-1$
    tabGeneral.add(cbFractionalUnit, "cell 1 11"); //$NON-NLS-1$
    tabGeneral.add(cbDisableStockCount, "cell 1 12"); //$NON-NLS-1$

    // right side

    tabGeneral.add(lblKitchenPrinter, "cell 2 1,right"); //$NON-NLS-1$
    tabGeneral.add(cbPrinterGroup, "cell 3 1,grow"); //$NON-NLS-1$

    tabGeneral.add(lTax, "cell 2 2,right"); //$NON-NLS-1$
    tabGeneral.add(cbTax, "cell 3 2"); //$NON-NLS-1$
    tabGeneral.add(btnNewTax, "cell 3 2,grow"); //$NON-NLS-1$

    /*tabGeneral.add(lblButtonColor, "cell 2 3,right"); //$NON-NLS-1$
    tabGeneral.add(btnButtonColor, "cell 3 3,grow"); //$NON-NLS-1$
            
    tabGeneral.add(lblTextColor, "cell 2 4,right"); //$NON-NLS-1$
    tabGeneral.add(btnTextColor, "cell 3 4 3 5"); //$NON-NLS-1$
    btnTextColor.setPreferredSize(new Dimension(228, 50));*/

    tabGeneral.add(new JLabel(Messages.getString("MenuItemForm.25")), "cell 2 3,,aligny top,alignx right"); //$NON-NLS-1$ //$NON-NLS-2$
    orderList = new CheckBoxList();

    List<OrderType> orderTypes = Application.getInstance().getOrderTypes();
    orderList.setModel(orderTypes);
    //      List<String> orderListM = new ArrayList();
    //      orderListM.add(OrderType.DINE_IN.toString());
    //      orderListM.add(OrderType.BAR_TAB.toString());
    //      orderListM.add(OrderType.DRIVE_THRU.toString());
    //      orderListM.add(OrderType.HOME_DELIVERY.toString());
    //      orderListM.add(OrderType.PICKUP.toString());
    //      orderListM.add(OrderType.RETAIL.toString());
    //      orderListM.add(OrderType.TAKE_OUT.toString());

    //      orderList.setModel(orderListM);

    JScrollPane orderCheckBoxList = new JScrollPane(orderList);
    orderCheckBoxList.setPreferredSize(new Dimension(228, 100));
    tabGeneral.add(orderCheckBoxList, "cell 3 3 3 4"); //$NON-NLS-1$
    tfDescription.setWrapStyleWord(true);
    tfDescription.setLineWrap(true);

    tabGeneral.add(new JLabel(Messages.getString("MenuItemForm.29")), "cell 2 7,aligny top,alignx right"); //$NON-NLS-1$ //$NON-NLS-2$
    JScrollPane scrlDescription = new JScrollPane(tfDescription, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
            JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    scrlDescription.setPreferredSize(new Dimension(228, 90));
    tabGeneral.add(scrlDescription, "cell 3 7 3 4"); //$NON-NLS-1$

    add(tabbedPane);
    //TODO: 
    addRecepieExtension();

    /*btnButtonColor.addActionListener(new ActionListener() {
       @Override
       public void actionPerformed(ActionEvent e) {
    Color color = JColorChooser.showDialog(MenuItemForm.this, Messages.getString("MenuItemForm.42"), btnButtonColor.getBackground()); //$NON-NLS-1$
    btnButtonColor.setBackground(color);
    btnTextColor.setBackground(color);
       }
    });
            
    btnTextColor.addActionListener(new ActionListener() {
       @Override
       public void actionPerformed(ActionEvent e) {
    Color color = JColorChooser.showDialog(MenuItemForm.this, Messages.getString("MenuItemForm.43"), btnTextColor.getForeground()); //$NON-NLS-1$
    btnTextColor.setForeground(color);
       }
    });*/

    jScrollPane1.setViewportView(tableTicketItemModifierGroups);

    GroupLayout jPanel2Layout = new GroupLayout(tabModifier);
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(Alignment.TRAILING)
            .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap()
                    .addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 412, Short.MAX_VALUE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(jPanel2Layout.createParallelGroup(Alignment.BASELINE)
                            .addComponent(btnDeleteModifierGroup).addComponent(btnEditModifierGroup)
                            .addComponent(btnNewModifierGroup))
                    .addContainerGap()));
    jPanel2Layout.setHorizontalGroup(jPanel2Layout.createParallelGroup(Alignment.TRAILING)
            .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap().addGroup(jPanel2Layout
                    .createParallelGroup(Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup().addComponent(btnNewModifierGroup)
                            .addPreferredGap(ComponentPlacement.RELATED).addComponent(btnEditModifierGroup)
                            .addPreferredGap(ComponentPlacement.RELATED).addComponent(btnDeleteModifierGroup))
                    .addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 421, Short.MAX_VALUE))
                    .addContainerGap()));
    tabModifier.setLayout(jPanel2Layout);

    tabbedPane.addTab(com.floreantpos.POSConstants.MODIFIER_GROUPS, tabModifier);

    btnDeleteShift.setText(com.floreantpos.POSConstants.DELETE_SHIFT);

    btnAddShift.setText(com.floreantpos.POSConstants.ADD_SHIFT);

    shiftTable
            .setModel(new javax.swing.table.DefaultTableModel(
                    new Object[][] { { null, null, null, null }, { null, null, null, null },
                            { null, null, null, null }, { null, null, null, null } },
                    new String[] { "Title 1", "Title 2", "Title 3", "Title 4" })); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
    jScrollPane2.setViewportView(shiftTable);

    org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(tabShift);
    tabShift.setLayout(jPanel3Layout);
    jPanel3Layout
            .setHorizontalGroup(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel3Layout.createSequentialGroup().addContainerGap(76, Short.MAX_VALUE)
                            .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jScrollPane2,
                                            org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 670,
                                            org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(org.jdesktop.layout.GroupLayout.TRAILING,
                                            jPanel3Layout.createSequentialGroup().add(btnAddShift).add(5, 5, 5)
                                                    .add(btnDeleteShift)))
                            .addContainerGap()));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel3Layout.createSequentialGroup()
                    .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 345,
                            org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(btnAddShift).add(btnDeleteShift))
                    .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    tabbedPane.addTab(com.floreantpos.POSConstants.SHIFTS, tabShift);

    //

    btnNewPrice.setText(Messages.getString("MenuItemForm.9")); //$NON-NLS-1$
    btnNewPrice.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            addNewPrice();
        }
    });
    btnUpdatePrice.setText(Messages.getString("MenuItemForm.13")); //$NON-NLS-1$
    btnUpdatePrice.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            updatePrice();
        }
    });
    btnDeletePrice.setText(Messages.getString("MenuItemForm.14")); //$NON-NLS-1$
    btnDeletePrice.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            deletePrice();
        }
    });
    btnDeleteAll.setText(Messages.getString("MenuItemForm.15")); //$NON-NLS-1$
    btnDeleteAll.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            deleteAll();
        }
    });

    btnDefaultValue.setText(Messages.getString("MenuItemForm.7")); //$NON-NLS-1$
    /*btnDefaultValue.addActionListener(new ActionListener() {
            
       @Override
       public void actionPerformed(ActionEvent e) {
    setDefaultValue();
       }
    });*/
    priceTable
            .setModel(new javax.swing.table.DefaultTableModel(
                    new Object[][] { { null, null, null, null }, { null, null, null, null },
                            { null, null, null, null }, { null, null, null, null } },
                    new String[] { "Title 1", "Title 2", "Title 3", "Title 4" })); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$

    jScrollPane3.setViewportView(priceTable);

    tabPrice.setLayout(new BorderLayout());
    tabPrice.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    tabPrice.add(jScrollPane3, BorderLayout.CENTER);

    JPanel buttonPanel = new JPanel();

    buttonPanel.add(btnNewPrice);
    buttonPanel.add(btnUpdatePrice);
    //buttonPanel.add(btnDefaultValue);
    buttonPanel.add(btnDeletePrice);

    //   buttonPanel.add(btnDeleteAll);

    tabPrice.add(buttonPanel, BorderLayout.SOUTH);
    tabbedPane.addTab(Messages.getString("MenuItemForm.16"), tabPrice); //$NON-NLS-1$

    //

    tabbedPane.addChangeListener(this);
    //

    tabButtonStyle.setLayout(new MigLayout("insets 10", "[][]100[][][][]", "[][][center][][][]")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

    JLabel lblImage = new JLabel(Messages.getString("MenuItemForm.28")); //$NON-NLS-1$
    lblImage.setHorizontalAlignment(SwingConstants.TRAILING);
    tabButtonStyle.add(lblImage, "cell 0 0,right"); //$NON-NLS-1$

    lblImagePreview = new JLabel(""); //$NON-NLS-1$
    lblImagePreview.setHorizontalAlignment(JLabel.CENTER);
    lblImagePreview.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    lblImagePreview.setPreferredSize(new Dimension(100, 100));
    tabButtonStyle.add(lblImagePreview, "cell 1 0"); //$NON-NLS-1$

    JButton btnSelectImage = new JButton("..."); //$NON-NLS-1$
    btnClearImage = new JButton(Messages.getString("MenuItemForm.34")); //$NON-NLS-1$
    tabButtonStyle.add(btnClearImage, "cell  1 0"); //$NON-NLS-1$
    tabButtonStyle.add(btnSelectImage, "cell 1 0"); //$NON-NLS-1$

    tabButtonStyle.add(lblButtonColor, "cell 0 2,right"); //$NON-NLS-1$
    tabButtonStyle.add(btnButtonColor, "cell 1 2,grow"); //$NON-NLS-1$
    tabButtonStyle.add(lblTextColor, "cell 0 3,right"); //$NON-NLS-1$
    tabButtonStyle.add(btnTextColor, "cell 1 3"); //$NON-NLS-1$
    tabButtonStyle.add(cbShowTextWithImage, "cell 1 4"); //$NON-NLS-1$

    /*   tabButtonStyle.add(lblImagePreview, "cell 3 0 3 4"); //$NON-NLS-1$
       tabButtonStyle.add(btnClearImage, "cell 3 0,gaptop 40"); //$NON-NLS-1$
       tabButtonStyle.add(btnSelectImage, "cell 3 0,gaptop 40"); //$NON-NLS-1$
       tabButtonStyle.add(lblImage, "cell 2 0,gaptop 40"); //$NON-NLS-1$
       tabButtonStyle.add(lblButtonColor, "cell 0 0,right"); //$NON-NLS-1$
       tabButtonStyle.add(btnButtonColor, "cell 1 0,grow"); //$NON-NLS-1$
       tabButtonStyle.add(lblTextColor, "cell 0 1,right"); //$NON-NLS-1$
       tabButtonStyle.add(btnTextColor, "cell 1 1"); //$NON-NLS-1$
    */
    btnTextColor.setPreferredSize(new Dimension(228, 50));

    btnSelectImage.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            doSelectImageFile();
        }
    });

    btnClearImage.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            doClearImage();
        }
    });

    btnButtonColor.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            Color color = JColorChooser.showDialog(MenuItemForm.this, Messages.getString("MenuItemForm.42"), //$NON-NLS-1$
                    btnButtonColor.getBackground());
            btnButtonColor.setBackground(color);
            btnTextColor.setBackground(color);
        }
    });

    btnTextColor.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            Color color = JColorChooser.showDialog(MenuItemForm.this, Messages.getString("MenuItemForm.43"), //$NON-NLS-1$
                    btnTextColor.getForeground());
            btnTextColor.setForeground(color);
        }
    });

    tabbedPane.addTab(Messages.getString("MenuItemForm.26"), tabButtonStyle); //$NON-NLS-1$

}

From source file:de.tor.tribes.ui.views.DSWorkbenchAttackFrame.java

/**
 * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this
 * method is always regenerated by the Form Editor.
 *///from   w  ww.j  a  va2 s.  co  m
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    jxSearchPane = new org.jdesktop.swingx.JXPanel();
    jXPanel2 = new org.jdesktop.swingx.JXPanel();
    jButton12 = new javax.swing.JButton();
    jTextField1 = new javax.swing.JTextField();
    jLabel21 = new javax.swing.JLabel();
    jFilterRows = new javax.swing.JCheckBox();
    jFilterCaseSensitive = new javax.swing.JCheckBox();
    jScrollPane1 = new javax.swing.JScrollPane();
    jXColumnList = new org.jdesktop.swingx.JXList();
    jLabel22 = new javax.swing.JLabel();
    jXAttackPanel = new org.jdesktop.swingx.JXPanel();
    jAttackTabPane = new javax.swing.JTabbedPane();
    jNewPlanPanel = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jAttackPanel = new javax.swing.JPanel();
    jAttackFrameAlwaysOnTop = new javax.swing.JCheckBox();
    capabilityInfoPanel1 = new de.tor.tribes.ui.components.CapabilityInfoPanel();

    jxSearchPane.setOpaque(false);
    jxSearchPane.setLayout(new java.awt.GridBagLayout());

    jXPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jXPanel2.setInheritAlpha(false);

    jButton12.setText("Anwenden");
    jButton12.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseReleased(java.awt.event.MouseEvent evt) {
            fireHideGlassPaneEvent(evt);
        }
    });

    jTextField1.addCaretListener(new javax.swing.event.CaretListener() {
        public void caretUpdate(javax.swing.event.CaretEvent evt) {
            fireHighlightEvent(evt);
        }
    });

    jLabel21.setText("Suchbegriff");

    jFilterRows.setText("Nur gefilterte Zeilen anzeigen");
    jFilterRows.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            fireUpdateFilterEvent(evt);
        }
    });

    jFilterCaseSensitive.setText("Gro-/Kleinschreibung beachten");
    jFilterCaseSensitive.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            fireUpdateFilterEvent(evt);
        }
    });

    jXColumnList.setModel(new javax.swing.AbstractListModel() {
        String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };

        public int getSize() {
            return strings.length;
        }

        public Object getElementAt(int i) {
            return strings[i];
        }
    });
    jXColumnList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    jScrollPane1.setViewportView(jXColumnList);

    jLabel22.setText("Spalten");

    javax.swing.GroupLayout jXPanel2Layout = new javax.swing.GroupLayout(jXPanel2);
    jXPanel2.setLayout(jXPanel2Layout);
    jXPanel2Layout
            .setHorizontalGroup(jXPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            jXPanel2Layout.createSequentialGroup().addContainerGap().addGroup(jXPanel2Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jLabel22, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(
                                            jLabel21, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                    .addGap(18, 18, 18)
                                    .addGroup(jXPanel2Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jXPanel2Layout.createSequentialGroup()
                                                    .addComponent(jScrollPane1,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 158,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGap(18, 18, 18)
                                                    .addGroup(jXPanel2Layout
                                                            .createParallelGroup(
                                                                    javax.swing.GroupLayout.Alignment.TRAILING)
                                                            .addGroup(jXPanel2Layout.createParallelGroup(
                                                                    javax.swing.GroupLayout.Alignment.TRAILING,
                                                                    false)
                                                                    .addComponent(jFilterRows,
                                                                            javax.swing.GroupLayout.Alignment.LEADING,
                                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                            Short.MAX_VALUE)
                                                                    .addComponent(jFilterCaseSensitive,
                                                                            javax.swing.GroupLayout.Alignment.LEADING,
                                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                            Short.MAX_VALUE))
                                                            .addComponent(jButton12)))
                                            .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    355, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jXPanel2Layout.setVerticalGroup(jXPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jXPanel2Layout.createSequentialGroup().addContainerGap().addGroup(jXPanel2Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel21)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jXPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jXPanel2Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jXPanel2Layout
                                            .createSequentialGroup().addComponent(jFilterCaseSensitive)
                                            .addPreferredGap(
                                                    javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jFilterRows)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jButton12))
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 164,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jLabel22))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jxSearchPane.add(jXPanel2, new java.awt.GridBagConstraints());

    jXAttackPanel.setLayout(new java.awt.BorderLayout());
    jXAttackPanel.add(jAttackTabPane, java.awt.BorderLayout.CENTER);

    jNewPlanPanel.setOpaque(false);
    jNewPlanPanel.setLayout(new java.awt.BorderLayout());

    jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/document_new_24x24.png"))); // NOI18N
    jLabel1.setToolTipText("Leeren Plan erstellen");
    jLabel1.setEnabled(false);
    jLabel1.setMaximumSize(new java.awt.Dimension(40, 40));
    jLabel1.setMinimumSize(new java.awt.Dimension(40, 40));
    jLabel1.setPreferredSize(new java.awt.Dimension(40, 40));
    jLabel1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseEntered(java.awt.event.MouseEvent evt) {
            fireEnterEvent(evt);
        }

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

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            fireCreateAttackPlanEvent(evt);
        }
    });
    jNewPlanPanel.add(jLabel1, java.awt.BorderLayout.CENTER);

    setTitle("Befehle");
    setMinimumSize(new java.awt.Dimension(700, 500));
    getContentPane().setLayout(new java.awt.GridBagLayout());

    jAttackPanel.setBackground(new java.awt.Color(239, 235, 223));
    jAttackPanel.setPreferredSize(new java.awt.Dimension(700, 500));
    jAttackPanel.setLayout(new java.awt.BorderLayout());
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    getContentPane().add(jAttackPanel, gridBagConstraints);

    jAttackFrameAlwaysOnTop.setText("Immer im Vordergrund");
    jAttackFrameAlwaysOnTop.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            fireAttackFrameAlwaysOnTopEvent(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    getContentPane().add(jAttackFrameAlwaysOnTop, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
    getContentPane().add(capabilityInfoPanel1, gridBagConstraints);

    pack();
}

From source file:SuitaDetails.java

public void initTCOptions() {
    tcoptions = new JPanel();
    tcoptions.setBackground(Color.WHITE);
    JLabel tcname = new JLabel("TC name:");
    ttcname = new JTextField();
    JLabel view = new JLabel("TC view: ");
    tview = new JTextField();
    runnable = new JCheckBox("Runnable");
    runnable.setBackground(Color.WHITE);
    optional = new JCheckBox("Optional");
    optional.setBackground(Color.WHITE);
    prerequisites = new JCheckBox("setup file");
    teardown = new JCheckBox("teardown file");
    prerequisites.setBackground(Color.WHITE);
    teardown.setBackground(Color.WHITE);
    prop = new PropPanel();
    param = new ParamPanel();

    GroupLayout layout = new GroupLayout(tcoptions);
    tcoptions.setLayout(layout);/*w w  w .  j a  v  a  2  s  .c o  m*/
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout
            .createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout
                    .createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup().addComponent(prop, 0, 0, Short.MAX_VALUE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(param, 0, 0, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup().addGroup(layout
                            .createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup().addComponent(runnable).addGap(18, 18, 18)
                                    .addComponent(optional).addGap(18, 18, 18).addComponent(prerequisites)
                                    .addGap(18, 18, 18).addComponent(teardown))
                            .addGroup(layout.createSequentialGroup().addComponent(tcname)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(ttcname, GroupLayout.PREFERRED_SIZE, 300,
                                            GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup().addComponent(view)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(tview,
                                            GroupLayout.PREFERRED_SIZE, 300, GroupLayout.PREFERRED_SIZE)))
                            .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap())));

    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(tcname)
                            .addComponent(ttcname, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(view)
                            .addComponent(tview, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)

                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(runnable)
                            .addComponent(optional).addComponent(prerequisites).addComponent(teardown))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(prop, 0, 0, Short.MAX_VALUE)
                            .addComponent(param, 0, 0, Short.MAX_VALUE))
                    .addContainerGap()));
}

From source file:com.nbt.TreeFrame.java

private void initComponents() {
    setTitle(TITLE);/* ww  w. j a  v a 2  s.  c o  m*/
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    JMenuBar menuBar = createMenuBar();
    setJMenuBar(menuBar);
    JToolBar toolBar = createToolBar();

    contentPane = new JPanel();
    setContentPane(contentPane);

    JPanel browsePanel = new JPanel();
    Border border = new TitledBorder(null, "Location");
    browsePanel.setBorder(border);

    textFile = new JTextField();
    textFile.setEditable(false);
    btnBrowse = new JButton("Browse");
    btnBrowse.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            browseAction.actionPerformed(e);
        }

    });
    scrollPane = new JScrollPane();
    JScrollBar verticalScrollBar = scrollPane.getVerticalScrollBar();
    int unitIncrement = 200;
    verticalScrollBar.setUnitIncrement(unitIncrement);

    GroupLayout gl_contentPane = new GroupLayout(contentPane);
    gl_contentPane
            .setHorizontalGroup(gl_contentPane.createParallelGroup(Alignment.TRAILING)
                    .addGroup(Alignment.LEADING, gl_contentPane.createSequentialGroup().addContainerGap()
                            .addGroup(gl_contentPane.createParallelGroup(Alignment.TRAILING)
                                    .addComponent(browsePanel, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)
                                    .addComponent(scrollPane, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE))
                            .addContainerGap())
                    .addComponent(toolBar, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE,
                            Short.MAX_VALUE));
    gl_contentPane.setVerticalGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_contentPane.createSequentialGroup()
                    .addComponent(toolBar, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED).addComponent(browsePanel)
                    .addPreferredGap(ComponentPlacement.RELATED).addComponent(scrollPane,
                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));

    GroupLayout gl_browsePanel = new GroupLayout(browsePanel);
    gl_browsePanel
            .setHorizontalGroup(gl_browsePanel.createParallelGroup(Alignment.LEADING)
                    .addGroup(Alignment.TRAILING, gl_browsePanel.createSequentialGroup().addContainerGap()
                            .addComponent(textFile, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE,
                                    Short.MAX_VALUE)
                            .addPreferredGap(ComponentPlacement.RELATED).addComponent(btnBrowse)
                            .addContainerGap()));
    gl_browsePanel.setVerticalGroup(gl_browsePanel.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_browsePanel.createSequentialGroup()
                    // .addContainerGap()
                    .addGroup(gl_browsePanel
                            .createParallelGroup(Alignment.BASELINE).addComponent(textFile,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)
                            .addComponent(btnBrowse))
                    .addContainerGap()));
    browsePanel.setLayout(gl_browsePanel);
    contentPane.setLayout(gl_contentPane);

    int width = 440, height = 400;
    setMinimumSize(new Dimension(width, height));

    pack();
}

From source file:at.becast.youploader.gui.FrmMain.java

public void initPlaylistSettingsTab() {
    JPanel TabPlaylistSettings = new JPanel();
    TabbedPane.addTab(LANG.getString("frmMain.Tabs.PlaylistSettings"), null, TabPlaylistSettings, null);

    JPanel panel_1 = new JPanel();

    JScrollPane scrollPane = new JScrollPane();
    GroupLayout gl_TabPlaylistSettings = new GroupLayout(TabPlaylistSettings);
    gl_TabPlaylistSettings.setHorizontalGroup(gl_TabPlaylistSettings.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_TabPlaylistSettings.createSequentialGroup()
                    .addComponent(panel_1, GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE).addGap(8)
                    .addComponent(scrollPane, GroupLayout.DEFAULT_SIZE, 675, Short.MAX_VALUE)
                    .addContainerGap()));
    gl_TabPlaylistSettings.setVerticalGroup(gl_TabPlaylistSettings.createParallelGroup(Alignment.TRAILING)
            .addGroup(gl_TabPlaylistSettings.createSequentialGroup()
                    .addGroup(gl_TabPlaylistSettings.createParallelGroup(Alignment.LEADING)
                            .addComponent(panel_1, GroupLayout.DEFAULT_SIZE, 459, Short.MAX_VALUE)
                            .addGroup(gl_TabPlaylistSettings.createSequentialGroup().addGap(11)
                                    .addComponent(scrollPane, GroupLayout.DEFAULT_SIZE, 448, Short.MAX_VALUE)))
                    .addContainerGap()));

    PlayPanel = new JPanel();
    scrollPane.setViewportView(PlayPanel);
    PlayPanel.setLayout(new GridLayout(0, 2, 0, 0));

    AccList = new JList<AccountType>(AccListModel);
    AccList.setOpaque(false);/*from   w  w  w  . ja  v  a 2  s .c  o m*/
    AccList.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
    AccList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    GroupLayout gl_panel_1 = new GroupLayout(panel_1);
    gl_panel_1.setHorizontalGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panel_1.createSequentialGroup().addContainerGap()
                    .addComponent(AccList, GroupLayout.DEFAULT_SIZE, 177, Short.MAX_VALUE).addContainerGap()));
    gl_panel_1.setVerticalGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)
            .addGroup(gl_panel_1.createSequentialGroup().addContainerGap()
                    .addComponent(AccList, GroupLayout.DEFAULT_SIZE, 437, Short.MAX_VALUE).addContainerGap()));
    panel_1.setLayout(gl_panel_1);
    TabPlaylistSettings.setLayout(gl_TabPlaylistSettings);
    AccList.addListSelectionListener(new ListSelectionListener() {
        @Override
        public void valueChanged(ListSelectionEvent e) {
            selectPlaylistAccount();
        }
    });
}