Example usage for java.awt BorderLayout LINE_END

List of usage examples for java.awt BorderLayout LINE_END

Introduction

In this page you can find the example usage for java.awt BorderLayout LINE_END.

Prototype

String LINE_END

To view the source code for java.awt BorderLayout LINE_END.

Click Source Link

Document

The component goes at the end of the line direction for the layout.

Usage

From source file:com.openbravo.pos.customers.JCustomerFinder.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   ww w  . j av a 2s.co m
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jPanel2 = new javax.swing.JPanel();
    m_jKeys = new com.openbravo.editor.JEditorKeys();
    jPanel3 = new javax.swing.JPanel();
    jPanel5 = new javax.swing.JPanel();
    jPanel7 = new javax.swing.JPanel();
    jLblTaxID = new javax.swing.JLabel();
    m_jtxtTaxID = new com.openbravo.editor.JEditorString();
    jLblSearchKey = new javax.swing.JLabel();
    m_jtxtSearchKey = new com.openbravo.editor.JEditorString();
    jLblPostal = new javax.swing.JLabel();
    m_jtxtPostal = new com.openbravo.editor.JEditorString();
    jLblName = new javax.swing.JLabel();
    m_jtxtName = new com.openbravo.editor.JEditorString();
    jLblPhone = new javax.swing.JLabel();
    jLblEmail = new javax.swing.JLabel();
    m_jtxtEmail = new com.openbravo.editor.JEditorString();
    m_jtxtPhone = new com.openbravo.editor.JEditorString();
    jPanel6 = new javax.swing.JPanel();
    jcmdReset = new javax.swing.JButton();
    jcmdExecute = new javax.swing.JButton();
    jPanel4 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jListCustomers = new javax.swing.JList();
    jPanel8 = new javax.swing.JPanel();
    jPanel1 = new javax.swing.JPanel();
    jcmdCancel = new javax.swing.JButton();
    jcmdOK = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle(AppLocal.getIntString("form.customertitle")); // NOI18N
    setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

    jPanel2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    jPanel2.setLayout(new java.awt.BorderLayout());
    jPanel2.add(m_jKeys, java.awt.BorderLayout.NORTH);

    getContentPane().add(jPanel2, java.awt.BorderLayout.LINE_END);

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

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

    jLblTaxID.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jLblTaxID.setText(AppLocal.getIntString("label.taxid")); // NOI18N
    jLblTaxID.setMaximumSize(new java.awt.Dimension(120, 25));
    jLblTaxID.setMinimumSize(new java.awt.Dimension(120, 25));
    jLblTaxID.setPreferredSize(new java.awt.Dimension(120, 25));

    m_jtxtTaxID.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    m_jtxtTaxID.setPreferredSize(new java.awt.Dimension(220, 25));

    jLblSearchKey.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jLblSearchKey.setText(AppLocal.getIntString("label.searchkey")); // NOI18N
    jLblSearchKey.setMaximumSize(new java.awt.Dimension(120, 25));
    jLblSearchKey.setMinimumSize(new java.awt.Dimension(120, 25));
    jLblSearchKey.setPreferredSize(new java.awt.Dimension(120, 25));

    m_jtxtSearchKey.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    m_jtxtSearchKey.setPreferredSize(new java.awt.Dimension(220, 25));

    jLblPostal.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jLblPostal.setText("Postal");
    jLblPostal.setMaximumSize(new java.awt.Dimension(120, 25));
    jLblPostal.setMinimumSize(new java.awt.Dimension(120, 25));
    jLblPostal.setPreferredSize(new java.awt.Dimension(120, 25));

    m_jtxtPostal.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    m_jtxtPostal.setPreferredSize(new java.awt.Dimension(220, 25));

    jLblName.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jLblName.setText(AppLocal.getIntString("label.prodname")); // NOI18N
    jLblName.setMaximumSize(new java.awt.Dimension(120, 25));
    jLblName.setMinimumSize(new java.awt.Dimension(120, 25));
    jLblName.setPreferredSize(new java.awt.Dimension(120, 25));

    m_jtxtName.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    m_jtxtName.setPreferredSize(new java.awt.Dimension(220, 25));

    jLblPhone.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("pos_messages"); // NOI18N
    jLblPhone.setText(bundle.getString("label.phone")); // NOI18N
    jLblPhone.setMaximumSize(new java.awt.Dimension(120, 25));
    jLblPhone.setPreferredSize(new java.awt.Dimension(120, 25));

    jLblEmail.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jLblEmail.setText(bundle.getString("label.companyemail")); // NOI18N
    jLblEmail.setMaximumSize(new java.awt.Dimension(120, 25));
    jLblEmail.setMinimumSize(new java.awt.Dimension(120, 25));
    jLblEmail.setPreferredSize(new java.awt.Dimension(120, 25));

    m_jtxtEmail.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    m_jtxtEmail.setPreferredSize(new java.awt.Dimension(220, 25));

    m_jtxtPhone.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    m_jtxtPhone.setPreferredSize(new java.awt.Dimension(220, 25));

    jcmdReset.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jcmdReset.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/reload.png"))); // NOI18N
    jcmdReset.setText(bundle.getString("button.reset")); // NOI18N
    jcmdReset.setToolTipText("Clear Filter");
    jcmdReset.setActionCommand("Reset ");
    jcmdReset.setFocusable(false);
    jcmdReset.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jcmdResetActionPerformed(evt);
        }
    });
    jPanel6.add(jcmdReset);
    jcmdReset.getAccessibleContext().setAccessibleDescription("");

    jcmdExecute.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jcmdExecute.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/ok.png"))); // NOI18N
    jcmdExecute.setText(AppLocal.getIntString("button.executefilter")); // NOI18N
    jcmdExecute.setToolTipText("Execute Filter");
    jcmdExecute.setFocusPainted(false);
    jcmdExecute.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jcmdExecuteActionPerformed(evt);
        }
    });
    jPanel6.add(jcmdExecute);
    jcmdExecute.getAccessibleContext().setAccessibleDescription("");

    javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
    jPanel7.setLayout(jPanel7Layout);
    jPanel7Layout.setHorizontalGroup(jPanel7Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup().addGroup(jPanel7Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel6, javax.swing.GroupLayout.Alignment.TRAILING,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE)
                    .addGroup(jPanel7Layout.createSequentialGroup().addContainerGap()
                            .addGroup(jPanel7Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel7Layout.createSequentialGroup().addGroup(jPanel7Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLblPostal, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLblTaxID, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLblSearchKey, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLblPhone, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                    jLblName, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addGroup(jPanel7Layout
                                                    .createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(m_jtxtSearchKey,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(
                                                            m_jtxtTaxID, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(m_jtxtPostal,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(
                                                            m_jtxtName, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(m_jtxtPhone,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(jPanel7Layout.createSequentialGroup()
                                            .addComponent(jLblEmail, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(m_jtxtEmail, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGap(0, 35, Short.MAX_VALUE)))
                    .addContainerGap()));
    jPanel7Layout
            .setVerticalGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup().addGap(11, 11, 11)
                            .addGroup(jPanel7Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(m_jtxtTaxID, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jLblTaxID, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGap(6, 6, 6)
                            .addGroup(jPanel7Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLblSearchKey, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(m_jtxtSearchKey, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(6, 6, 6)
                            .addGroup(
                                    jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLblPostal, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(m_jtxtPostal, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(
                                    jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(m_jtxtName, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLblName, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(
                                    jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLblPhone, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(m_jtxtPhone, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(
                                    jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLblEmail, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(m_jtxtEmail, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    m_jtxtName.getAccessibleContext().setAccessibleName("");

    jPanel5.add(jPanel7, java.awt.BorderLayout.CENTER);

    jPanel3.add(jPanel5, java.awt.BorderLayout.PAGE_START);

    jPanel4.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
    jPanel4.setLayout(new java.awt.BorderLayout());

    jListCustomers.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jListCustomers.setFocusable(false);
    jListCustomers.setRequestFocusEnabled(false);
    jListCustomers.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jListCustomersMouseClicked(evt);
        }
    });
    jListCustomers.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
        public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
            jListCustomersValueChanged(evt);
        }
    });
    jScrollPane1.setViewportView(jListCustomers);

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

    jPanel3.add(jPanel4, java.awt.BorderLayout.CENTER);

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

    jcmdCancel.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jcmdCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/cancel.png"))); // NOI18N
    jcmdCancel.setText(AppLocal.getIntString("Button.Cancel")); // NOI18N
    jcmdCancel.setFocusPainted(false);
    jcmdCancel.setFocusable(false);
    jcmdCancel.setMargin(new java.awt.Insets(8, 16, 8, 16));
    jcmdCancel.setRequestFocusEnabled(false);
    jcmdCancel.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jcmdCancelActionPerformed(evt);
        }
    });
    jPanel1.add(jcmdCancel);

    jcmdOK.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/ok.png"))); // NOI18N
    jcmdOK.setText(AppLocal.getIntString("Button.OK")); // NOI18N
    jcmdOK.setEnabled(false);
    jcmdOK.setFocusPainted(false);
    jcmdOK.setFocusable(false);
    jcmdOK.setMargin(new java.awt.Insets(8, 16, 8, 16));
    jcmdOK.setMaximumSize(new java.awt.Dimension(103, 44));
    jcmdOK.setMinimumSize(new java.awt.Dimension(103, 44));
    jcmdOK.setPreferredSize(new java.awt.Dimension(103, 44));
    jcmdOK.setRequestFocusEnabled(false);
    jcmdOK.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jcmdOKActionPerformed(evt);
        }
    });
    jPanel1.add(jcmdOK);

    jPanel8.add(jPanel1, java.awt.BorderLayout.LINE_END);

    jPanel3.add(jPanel8, java.awt.BorderLayout.SOUTH);

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

    setSize(new java.awt.Dimension(613, 497));
    setLocationRelativeTo(null);
}

From source file:JDAC.JDAC.java

public JDAC() {
    setTitle("JDAC");

    ImageIcon img = new ImageIcon("logo.png");
    setIconImage(img.getImage());/*from   w w  w  . j  av a 2  s  . c  o m*/

    //setLayout(new FlowLayout());

    mDataset = createDataset("A");

    mChart = ChartFactory.createXYLineChart("Preview", "Time (ms)", "Value", mDataset, PlotOrientation.VERTICAL,
            false, true, false);

    mLastChart = ChartFactory.createXYLineChart("Last n values", "Time (ms)", "Value", createLastDataset("B"),
            PlotOrientation.VERTICAL, false, true, false);
    mChart.getXYPlot().getDomainAxis().setLowerMargin(0);
    mChart.getXYPlot().getDomainAxis().setUpperMargin(0);
    mLastChart.getXYPlot().getDomainAxis().setLowerMargin(0);
    mLastChart.getXYPlot().getDomainAxis().setUpperMargin(0);

    ChartPanel chartPanel = new ChartPanel(mChart);
    ChartPanel chartLastPanel = new ChartPanel(mLastChart);
    //chartPanel.setPreferredSize( new java.awt.Dimension( 560 , 367 ) );

    XYPlot plot = mChart.getXYPlot();
    XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
    renderer.setSeriesPaint(0, Color.GREEN);
    renderer.setSeriesStroke(0, new BasicStroke(1.0f));
    plot.setRenderer(renderer);

    XYPlot lastPlot = mLastChart.getXYPlot();
    XYLineAndShapeRenderer lastRenderer = new XYLineAndShapeRenderer();
    lastRenderer.setSeriesPaint(0, Color.RED);
    lastRenderer.setSeriesStroke(0, new BasicStroke(1.0f));
    lastPlot.setRenderer(lastRenderer);

    resetChartButton = new JButton("Reset");
    resetChartButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            resetChart();
        }
    });

    mMenuBar = new JMenuBar();
    JMenu fileMenu = new JMenu("File");
    JMenu sensorMenu = new JMenu("Sensor");
    JMenu deviceMenu = new JMenu("Device");
    portSubMenu = new JMenu("Port");
    JMenu helpMenu = new JMenu("Help");

    serialStatusLabel = new JLabel("Disconnected");
    statusLabel = new JLabel("Ready");
    clearStatus = new LabelClear(statusLabel);
    clearStatus.resetTime();

    connectButton = new JMenuItem("Connect");
    disconnectButton = new JMenuItem("Disconnect");
    startButton = new JButton("Start");
    stopButton = new JButton("Stop");
    scanButton = new JMenuItem("Refresh port list");
    exportCSVButton = new JMenuItem("Export data to CSV");
    exportCSVButton.setAccelerator(KeyStroke.getKeyStroke("control S"));
    exportCSVButton.setMnemonic(KeyEvent.VK_S);
    exportPNGButton = new JMenuItem("Export chart to PNG");

    JPanel optionsPanel = new JPanel(new BorderLayout());

    JMenuItem exitItem = new JMenuItem("Exit");
    exitItem.setAccelerator(KeyStroke.getKeyStroke("control X"));
    exitItem.setMnemonic(KeyEvent.VK_X);

    JMenuItem aboutItem = new JMenuItem("About");
    JMenuItem helpItem = new JMenuItem("Help");
    JMenuItem quickStartItem = new JMenuItem("Quick start");

    lastSpinner = new JSpinner(new SpinnerNumberModel(10, 0, 1000, 1));

    ActionListener mSensorListener = new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            setSensor(e.getActionCommand());
        }
    };
    ButtonGroup sensorGroup = new ButtonGroup();
    JRadioButtonMenuItem tmpRadioButton = new JRadioButtonMenuItem("Temperature");
    sensorGroup.add(tmpRadioButton);
    sensorMenu.add(tmpRadioButton);
    tmpRadioButton.addActionListener(mSensorListener);
    tmpRadioButton = new JRadioButtonMenuItem("Distance");
    sensorGroup.add(tmpRadioButton);
    sensorMenu.add(tmpRadioButton);
    tmpRadioButton.addActionListener(mSensorListener);
    tmpRadioButton = new JRadioButtonMenuItem("Voltage");
    sensorGroup.add(tmpRadioButton);
    sensorMenu.add(tmpRadioButton);
    tmpRadioButton.addActionListener(mSensorListener);
    tmpRadioButton = new JRadioButtonMenuItem("Generic");
    tmpRadioButton.setSelected(true);
    setSensor("Generic");
    sensorGroup.add(tmpRadioButton);
    sensorMenu.add(tmpRadioButton);
    tmpRadioButton.addActionListener(mSensorListener);

    connectButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            if (selectedPortName == null) {
                setStatus("No port selected");
                return;
            }
            connect(selectedPortName);
        }
    });
    disconnectButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            serialStatusLabel.setText("Disconnecting...");
            if (serialPort == null) {
                serialStatusLabel.setText("Disconnected");
                serialConnected = false;
                return;
            }

            stopCollect();
            disconnect();
        }
    });
    scanButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            searchForPorts();
        }
    });
    exportCSVButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            saveData();
        }
    });
    exportPNGButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            exportPNG();
        }
    });
    startButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            startCollect();
        }
    });
    stopButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            stopCollect();
        }
    });
    lastSpinner.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
            numLastValues = (Integer) lastSpinner.getValue();
            updateLastTitle();
        }
    });
    updateLastTitle();
    exitItem.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            System.exit(0);
        }
    });
    helpItem.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            new HelpFrame();
        }
    });
    aboutItem.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            new AboutFrame();
        }
    });
    quickStartItem.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            new StartFrame();
        }
    });

    fileMenu.add(exportCSVButton);
    fileMenu.add(exportPNGButton);
    fileMenu.addSeparator();
    fileMenu.add(exitItem);
    deviceMenu.add(connectButton);
    deviceMenu.add(disconnectButton);
    deviceMenu.addSeparator();
    deviceMenu.add(portSubMenu);
    deviceMenu.add(scanButton);
    helpMenu.add(quickStartItem);
    helpMenu.add(helpItem);
    helpMenu.add(aboutItem);

    mMenuBar.add(fileMenu);
    mMenuBar.add(sensorMenu);
    mMenuBar.add(deviceMenu);
    mMenuBar.add(helpMenu);

    JPanel controlsPanel = new JPanel();
    controlsPanel.add(startButton);
    controlsPanel.add(stopButton);
    controlsPanel.add(resetChartButton);
    optionsPanel.add(controlsPanel, BorderLayout.LINE_START);

    JPanel lastPanel = new JPanel(new FlowLayout());
    lastPanel.add(new JLabel("Shown values: "));
    lastPanel.add(lastSpinner);
    optionsPanel.add(lastPanel);

    JPanel serialPanel = new JPanel(new FlowLayout());
    serialPanel.add(serialStatusLabel);
    optionsPanel.add(serialPanel, BorderLayout.LINE_END);

    add(optionsPanel, BorderLayout.PAGE_START);

    JPanel mainPanel = new JPanel(new GridLayout(0, 2));
    mainPanel.add(chartPanel);
    mainPanel.add(chartLastPanel);
    add(mainPanel);

    add(statusLabel, BorderLayout.PAGE_END);
    setJMenuBar(mMenuBar);

    addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent we) {
            dispose();
        }
    });

    setSize(800, 800);
    pack();
    new StartFrame();

    //center on screen
    Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
    int x = (int) ((dimension.getWidth() - getWidth()) / 2);
    int y = (int) ((dimension.getHeight() - getHeight()) / 2);
    setLocation(x, y);

    setVisible(true);
}

From source file:org.gridchem.client.gui.charts.UsageChart.java

private JPanel createSelectionBar() {

    chartTypeListModel = new CyclingSpinnerListModel(ChartType.values());
    chartTypeSpinner = new JSpinner(chartTypeListModel);

    JFormattedTextField ftf = ((JSpinner.DefaultEditor) chartTypeSpinner.getEditor()).getTextField();
    ftf.setColumns(6); //specify more width than we need
    ftf.setHorizontalAlignment(JTextField.CENTER);
    ftf.setEditable(false);//  ww w  .j ava 2s . c o m

    JLabel spinnerLabel = new JLabel("Chart Type");
    spinnerLabel.setLabelFor(chartTypeSpinner);

    JPanel buttonPanel = new JPanel();
    buttonPanel.add(spinnerLabel, BorderLayout.CENTER);
    buttonPanel.add(chartTypeSpinner, BorderLayout.LINE_END);

    return buttonPanel;
}

From source file:inet.CalculationNetworkEditor.visual.view.EditorPane.java

private void addContentToStackingEdgePanel(JPanel rightPanel, E e, Collection<E> allPhysicalCol) {
    //caption//from  w  w w .  j av  a  2  s  .  c om
    JLabel caption = new JLabel("Map: " + e);
    caption.setSize(new Dimension(180, 20));
    caption.setPreferredSize(new Dimension(180, 20));
    rightPanel.add(caption, BorderLayout.NORTH);

    //to
    JPanel toPanel = new JPanel();
    toPanel.setLayout(new BorderLayout());
    rightPanel.add(toPanel, BorderLayout.CENTER);
    JLabel to = new JLabel("To:");
    to.setSize(new Dimension(180, 20));
    to.setPreferredSize(new Dimension(180, 20));
    toPanel.add(to, BorderLayout.NORTH);

    // buttons edge button panel
    JPanel buttonsEdgePanel = new JPanel();
    buttonsEdgePanel.setLayout(new BorderLayout());
    toPanel.add(buttonsEdgePanel, BorderLayout.CENTER);

    // path listPanel
    //JPanel pathListPanel = new JPanel();
    //pathListPanel.setLayout(new BorderLayout);

    defaultListModel = new DefaultListModel<E>();
    pathList = new JList<E>(defaultListModel);
    pathList.setSize(180, 100);
    pathList.setPreferredSize(new Dimension(180, 100));
    buttonsEdgePanel.add(pathList, BorderLayout.CENTER);

    // add remove edge button panel
    JPanel addRemoveEdgePanel = new JPanel();
    addRemoveEdgePanel.setLayout(new BorderLayout());
    buttonsEdgePanel.add(addRemoveEdgePanel, BorderLayout.SOUTH);

    // add Button
    JButton addButton = new JButton("add");
    addRemoveEdgePanel.add(addButton, BorderLayout.LINE_START);
    addButton.addActionListener(editingPanelsListener);
    addButton.setSize(new Dimension(70, 20));
    addButton.setPreferredSize(new Dimension(70, 20));

    // remove Button
    JButton removeButton = new JButton("remove");
    addRemoveEdgePanel.add(removeButton, BorderLayout.LINE_END);
    removeButton.addActionListener(editingPanelsListener);
    removeButton.setSize(new Dimension(90, 20));
    removeButton.setPreferredSize(new Dimension(90, 20));

    // add drop done box with all physical edges
    allPhysicalEdgeJCB = new JComboBox<E>();
    for (E edge : allPhysicalCol) {
        if (!defaultListModel.contains(edge)) {
            allPhysicalEdgeJCB.addItem(edge);
        }
    }
    toPanel.add(allPhysicalEdgeJCB, BorderLayout.SOUTH);
    allPhysicalEdgeJCB.setSize(new Dimension(180, 30));
    allPhysicalEdgeJCB.setPreferredSize(new Dimension(180, 30));
    allPhysicalEdgeJCB.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));

    // JButton stack
    JButton stack = new JButton("map");
    stack.addActionListener(editingPanelsListener);
    rightPanel.add(stack, BorderLayout.SOUTH);
}

From source file:lol.search.RankedStatsPage.java

private JPanel headerPanel() {
    //init spacers for header
    for (int i = 0; i < 10; i++) {
        JLabel label = new JLabel("--");
        label.setForeground(new Color(0, 0, 0, 0));
        spacers.add(label);/*from www . j a v a  2s  .  c  om*/
    }
    //header -- to set this semi-transparent i had to remove setOpaque and replace with setBackground(...)
    JPanel headerPanel = new JPanel();
    headerPanel.setLayout(new BorderLayout());
    //headerPanel.setBorder(BorderFactory.createLineBorder(Color.WHITE));
    headerPanel.setBackground(backgroundColor);
    headerPanel.setPreferredSize(headerDimension);
    //back button
    JPanel buttonHolder = new JPanel();
    ImageIcon buttonImage = new ImageIcon("assets\\other\\button.png");
    ImageIcon buttonPressedImage = new ImageIcon("assets\\other\\buttonPressed.png");
    Image tempImage = buttonImage.getImage();
    Image newTempImg = tempImage.getScaledInstance(75, 35, Image.SCALE_SMOOTH);
    buttonImage = new ImageIcon(newTempImg);
    JButton backButton = new JButton("BACK");
    backButton.setFont(new Font("Sen-Regular", Font.CENTER_BASELINE, 10)); //custom font
    backButton.setForeground(Color.WHITE); //text color
    backButton.setBackground(new Color(0, 0, 0, 0));
    backButton.setBorder(BorderFactory.createLineBorder(Color.BLACK));
    backButton.setHorizontalTextPosition(AbstractButton.CENTER);
    backButton.setPreferredSize(new Dimension(75, 35));
    //pressed button
    Image tempImage2 = buttonPressedImage.getImage();
    Image newTempImg2 = tempImage2.getScaledInstance(75, 35, Image.SCALE_SMOOTH);
    buttonPressedImage = new ImageIcon(newTempImg2);
    backButton.setIcon(buttonImage);
    backButton.setRolloverIcon(buttonPressedImage);
    backButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) { //button pressed
            System.out.println("Going back...\n");
            masterFrame.getContentPane().removeAll();
            masterFrame.revalidate();
            masterFrame.repaint();
            MainPage MAIN_PAGE = new MainPage(masterFrame, summonerName);
        }
    });
    buttonHolder.add(backButton);
    buttonHolder.setOpaque(false);
    headerPanel.add(buttonHolder, BorderLayout.LINE_START);
    //centerpanel
    JPanel centerPanel = new JPanel();
    centerPanel.setLayout(new GridLayout(1, 2));
    centerPanel.setOpaque(false);
    //centerPanel.setBorder(BorderFactory.createLineBorder(Color.WHITE));
    //rightcenter
    JPanel rightCenter = new JPanel();
    rightCenter.setOpaque(false);
    rightCenter.setLayout(new GridLayout(2, 1));
    //top center panel
    JPanel topCenter = new JPanel();
    topCenter.setOpaque(false);
    topCenter.setLayout(new BoxLayout(topCenter, BoxLayout.X_AXIS));
    //profile icon
    JPanel proIconPanel = new JPanel();
    proIconPanel.setOpaque(false);
    proIconPanel.setLayout(new BoxLayout(proIconPanel, BoxLayout.Y_AXIS));
    JLabel profileIconLabel = new JLabel(this.profileIcon);
    //profileIconLabel.setBorder(BorderFactory.createLineBorder(Color.WHITE));
    profileIconLabel.setAlignmentX(Component.RIGHT_ALIGNMENT);
    proIconPanel.add(profileIconLabel);
    centerPanel.add(proIconPanel);
    //empty spacer
    topCenter.add(spacers.get(0));
    //summoner name
    JLabel summonerNameLabel = new JLabel(this.summonerName);
    summonerNameLabel.setFont(new Font("Sen-Regular", Font.CENTER_BASELINE, 15)); //custom font
    summonerNameLabel.setForeground(Color.WHITE); //text color
    summonerNameLabel.setAlignmentX(Component.LEFT_ALIGNMENT);
    topCenter.add(summonerNameLabel);
    //empty spacer
    topCenter.add(spacers.get(1));
    //tier
    JLabel tierLabel = new JLabel(this.tier);
    tierLabel.setFont(new Font("Sen-Regular", Font.CENTER_BASELINE, 13)); //custom font
    tierLabel.setForeground(new Color(219, 219, 219)); //text color
    tierLabel.setAlignmentX(Component.LEFT_ALIGNMENT);
    topCenter.add(tierLabel);
    //empty spacer
    topCenter.add(spacers.get(2));
    //division
    JLabel divisionLabel = new JLabel(this.division);
    divisionLabel.setFont(new Font("Sen-Regular", Font.CENTER_BASELINE, 13)); //custom font
    divisionLabel.setForeground(new Color(219, 219, 219)); //text color
    divisionLabel.setAlignmentX(Component.LEFT_ALIGNMENT);
    topCenter.add(divisionLabel);
    //bottom center panel
    JPanel bottomCenter = new JPanel();
    bottomCenter.setOpaque(false);
    bottomCenter.setLayout(new BoxLayout(bottomCenter, BoxLayout.X_AXIS));
    //empty spacer
    bottomCenter.add(spacers.get(3));
    //season
    JLabel winsLabel = new JLabel(this.season);
    winsLabel.setFont(new Font("Sen-Regular", Font.CENTER_BASELINE, 14)); //custom font
    winsLabel.setForeground(new Color(219, 219, 219)); //text color
    winsLabel.setAlignmentX(Component.LEFT_ALIGNMENT);
    bottomCenter.add(winsLabel);

    rightCenter.add(topCenter);
    rightCenter.add(bottomCenter);
    centerPanel.add(rightCenter);
    headerPanel.add(centerPanel, BorderLayout.CENTER);
    //empty panel to balance right side
    JPanel ee = new JPanel();
    ee.setOpaque(false);
    ee.setPreferredSize(new Dimension(260, 50));
    headerPanel.add(ee, BorderLayout.LINE_END);
    return headerPanel;
}

From source file:org.gridchem.client.gui.panels.myccg.resource.HPCChartPanel.java

private JPanel createSelectionBar() {
    ActionListener chartNavigationAL = new ActionListener() {
        public void actionPerformed(ActionEvent event) {
            // change the chart display via a circular scrolling
            // list of chart types.
            if (event.getSource() == nextButton) {
                CURRENT_CHARTTYPE = CURRENT_CHARTTYPE.next();
                chartTypeComboBox.setSelectedItem(CURRENT_CHARTTYPE);
            } else if (event.getSource() == previousButton) {
                CURRENT_CHARTTYPE = CURRENT_CHARTTYPE.previous();
                chartTypeComboBox.setSelectedItem(CURRENT_CHARTTYPE);
            } else if (event.getSource() == reloadButton) {
                // TODO:call GMS.getUserVO and refresh the user's vo
                // before refreshing this screen
                GETHARDWARECommand command = new GETHARDWARECommand(statusListener);
                command.getArguments().put("project.id", GridChem.project.getId());
                statusListener.statusChanged(new StatusEvent(command, Status.START));
            }//from w  ww  .  jav a2 s.c  o m
        }
    };

    // create buttons with left and right icons to scroll through
    // the possible chart types, changing the chart display with
    // each click
    nextButton = new JButton(new ImageIcon(Env.getImagesDir() + "/navigation/forward.jpg"));
    nextButton.addActionListener(chartNavigationAL);

    previousButton = new JButton(new ImageIcon(Env.getImagesDir() + "/navigation/back.jpg"));
    previousButton.addActionListener(chartNavigationAL);

    reloadButton = new JButton(new ImageIcon(Env.getImagesDir() + "/navigation/reload.jpg"));
    reloadButton.addActionListener(chartNavigationAL);
    reloadButton.setPreferredSize(new Dimension(35, 35));

    // create chart type selection combo box
    JLabel chartTypeLabel = new JLabel("Chart Type");
    chartTypeLabel.setLabelFor(chartTypeComboBox);
    chartTypeComboBox = new JComboBox(ChartType.values());
    chartTypeComboBox.setEditable(false);
    chartTypeComboBox.addActionListener(new ActionListener() {
        // change the charts depending on the selection of the chart type
        public void actionPerformed(ActionEvent e) {
            setChartDisplayType((ChartType) ((JComboBox) e.getSource()).getSelectedItem());
        }
    });

    //      create chart type selection combo box
    JLabel loadTypeLabel = new JLabel("Load Type");
    loadTypeLabel.setLabelFor(loadTypeComboBox);
    loadTypeComboBox = new JComboBox(LoadType.values());
    loadTypeComboBox.setEditable(false);
    loadTypeComboBox.addActionListener(new ActionListener() {
        // change the charts depending on the selection of the chart type
        public void actionPerformed(ActionEvent e) {
            setChartDisplayType((LoadType) ((JComboBox) e.getSource()).getSelectedItem());
        }
    });

    JPanel buttonPanel = new JPanel();

    buttonPanel.add(previousButton, BorderLayout.LINE_END);
    buttonPanel.add(reloadButton, BorderLayout.LINE_END);
    buttonPanel.add(nextButton, BorderLayout.LINE_END);
    buttonPanel.add(loadTypeLabel, BorderLayout.LINE_END);
    buttonPanel.add(loadTypeComboBox, BorderLayout.LINE_END);
    buttonPanel.add(chartTypeLabel, BorderLayout.LINE_END);
    buttonPanel.add(chartTypeComboBox, BorderLayout.LINE_END);

    return buttonPanel;
}

From source file:giaodien.tongquan.TongQuan.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 w w . j av a2s . c om*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    Toppanel = new javax.swing.JPanel();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    tfDoanhSo = new javax.swing.JTextField();
    tfHoaDon = new javax.swing.JTextField();
    hinhdoanhthu = new javax.swing.JLabel();
    hinhhoadon = new javax.swing.JLabel();
    List = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jList1 = new javax.swing.JList<>();
    Detailpanel = new javax.swing.JPanel();
    jLabel5 = new javax.swing.JLabel();
    jcbThang = new javax.swing.JComboBox<>();
    jLabel6 = new javax.swing.JLabel();
    graph = new javax.swing.JPanel();
    graph1 = new javax.swing.JPanel();

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

    Toppanel.setBackground(new java.awt.Color(51, 153, 0));

    jLabel2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
    jLabel2.setText("KT QU B?N HNG HM NAY:");

    jLabel3.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
    jLabel3.setText("HO? ?N :");

    jLabel4.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
    jLabel4.setText("DOANH THU :");

    tfDoanhSo.setEditable(false);
    tfDoanhSo.setBackground(new java.awt.Color(51, 153, 0));
    tfDoanhSo.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
    tfDoanhSo.setBorder(null);
    tfDoanhSo.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            tfDoanhSoActionPerformed(evt);
        }
    });

    tfHoaDon.setEditable(false);
    tfHoaDon.setBackground(new java.awt.Color(51, 153, 0));
    tfHoaDon.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
    tfHoaDon.setBorder(null);
    tfHoaDon.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            tfHoaDonActionPerformed(evt);
        }
    });

    hinhdoanhthu.setBackground(new java.awt.Color(255, 255, 255));

    javax.swing.GroupLayout ToppanelLayout = new javax.swing.GroupLayout(Toppanel);
    Toppanel.setLayout(ToppanelLayout);
    ToppanelLayout.setHorizontalGroup(ToppanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(ToppanelLayout.createSequentialGroup().addGroup(ToppanelLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 234,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(ToppanelLayout.createSequentialGroup().addGap(32, 32, 32)
                            .addGroup(ToppanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(hinhhoadon, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(hinhdoanhthu, javax.swing.GroupLayout.DEFAULT_SIZE, 89,
                                            Short.MAX_VALUE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(ToppanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel3).addComponent(jLabel4,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 170,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(65, 65, 65)
                            .addGroup(ToppanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(tfHoaDon, javax.swing.GroupLayout.PREFERRED_SIZE, 157,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(tfDoanhSo, javax.swing.GroupLayout.PREFERRED_SIZE, 222,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addContainerGap(122, Short.MAX_VALUE)));
    ToppanelLayout.setVerticalGroup(ToppanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ToppanelLayout.createSequentialGroup()
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 24,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(ToppanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(ToppanelLayout.createSequentialGroup()
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addGroup(ToppanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(tfHoaDon, javax.swing.GroupLayout.PREFERRED_SIZE, 36,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 34,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))
                            .addGroup(ToppanelLayout.createSequentialGroup().addGap(1, 1, 1)
                                    .addComponent(hinhhoadon, javax.swing.GroupLayout.PREFERRED_SIZE, 57,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addGroup(ToppanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(ToppanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(tfDoanhSo, javax.swing.GroupLayout.PREFERRED_SIZE, 33,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 37,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(hinhdoanhthu, javax.swing.GroupLayout.PREFERRED_SIZE, 63,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));

    add(Toppanel, java.awt.BorderLayout.PAGE_START);

    List.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
    List.setPreferredSize(new java.awt.Dimension(200, 250));
    List.setLayout(new java.awt.GridBagLayout());

    jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
    jLabel1.setText("C?C HOT ?NG GN ?Y");
    List.add(jLabel1, new java.awt.GridBagConstraints());

    jScrollPane1.setBorder(null);

    jList1.setBackground(new java.awt.Color(240, 240, 240));
    jList1.setFont(new java.awt.Font("Tahoma", 2, 12)); // NOI18N
    jList1.setModel(new javax.swing.AbstractListModel<String>() {
        String[] strings = { " ", " ", "Quang Duy va bn", "\tS mi DS2 nht bn size M", " ", " ",
                "Ng?c trinh va bn ", "\t?p t LV ch 7", " ", " ", "Ph yn va ",
                "\tchnh sa gi bn", " ", " ", "Huy?n My va nhp hng", " ", " ",
                "(Khch hng VIP) Ronaldo va mua", "\t ?p lng Gucci hoa iphone 7" };

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

        public String getElementAt(int i) {
            return strings[i];
        }
    });
    jScrollPane1.setViewportView(jList1);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.1;
    gridBagConstraints.weighty = 0.1;
    gridBagConstraints.insets = new java.awt.Insets(0, 20, 0, 0);
    List.add(jScrollPane1, gridBagConstraints);

    add(List, java.awt.BorderLayout.LINE_END);

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

    jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
    jLabel5.setText("NHT K? DOANH THU");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.ipadx = 66;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
    Detailpanel.add(jLabel5, gridBagConstraints);

    jcbThang.setModel(new javax.swing.DefaultComboBoxModel<>(
            new String[] { "Thng 1", "Thng 2", "Thng 3", "Thng 4", "Thng 5", "Thng 6", "Thng 7",
                    "Thng 8", "Thng 9", "Thng 10", "Thng 11", "Thng 12" }));
    jcbThang.setSelectedIndex(Calendar.getInstance().get(Calendar.MONTH));
    jcbThang.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jcbThangItemStateChanged(evt);
        }
    });
    jcbThang.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jcbThangActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.ipadx = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
    Detailpanel.add(jcbThang, gridBagConstraints);

    jLabel6.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
    jLabel6.setText("TOP 5 SN PHM B?N CHY NHT");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.ipadx = 66;
    Detailpanel.add(jLabel6, gridBagConstraints);

    graph.setLayout(new java.awt.BorderLayout());
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 0.1;
    gridBagConstraints.weighty = 0.4;
    gridBagConstraints.insets = new java.awt.Insets(4, 10, 2, 0);
    Detailpanel.add(graph, gridBagConstraints);

    graph1.setLayout(new java.awt.BorderLayout());
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weighty = 0.4;
    gridBagConstraints.insets = new java.awt.Insets(4, 11, 2, 0);
    Detailpanel.add(graph1, gridBagConstraints);

    add(Detailpanel, java.awt.BorderLayout.CENTER);
}

From source file:inet.CalculationNetworkEditor.visual.view.EditorPane.java

public void clearPanel() {
    rightBetweenPanel.remove(rightPanel);
    rightPanel = new JPanel();
    rightBetweenPanel.add(rightPanel, BorderLayout.LINE_END);
    rightPanel.setBorder(BorderFactory.createEmptyBorder(20, 10, 500, 10));
    rightPanel.setSize(200, 500);//from w w w  . jav a  2 s.c  o  m
    rightPanel.setPreferredSize(new Dimension(200, 500));

    // reset Variables
    // stack edge:
    allPhysicalEdgeJCB = null;
    defaultListModel = null;
    pathList = null;
    phyE = null;
    virtE = null;
    // stack vertex:
    allPhysicalVertexJCB = null;
    phyV = null;
    virtV = null;
    // edit resources
    resInput = null;
    vert = null;
    edge = null;
}

From source file:com.polivoto.vistas.Charts.java

private JPanel hacerTabla(Pregunta pregunta, List<Opcion> opciones, String perfil) {
    Tabla panel = new Tabla();
    //Panel completo
    //scrollPanel.setBackground(Color.blue);

    //Ttulo pregunta
    JLabel tituloPregunta = new JLabel("\t" + pregunta.getTitulo() + " (" + perfil + ")");
    tituloPregunta.setFont(new Font("Roboto", 1, 24));
    tituloPregunta.setForeground(Color.black);
    tituloPregunta.setVerticalAlignment(JLabel.CENTER);
    JPanel panelHeader = panel.getjPanelHead();
    panelHeader.add(tituloPregunta);//from  w  w  w .ja va2  s  .  c o m
    panelHeader.setOpaque(false);
    panelHeader.setPreferredSize(panelGrafica.getSize());

    //Panel de la tabla
    JPanel tabla = new JPanel(new GridLayout(pregunta.obtenerCantidadDeOpciones() + 2, 3, 5, 5));
    tabla.setBackground(Color.white);

    //Poner el titulo de cada columna
    for (int i = 0; i < 3; i++) {
        JPanel tilt = new JPanel();
        tilt.setBackground(new Color(137, 36, 31));
        JLabel label = new JLabel(i == 0 ? "Opcion" : i == 2 ? "Porcentaje" : "Cantidad");
        label.setFont(new Font("Roboto", 1, 18));
        label.setForeground(Color.white);
        tilt.add(label);
        tilt.setSize(new Dimension(0, 35));
        tilt.setBorder(new MatteBorder(1, 1, 1, 1, new Color(230, 230, 230)));
        tabla.add(tilt);
    }

    int sum = 0;

    for (Opcion opcion : opciones) {
        sum += opcion.getCantidad();
    }

    for (Opcion opc : opciones) {
        JPanel p1 = new JPanel(new GridLayout(0, 1));
        p1.setBackground(Color.white);
        p1.setBorder(new MatteBorder(1, 1, 1, 1, new Color(230, 230, 230)));
        JTextArea l1 = new JTextArea(opc.getNombre());

        l1.setWrapStyleWord(true);
        l1.setLineWrap(true);
        l1.setFont(new Font("Roboto", 0, 18));
        l1.setEditable(false);
        l1.setBorder(null);
        p1.setPreferredSize(l1.getSize());
        p1.add(l1);
        tabla.add(p1);

        JPanel p2 = new JPanel();
        p2.setBackground(Color.white);
        p2.setBorder(new MatteBorder(1, 1, 1, 1, new Color(230, 230, 230)));
        JLabel l2 = new JLabel("" + opc.getCantidad());
        l2.setFont(new Font("Roboto", 0, 18));
        p2.add(l2);
        tabla.add(p2);

        JPanel p3 = new JPanel();
        p3.setBackground(Color.white);
        p3.setBorder(new MatteBorder(1, 1, 1, 1, new Color(230, 230, 230)));
        double porcentaje = (opc.getCantidad() * 100.0) / sum;
        JLabel l3 = new JLabel(String.format("%.2f", porcentaje) + "%");
        l3.setFont(new Font("Roboto", 0, 18));
        p3.add(l3);
        tabla.add(p3);
    }

    JPanel p1 = new JPanel();
    p1.setBackground(Color.white);
    p1.setBorder(new MatteBorder(1, 1, 1, 1, new Color(230, 230, 230)));
    JLabel l1 = new JLabel("Total");
    l1.setHorizontalTextPosition(JLabel.LEFT);
    l1.setFont(new Font("Roboto", 1, 18));
    p1.add(l1);
    tabla.add(p1);

    JPanel p2 = new JPanel();
    p2.setBackground(Color.white);
    p2.setBorder(new MatteBorder(1, 1, 1, 1, new Color(230, 230, 230)));
    JLabel l2 = new JLabel("" + sum);
    l2.setFont(new Font("Roboto", 1, 18));
    p2.add(l2);
    tabla.add(p2);

    JPanel p3 = new JPanel();
    p3.setBackground(Color.white);
    p3.setBorder(new MatteBorder(1, 1, 1, 1, new Color(230, 230, 230)));
    JLabel l3 = new JLabel("100.00%");
    l3.setFont(new Font("Roboto", 1, 18));
    p3.add(l3);
    tabla.add(p3);

    panel.getjPanelContent().add(tabla, BorderLayout.CENTER);

    //Relleno
    JPanel x = new JPanel(new GridLayout());
    x.setPreferredSize(new Dimension(100, 0));
    x.setBackground(Color.white);
    panel.getjPanelContent().add(x, BorderLayout.LINE_START);
    JPanel y = new JPanel(new GridLayout());
    y.setPreferredSize(new Dimension(100, 0));
    y.setBackground(Color.white);
    panel.getjPanelContent().add(y, BorderLayout.LINE_END);
    JPanel z = new JPanel(new GridLayout());
    z.setBackground(Color.white);
    z.setPreferredSize(new Dimension(0, 40));
    panel.getjPanelContent().add(z, BorderLayout.PAGE_END);

    return panel;
}

From source file:com.openbravo.pos.panels.JTicketsFinder.java

/** This method is called from within the constructor to
 * initialize the form./*from  w w  w .  j ava2 s . com*/
 * 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() {
    java.awt.GridBagConstraints gridBagConstraints;

    jPanel3 = new javax.swing.JPanel();
    jPanel5 = new javax.swing.JPanel();
    jPanel7 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jLabel6 = new javax.swing.JLabel();
    jLabel7 = new javax.swing.JLabel();
    jtxtMoney = new com.openbravo.editor.JEditorCurrency();
    jcboUser = new javax.swing.JComboBox();
    jcboMoney = new javax.swing.JComboBox();
    jtxtTicketID = new com.openbravo.editor.JEditorIntegerPositive();
    labelCustomer = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    jTxtStartDate = new javax.swing.JTextField();
    jTxtEndDate = new javax.swing.JTextField();
    btnDateStart = new javax.swing.JButton();
    btnDateEnd = new javax.swing.JButton();
    jtxtCustomer = new javax.swing.JTextField();
    btnCustomer = new javax.swing.JButton();
    jComboBoxTicket = new javax.swing.JComboBox();
    jLabel2 = new javax.swing.JLabel();
    jtxtCodebar = new javax.swing.JTextField();
    jEditProduct = new javax.swing.JButton();
    jPanel6 = new javax.swing.JPanel();
    jButton1 = new javax.swing.JButton();
    jButton3 = new javax.swing.JButton();
    jPanel4 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jListTickets = new javax.swing.JList();
    jPanel8 = new javax.swing.JPanel();
    jPanel1 = new javax.swing.JPanel();
    jcmdCancel = new javax.swing.JButton();
    jcmdOK = new javax.swing.JButton();
    jPanel2 = new javax.swing.JPanel();
    m_jKeys = new com.openbravo.editor.JEditorKeys();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle(AppLocal.getIntString("form.tickettitle")); // NOI18N

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

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

    jPanel7.setPreferredSize(new java.awt.Dimension(10, 250));
    jPanel7.setLayout(new java.awt.GridBagLayout());

    jLabel1.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jLabel1.setText(AppLocal.getIntString("label.ticketid")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    jPanel7.add(jLabel1, gridBagConstraints);

    jLabel6.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jLabel6.setText(AppLocal.getIntString("label.user")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    jPanel7.add(jLabel6, gridBagConstraints);

    jLabel7.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jLabel7.setText(AppLocal.getIntString("label.totalcash")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    jPanel7.add(jLabel7, gridBagConstraints);

    jtxtMoney.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
    jPanel7.add(jtxtMoney, gridBagConstraints);

    jcboUser.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
    jcboUser.setPreferredSize(new java.awt.Dimension(200, 25));
    jcboUser.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jcboUserItemStateChanged(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    jPanel7.add(jcboUser, gridBagConstraints);

    jcboMoney.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
    jPanel7.add(jcboMoney, gridBagConstraints);

    jtxtTicketID.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    jPanel7.add(jtxtTicketID, gridBagConstraints);

    labelCustomer.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    labelCustomer.setText(AppLocal.getIntString("label.customer")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    jPanel7.add(labelCustomer, gridBagConstraints);

    jLabel3.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jLabel3.setText(AppLocal.getIntString("Label.StartDate")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    jPanel7.add(jLabel3, gridBagConstraints);

    jLabel4.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jLabel4.setText(AppLocal.getIntString("Label.EndDate")); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    jPanel7.add(jLabel4, gridBagConstraints);

    jTxtStartDate.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jTxtStartDate.setPreferredSize(new java.awt.Dimension(200, 25));
    jTxtStartDate.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent evt) {
            jTxtEndDateKeyReleased(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    jPanel7.add(jTxtStartDate, gridBagConstraints);

    jTxtEndDate.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jTxtEndDate.setPreferredSize(new java.awt.Dimension(200, 25));
    jTxtEndDate.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent evt) {
            jTxtEndDateKeyReleased(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    jPanel7.add(jTxtEndDate, gridBagConstraints);

    btnDateStart.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/date.png"))); // NOI18N
    btnDateStart.setToolTipText("Open Calendar");
    btnDateStart.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnDateStartActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    jPanel7.add(btnDateStart, gridBagConstraints);

    btnDateEnd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/date.png"))); // NOI18N
    btnDateEnd.setToolTipText("Open Calendar");
    btnDateEnd.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnDateEndActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    jPanel7.add(btnDateEnd, gridBagConstraints);

    jtxtCustomer.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jtxtCustomer.setPreferredSize(new java.awt.Dimension(200, 25));
    jtxtCustomer.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent evt) {
            jTxtEndDateKeyReleased(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    jPanel7.add(jtxtCustomer, gridBagConstraints);

    btnCustomer.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/customer_sml.png"))); // NOI18N
    btnCustomer.setToolTipText("Open Customers");
    btnCustomer.setFocusPainted(false);
    btnCustomer.setFocusable(false);
    btnCustomer.setMargin(new java.awt.Insets(8, 14, 8, 14));
    btnCustomer.setPreferredSize(new java.awt.Dimension(57, 33));
    btnCustomer.setRequestFocusEnabled(false);
    btnCustomer.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCustomerActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    jPanel7.add(btnCustomer, gridBagConstraints);

    jComboBoxTicket.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    jPanel7.add(jComboBoxTicket, gridBagConstraints);

    jLabel2.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jLabel2.setText(AppLocal.getIntString("label.prodbarcode"));
    jLabel2.setPreferredSize(new java.awt.Dimension(95, 14));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    jPanel7.add(jLabel2, gridBagConstraints);

    jtxtCodebar.setPreferredSize(new java.awt.Dimension(200, 25));
    jtxtCodebar.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent evt) {
            jTxtEndDateKeyReleased(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);
    jPanel7.add(jtxtCodebar, gridBagConstraints);

    jEditProduct
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/search24.png"))); // NOI18N
    jEditProduct.setMargin(new java.awt.Insets(8, 14, 8, 14));
    jEditProduct.setPreferredSize(new java.awt.Dimension(57, 33));
    jEditProduct.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jEditProductActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    jPanel7.add(jEditProduct, gridBagConstraints);

    jPanel5.add(jPanel7, java.awt.BorderLayout.CENTER);

    jButton1.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/reload.png"))); // NOI18N
    jButton1.setText(AppLocal.getIntString("button.clean")); // NOI18N
    jButton1.setToolTipText("Clear Filter");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
        }
    });
    jPanel6.add(jButton1);

    jButton3.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/ok.png"))); // NOI18N
    jButton3.setText(AppLocal.getIntString("button.executefilter")); // NOI18N
    jButton3.setToolTipText("Execute Filter");
    jButton3.setFocusPainted(false);
    jButton3.setFocusable(false);
    jButton3.setRequestFocusEnabled(false);
    jButton3.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton3ActionPerformed(evt);
        }
    });
    jPanel6.add(jButton3);

    jPanel5.add(jPanel6, java.awt.BorderLayout.SOUTH);

    jPanel3.add(jPanel5, java.awt.BorderLayout.PAGE_START);

    jPanel4.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
    jPanel4.setLayout(new java.awt.BorderLayout());

    jListTickets.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
    jListTickets.setFocusable(false);
    jListTickets.setRequestFocusEnabled(false);
    jListTickets.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jListTicketsMouseClicked(evt);
        }
    });
    jListTickets.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
        public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
            jListTicketsValueChanged(evt);
        }
    });
    jScrollPane1.setViewportView(jListTickets);

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

    jPanel3.add(jPanel4, java.awt.BorderLayout.CENTER);

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

    jcmdCancel.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jcmdCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/cancel.png"))); // NOI18N
    jcmdCancel.setText(AppLocal.getIntString("Button.Cancel")); // NOI18N
    jcmdCancel.setFocusPainted(false);
    jcmdCancel.setFocusable(false);
    jcmdCancel.setMargin(new java.awt.Insets(8, 16, 8, 16));
    jcmdCancel.setRequestFocusEnabled(false);
    jcmdCancel.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jcmdCancelActionPerformed(evt);
        }
    });
    jPanel1.add(jcmdCancel);

    jcmdOK.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    jcmdOK.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/ok.png"))); // NOI18N
    jcmdOK.setText(AppLocal.getIntString("Button.OK")); // NOI18N
    jcmdOK.setEnabled(false);
    jcmdOK.setFocusPainted(false);
    jcmdOK.setFocusable(false);
    jcmdOK.setMargin(new java.awt.Insets(8, 16, 8, 16));
    jcmdOK.setMaximumSize(new java.awt.Dimension(103, 44));
    jcmdOK.setMinimumSize(new java.awt.Dimension(103, 44));
    jcmdOK.setPreferredSize(new java.awt.Dimension(103, 44));
    jcmdOK.setRequestFocusEnabled(false);
    jcmdOK.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jcmdOKActionPerformed(evt);
        }
    });
    jPanel1.add(jcmdOK);

    jPanel8.add(jPanel1, java.awt.BorderLayout.LINE_END);

    jPanel3.add(jPanel8, java.awt.BorderLayout.SOUTH);

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

    jPanel2.setPreferredSize(new java.awt.Dimension(200, 250));
    jPanel2.setLayout(new java.awt.BorderLayout());
    jPanel2.add(m_jKeys, java.awt.BorderLayout.NORTH);

    getContentPane().add(jPanel2, java.awt.BorderLayout.LINE_END);

    setSize(new java.awt.Dimension(690, 511));
    setLocationRelativeTo(null);
}