Example usage for java.awt BorderLayout LINE_START

List of usage examples for java.awt BorderLayout LINE_START

Introduction

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

Prototype

String LINE_START

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

Click Source Link

Document

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

Usage

From source file:org.piraso.ui.sql.SQLViewTopComponent.java

/** This method is called from within the constructor to
 * initialize the form.//from  w  w w  .  j  a  v a  2s . c  om
 * 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() {

    scrollSQLPane = new javax.swing.JScrollPane();
    txtSQL = new javax.swing.JEditorPane();
    scrollTable = new javax.swing.JScrollPane();
    table = new javax.swing.JTable();
    jToolBar1 = new javax.swing.JToolBar();
    btnProperties = new javax.swing.JToggleButton();
    btnReplaceParameters = new javax.swing.JToggleButton();
    btnFormat = new javax.swing.JToggleButton();
    btnCopy = new javax.swing.JButton();
    jSplitPane1 = new javax.swing.JSplitPane();

    txtSQL.setFont(FontProviderManager.INSTANCE.getEditorDefaultFont());
    scrollSQLPane.setViewportView(txtSQL);

    table.setFont(FontProviderManager.INSTANCE.getEditorDefaultFont());
    table.setModel(tableModel);
    scrollTable.setViewportView(table);

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

    jToolBar1.setBackground(new java.awt.Color(226, 226, 226));
    jToolBar1.setFloatable(false);
    jToolBar1.setOrientation(1);
    jToolBar1.setRollover(true);

    btnProperties.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/org/piraso/ui/sql/icons/properties.png"))); // NOI18N
    org.openide.awt.Mnemonics.setLocalizedText(btnProperties, org.openide.util.NbBundle
            .getMessage(SQLViewTopComponent.class, "SQLViewTopComponent.btnProperties.text")); // NOI18N
    btnProperties.setToolTipText(org.openide.util.NbBundle.getMessage(SQLViewTopComponent.class,
            "SQLViewTopComponent.btnProperties.toolTipText")); // NOI18N
    btnProperties.setFocusable(false);
    btnProperties.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnProperties.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnProperties.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnPropertiesActionPerformed(evt);
        }
    });
    jToolBar1.add(btnProperties);

    btnReplaceParameters.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/org/piraso/ui/sql/icons/replace_variables.png"))); // NOI18N
    org.openide.awt.Mnemonics.setLocalizedText(btnReplaceParameters, org.openide.util.NbBundle
            .getMessage(SQLViewTopComponent.class, "SQLViewTopComponent.btnReplaceParameters.text")); // NOI18N
    btnReplaceParameters.setToolTipText(org.openide.util.NbBundle.getMessage(SQLViewTopComponent.class,
            "SQLViewTopComponent.btnReplaceParameters.toolTipText")); // NOI18N
    btnReplaceParameters.setFocusable(false);
    btnReplaceParameters.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnReplaceParameters.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnReplaceParameters.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnReplaceParametersActionPerformed(evt);
        }
    });
    jToolBar1.add(btnReplaceParameters);

    btnFormat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/piraso/ui/sql/icons/format.png"))); // NOI18N
    btnFormat.setSelected(true);
    org.openide.awt.Mnemonics.setLocalizedText(btnFormat, org.openide.util.NbBundle
            .getMessage(SQLViewTopComponent.class, "SQLViewTopComponent.btnFormat.text")); // NOI18N
    btnFormat.setToolTipText(org.openide.util.NbBundle.getMessage(SQLViewTopComponent.class,
            "SQLViewTopComponent.btnFormat.toolTipText")); // NOI18N
    btnFormat.setFocusable(false);
    btnFormat.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnFormat.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnFormat.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnFormatActionPerformed(evt);
        }
    });
    jToolBar1.add(btnFormat);

    btnCopy.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/piraso/ui/sql/icons/copy.png"))); // NOI18N
    org.openide.awt.Mnemonics.setLocalizedText(btnCopy, org.openide.util.NbBundle
            .getMessage(SQLViewTopComponent.class, "SQLViewTopComponent.btnCopy.text")); // NOI18N
    btnCopy.setToolTipText(org.openide.util.NbBundle.getMessage(SQLViewTopComponent.class,
            "SQLViewTopComponent.btnCopy.toolTipText")); // NOI18N
    btnCopy.setBorder(javax.swing.BorderFactory.createEmptyBorder(7, 7, 7, 7));
    btnCopy.setEnabled(false);
    btnCopy.setFocusable(false);
    btnCopy.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnCopy.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnCopy.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCopyActionPerformed(evt);
        }
    });
    jToolBar1.add(btnCopy);

    add(jToolBar1, java.awt.BorderLayout.LINE_START);
    add(jSplitPane1, java.awt.BorderLayout.CENTER);
}

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

private void addContentToStackingEdgePanel(JPanel rightPanel, E e, Collection<E> allPhysicalCol) {
    //caption//from  www  .  ja  va 2s. 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:com.isencia.passerelle.hmi.generic.GenericHMI.java

private JPanel createTitlePanel(final String name) {
    final JPanel result = new JPanel(new BorderLayout());
    final ImageIcon icon = new ImageIcon(Toolkit.getDefaultToolkit()
            .getImage(getClass().getResource("/com/isencia/passerelle/hmi/resources/param.gif")));
    final JLabel startLabel = new JLabel(icon);
    result.add(startLabel, BorderLayout.LINE_START);

    final JLabel nameLabel = new JLabel(name);
    final Font f = nameLabel.getFont();
    nameLabel.setFont(new Font(f.getName(), f.getStyle(), f.getSize() + 2));
    nameLabel.setForeground(new Color(49, 106, 196));
    result.add(nameLabel);/*from  w ww .j av a2s . co m*/

    return result;
}

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

    //jPanel3 = new javax.swing.JPanel();
    //jPanelDate = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();
    m_jToolbarContainer = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    m_jbtnTables = new javax.swing.JButton();
    m_jbtnReceive = new javax.swing.JButton();
    m_jToolbar = new javax.swing.JPanel();
    m_jPanelList = new javax.swing.JPanel();
    jPanel1 = new javax.swing.JPanel();
    // m_jPanelTime = new javax.swing.JPanel();
    m_jFromDate = new javax.swing.JTextField();
    m_jFromDateButton = new javax.swing.JButton();
    m_jTillDate = new javax.swing.JTextField();
    m_jTillDateButton = new javax.swing.JButton();
    m_jPlacesAddButton = new javax.swing.JButton();
    m_jPlacesRemoveButton = new javax.swing.JButton();
    jLabelDateFrom = new javax.swing.JLabel();
    jLabelDateTill = new javax.swing.JLabel();
    jLabelCustomer = new javax.swing.JLabel();
    jLabelChairs = new javax.swing.JLabel();
    jLabelNotes = new javax.swing.JLabel();
    jLabelPlaces = new javax.swing.JLabel();
    m_jtxtDescription = new com.openbravo.editor.JEditorString();
    m_jtxtChairs = new com.openbravo.editor.JEditorIntegerPositive();
    txtCustomer = new com.openbravo.editor.JEditorString();
    jCustomerButton = new javax.swing.JButton();
    jPanel5 = new javax.swing.JPanel();
    m_jPlaces = new javax.swing.JTextArea();
    m_jKeys = new com.openbravo.editor.JEditorKeys(m_App);

    java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();

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

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

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

    m_jbtnTables.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/atlantikdesignersmall.png"))); // NOI18N
    m_jbtnTables.setText(AppLocal.getIntString("Button.Tables")); // NOI18N
    m_jbtnTables.setFocusPainted(false);
    m_jbtnTables.setFocusable(false);
    m_jbtnTables.setRequestFocusEnabled(false);
    m_jbtnTables.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            m_jbtnTablesActionPerformed(evt);
        }
    });
    jPanel4.add(m_jbtnTables);

    m_jbtnReceive.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/mime.png"))); // NOI18N
    m_jbtnReceive.setText(AppLocal.getIntString("button.receive")); // NOI18N
    m_jbtnReceive.setFocusPainted(false);
    m_jbtnReceive.setFocusable(false);
    m_jbtnReceive.setRequestFocusEnabled(false);
    m_jbtnReceive.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            m_jbtnReceiveActionPerformed(evt);
        }
    });
    jPanel4.add(m_jbtnReceive);

    m_jToolbarContainer.add(jPanel4, java.awt.BorderLayout.LINE_START);
    m_jToolbarContainer.add(m_jToolbar, java.awt.BorderLayout.CENTER);

    jPanel2.add(m_jToolbarContainer, java.awt.BorderLayout.NORTH);

    m_jPanelList.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
    m_jPanelList.setLayout(new java.awt.BorderLayout());
    m_jPanelList.setPreferredSize(new Dimension(screenSize.width / 2, screenSize.height));
    jPanel2.add(m_jPanelList, java.awt.BorderLayout.LINE_START);

    double size[][] = { { TableLayout.PREFERRED, TableLayout.FILL, TableLayout.PREFERRED }, // Columns
            { TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.FILL, TableLayout.PREFERRED,
                    TableLayout.PREFERRED, TableLayout.FILL, TableLayout.FILL } }; // Rows

    jPanel1.setLayout(new TableLayout(size));

    jLabelDateFrom.setText(AppLocal.getIntString("rest.label.dateFrom")); // NOI18N
    jPanel1.add(jLabelDateFrom, "0, 0");
    jPanel1.add(m_jFromDate, "1, 0");

    m_jFromDateButton
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/date.png")));
    m_jFromDateButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnDateStartActionPerformed(evt);
        }
    });
    jPanel1.add(m_jFromDateButton, new TableLayoutConstraints(2, 0, 2, 0, TableLayout.CENTER, TableLayout.TOP));

    jLabelDateTill.setText(AppLocal.getIntString("rest.label.dateTill")); // NOI18N
    jPanel1.add(jLabelDateTill, "0, 1");
    jPanel1.add(m_jTillDate, "1, 1");
    m_jTillDateButton
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/date.png")));
    m_jTillDateButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnDateEndActionPerformed(evt);
        }
    });
    jPanel1.add(m_jTillDateButton, new TableLayoutConstraints(2, 1, 2, 1, TableLayout.CENTER, TableLayout.TOP));

    jLabelCustomer.setText(AppLocal.getIntString("rest.label.customer")); // NOI18N
    jPanel1.add(jLabelCustomer, "0, 2");

    jPanel1.add(txtCustomer, "1, 2");

    jCustomerButton
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/kuser.png"))); // NOI18N
    jCustomerButton.setText(AppLocal.getIntString("Menu.Customers"));
    jCustomerButton.setFocusPainted(false);
    jCustomerButton.setFocusable(false);
    jCustomerButton.setRequestFocusEnabled(false);
    jCustomerButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButtonCustomerActionPerformed(evt);
        }
    });
    jPanel1.add(jCustomerButton, new TableLayoutConstraints(2, 2, 2, 2, TableLayout.CENTER, TableLayout.TOP));

    jLabelChairs.setText(AppLocal.getIntString("rest.label.chairs")); // NOI18N
    jPanel1.add(jLabelChairs, "0, 3");

    jPanel1.add(m_jtxtChairs, "1, 3");

    jLabelPlaces.setText(AppLocal.getIntString("rest.label.places")); // NOI18N
    jPanel1.add(jLabelPlaces, "0, 4");
    m_jPlaces.setWrapStyleWord(true);
    m_jPlaces.setLineWrap(true);
    jPanel1.add(m_jPlaces, "1, 4, 1, 5");

    m_jPlacesAddButton
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/btnplus.png")));
    m_jPlacesAddButton.setText(AppLocal.getIntString("rest.btn.tablesAdd"));
    m_jPlacesAddButton.setFocusPainted(false);
    m_jPlacesAddButton.setFocusable(false);
    m_jPlacesAddButton.setRequestFocusEnabled(false);
    m_jPlacesAddButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButtonPlacesAddActionPerformed(evt);
        }
    });
    jPanel1.add(m_jPlacesAddButton,
            new TableLayoutConstraints(2, 4, 2, 4, TableLayout.CENTER, TableLayout.TOP));

    m_jPlacesRemoveButton
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/btnminus.png")));
    m_jPlacesRemoveButton.setText(AppLocal.getIntString("rest.btn.tablesRemove"));
    m_jPlacesRemoveButton.setFocusPainted(false);
    m_jPlacesRemoveButton.setFocusable(false);
    m_jPlacesRemoveButton.setRequestFocusEnabled(false);
    m_jPlacesRemoveButton.setMargin(new Insets(10, 0, 0, 0));
    m_jPlacesRemoveButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButtonPlacesRemoveActionPerformed(evt);
        }
    });
    jPanel1.add(m_jPlacesRemoveButton,
            new TableLayoutConstraints(2, 5, 2, 5, TableLayout.CENTER, TableLayout.TOP));

    jLabelNotes.setText(AppLocal.getIntString("rest.label.notes")); // NOI18N
    jPanel1.add(jLabelNotes, "0, 6");

    jPanel1.add(m_jtxtDescription, "1, 6");

    jPanel2.add(jPanel1, java.awt.BorderLayout.CENTER);

    jPanel5.setLayout(new java.awt.BorderLayout());
    m_jKeys.setPreferredSize(new Dimension(0, 0));
    jPanel5.add(m_jKeys, java.awt.BorderLayout.NORTH);

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

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

From source file:com.xilinx.kintex7.MainScreen.java

private Container createContentPane() {
    JPanel contentPane = new JPanel();
    contentPane.setLayout(new BorderLayout());
    contentPane.setOpaque(true);/*  w  w  w . j a va 2 s.c o  m*/

    mainPanel = new JPanel(new BorderLayout());

    mainPanel.setBounds(0, 0, minWidth, minHeight);
    testPanel = new JPanel(new BorderLayout());

    testPanel.add(testAndStats(), BorderLayout.CENTER);

    mainPanel.add(testPanel, BorderLayout.LINE_START);

    //Make the center component big, since that's the
    //typical usage of BorderLayout.
    tabs = new JTabbedPane();

    mainPanel.add(tabs, BorderLayout.CENTER);

    tabs.add("System Monitor", pciInfo());
    tabs.add("Performance Plots", plotPanel());

    mainPanel.setOpaque(true);

    try {
        imagePanel = new ImageBackgroundPanel(blockDiagram, false);
    } catch (Exception e) {
    }
    /*imagePanel.setBorder(BorderFactory.createCompoundBorder(
                BorderFactory.createTitledBorder("Design Block Diagram"),
                BorderFactory.createEmptyBorder(5,5,5,5)));*/
    imagePanel.setBackground(Color.WHITE);
    imagePanel.setSize(minWidth, minHeight);

    imagePanel.setLocation(0, 0);
    imagePanel.setOpaque(true);

    final JLayeredPane layeredPane = new JLayeredPane();
    layeredPane.setPreferredSize(new Dimension(minWidth, minHeight));
    layeredPane.add(mainPanel, JLayeredPane.DEFAULT_LAYER, 0);
    layeredPane.add(imagePanel, JLayeredPane.DEFAULT_LAYER, 0);
    layeredPane.addComponentListener(new ComponentListener() {

        @Override
        public void componentResized(ComponentEvent ce) {
            mainPanel.setBounds(0, 0, Math.max(minWidth, layeredPane.getWidth()),
                    Math.max(minHeight, layeredPane.getHeight()));
            if (layeredPane.getWidth() > 1024) {
                tplotPanel.setPreferredSize(new Dimension(300, 100));
            } else {
                tplotPanel.setPreferredSize(new Dimension(200, 100));
            }
            imagePanel.setSize(mainPanel.getWidth(), mainPanel.getHeight());
            imagePanel.setLocation(0, 0);
            mainPanel.repaint();
        }

        @Override
        public void componentMoved(ComponentEvent ce) {
            //throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public void componentShown(ComponentEvent ce) {
            //throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public void componentHidden(ComponentEvent ce) {
            //throw new UnsupportedOperationException("Not supported yet.");
        }
    });
    // on top, but invisible initially
    imagePanel.setVisible(false);

    JPanel bpanel = new JPanel(new BorderLayout());

    final JButton button = new JButton(
            "<html><b>B<br>L<br>O<br>C<br>K<br> <br>D<br>I<br>A<br>G<br>R<br>A<br>M<br></b></html>");
    button.setToolTipText("Click here to see the block diagram");
    button.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent event) {
            adjustSelectionPanel();
        }
    });

    bpanel.add(button, BorderLayout.CENTER);

    contentPane.add(layeredPane, BorderLayout.CENTER);
    contentPane.add(button, BorderLayout.EAST);
    JLabel mLabel = new JLabel(modeText, JLabel.CENTER);
    mLabel.setFont(new Font(modeText, Font.BOLD, 15));
    contentPane.add(mLabel, BorderLayout.PAGE_START);
    return contentPane;
}

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);// w w w.jav a2 s . c om
    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:fr.pasteque.pos.sales.restaurant.JTicketsBagRestaurantMap.java

/** This method is called from within the constructor to
 * initialize the form.//w  w  w .  j a va2s  . 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() {

    m_jPanelMap = new javax.swing.JPanel();
    jPanel1 = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();
    m_jbtnReservations = new javax.swing.JButton();
    m_jbtnRefresh = new javax.swing.JButton();
    m_jText = new javax.swing.JLabel();

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

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

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

    jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

    m_jbtnReservations.setIcon(ImageLoader.readImageIcon("booking.png"));
    m_jbtnReservations.setText(AppLocal.getIntString("button.reservations"));
    m_jbtnReservations.setFocusPainted(false);
    m_jbtnReservations.setFocusable(false);
    m_jbtnReservations.setMargin(new java.awt.Insets(8, 14, 8, 14));
    m_jbtnReservations.setRequestFocusEnabled(false);
    m_jbtnReservations.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            m_jbtnReservationsActionPerformed(evt);
        }
    });
    //jPanel2.add(m_jbtnReservations);

    m_jbtnRefresh.setIcon(ImageLoader.readImageIcon("reload.png"));
    m_jbtnRefresh.setText(AppLocal.getIntString("button.reloadticket"));
    m_jbtnRefresh.setFocusPainted(false);
    m_jbtnRefresh.setFocusable(false);
    m_jbtnRefresh.setMargin(new java.awt.Insets(8, 14, 8, 14));
    m_jbtnRefresh.setRequestFocusEnabled(false);
    m_jbtnRefresh.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            m_jbtnRefreshActionPerformed(evt);
        }
    });
    jPanel2.add(m_jbtnRefresh);
    jPanel2.add(m_jText);

    jPanel1.add(jPanel2, java.awt.BorderLayout.LINE_START);

    m_jPanelMap.add(jPanel1, java.awt.BorderLayout.NORTH);

    add(m_jPanelMap, "map");
}

From source file:com.xilinx.virtex7.MainScreen.java

private Container createContentPane() {
    JPanel contentPane = new JPanel();
    contentPane.setLayout(new BorderLayout());
    contentPane.setOpaque(true);//w ww .j a va 2  s. c  o  m

    mainPanel = new JPanel(new BorderLayout());

    mainPanel.setBounds(0, 0, minWidth, minHeight);
    testPanel = new JPanel(new BorderLayout());
    ttabs = new JTabbedPane();
    ttabs.add("DATAPATH 0&1", testAndStats());

    if (mode == LandingPage.PERFORMANCE_MODE_RAW || mode == LandingPage.PERFORMANCE_MODE_RAW_DV
            || mode == LandingPage.APPLICATION_MODE || mode == LandingPage.APPLICATION_MODE_P2P) // condition for placing dynamic tabs. a kcah
        ttabs.add("DATAPATH 2&3", testAndStatsSecondTab());
    else
        testAndStatsSecondTab();

    testPanel.add(ttabs, BorderLayout.CENTER);
    testPanel.add(messageBox(), BorderLayout.PAGE_END);

    mainPanel.add(testPanel, BorderLayout.LINE_START);

    //Make the center component big, since that's the
    //typical usage of BorderLayout.
    tabs = new JTabbedPane();

    mainPanel.add(tabs, BorderLayout.CENTER);

    tabs.add("System Monitor", pciInfo());
    tabs.add("Performance Plots", plotPanel());

    mainPanel.setOpaque(true);

    try {
        imagePanel = new ImageBackgroundPanel(blockDiagram, false);
    } catch (Exception e) {
    }
    /*imagePanel.setBorder(BorderFactory.createCompoundBorder(
                BorderFactory.createTitledBorder("Design Block Diagram"),
                BorderFactory.createEmptyBorder(5,5,5,5)));*/
    imagePanel.setBackground(Color.WHITE);
    imagePanel.setSize(minWidth, minHeight);

    imagePanel.setLocation(0, 0);
    imagePanel.setOpaque(true);

    final JLayeredPane layeredPane = new JLayeredPane();
    layeredPane.setPreferredSize(new Dimension(minWidth, minHeight));
    layeredPane.add(mainPanel, JLayeredPane.DEFAULT_LAYER, 0);
    layeredPane.add(imagePanel, JLayeredPane.DEFAULT_LAYER, 0);
    layeredPane.addComponentListener(new ComponentListener() {

        @Override
        public void componentResized(ComponentEvent ce) {
            mainPanel.setBounds(0, 0, Math.max(minWidth, layeredPane.getWidth()),
                    Math.max(minHeight, layeredPane.getHeight()));
            if (layeredPane.getWidth() > 1024) {
                tplotPanel.setPreferredSize(new Dimension(300, 100));
            } else {
                tplotPanel.setPreferredSize(new Dimension(200, 100));
            }
            imagePanel.setSize(mainPanel.getWidth(), mainPanel.getHeight());
            imagePanel.setLocation(0, 0);
            mainPanel.repaint();
        }

        @Override
        public void componentMoved(ComponentEvent ce) {
            //throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public void componentShown(ComponentEvent ce) {
            //throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public void componentHidden(ComponentEvent ce) {
            //throw new UnsupportedOperationException("Not supported yet.");
        }
    });
    // on top, but invisible initially
    imagePanel.setVisible(false);

    JPanel bpanel = new JPanel(new BorderLayout());

    final JButton button = new JButton(
            "<html><b>B<br>L<br>O<br>C<br>K<br> <br>D<br>I<br>A<br>G<br>R<br>A<br>M<br></b></html>");
    button.setToolTipText("Click here to see the block diagram");
    button.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent event) {
            adjustSelectionPanel();
        }
    });

    bpanel.add(button, BorderLayout.CENTER);

    contentPane.add(layeredPane, BorderLayout.CENTER);
    contentPane.add(button, BorderLayout.EAST);
    JPanel panel = new JPanel(new BorderLayout());

    JLabel mLabel = new JLabel(modeText, JLabel.CENTER);
    mLabel.setFont(new Font(modeText, Font.BOLD, 15));
    panel.add(mLabel, BorderLayout.PAGE_START);

    JPanel ledPanel = new JPanel(new BorderLayout());

    JPanel iledPanel = new JPanel();
    iledPanel.setLayout(new BoxLayout(iledPanel, BoxLayout.X_AXIS));

    led_ddr3_1 = new JLabel("DDR3 0", new ImageIcon(led1), JLabel.CENTER);
    led_ddr3_2 = new JLabel("DDR3 1", new ImageIcon(led1), JLabel.CENTER);
    led_phy0 = new JLabel("PHY 0", new ImageIcon(led1), JLabel.CENTER);
    led_phy1 = new JLabel("PHY 1", new ImageIcon(led1), JLabel.CENTER);
    led_phy2 = new JLabel("PHY 2", new ImageIcon(led1), JLabel.CENTER);
    led_phy3 = new JLabel("PHY 3", new ImageIcon(led1), JLabel.CENTER);

    JPanel le1 = new JPanel(new BorderLayout());
    le1.add(led_ddr3_1, BorderLayout.CENTER);

    JPanel le2 = new JPanel(new BorderLayout());
    le2.add(led_ddr3_2, BorderLayout.CENTER);

    JPanel le3 = new JPanel(new BorderLayout());
    le3.add(led_phy0, BorderLayout.CENTER);

    JPanel le4 = new JPanel(new BorderLayout());
    le4.add(led_phy1, BorderLayout.CENTER);

    JPanel le5 = new JPanel(new BorderLayout());
    le5.add(led_phy2, BorderLayout.CENTER);

    JPanel le6 = new JPanel(new BorderLayout());
    le6.add(led_phy3, BorderLayout.CENTER);

    iledPanel.add(le1);
    iledPanel.add(le2);
    iledPanel.add(le3);
    iledPanel.add(le4);
    iledPanel.add(le5);
    iledPanel.add(le6);

    if (mode == LandingPage.PERFORMANCE_MODE_RAW || mode == LandingPage.PERFORMANCE_MODE_RAW_DV) {
        startAll_tooltip = "This will start tests on all data paths";
        startAlltests = new JButton("Start All");
        startAlltests.setToolTipText(startAll_tooltip);
        startAlltests.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent ae) {
                if (startAlltests.getText().equals("Start All")) {
                    startAll_tooltip = "This will stop tests on all data paths";
                    startAlltests.setToolTipText(startAll_tooltip);
                    // check whether any tests are already started
                    String message = "";
                    if (testStarted || testStarted1)
                        message = "Test(s) on Path 0&1 are running. Cannot do Start All";
                    if (testStarted2 || testStarted3) {
                        if (message.length() > 0) // test 1 and 0 are also running
                            message = "Test(s) on Path 0&1 and 2&3 are running. Cannot do Start All";
                        else
                            message = "Test(s) on Path 2&3 are running. Cannot do Start All";
                    }
                    if (message.length() > 0) {
                        JOptionPane.showMessageDialog(null, message, "Error", JOptionPane.ERROR_MESSAGE);
                    } else {
                        String ledsMsg = checkLedsState();
                        // condition to check the ddr and py leds are enable or not
                        if (ledsMsg.length() == 0) {
                            startAlltests.setEnabled(false);
                            startAlltests.setText("Stop All");

                            startTest.doClick();
                            stest.doClick();
                            s3test.doClick();
                            s4test.doClick();

                            // disable all buttons
                            startTest.setEnabled(false);
                            stest.setEnabled(false);
                            s3test.setEnabled(false);
                            s4test.setEnabled(false);

                            startAlltests.setEnabled(true);
                        } else {// shows alert when leds are disabled                                
                            JOptionPane.showMessageDialog(null, ledsMsg, "Error", JOptionPane.ERROR_MESSAGE);
                        }

                    }
                } else {
                    startAlltests.setEnabled(false);
                    startAll_tooltip = "This will start tests on all data paths";
                    startAlltests.setToolTipText(startAll_tooltip);
                    /*
                    startTest.setEnabled(true);
                    stest.setEnabled(true);
                    s3test.setEnabled(true);
                    s4test.setEnabled(true);
                            
                    s3test.doClick();
                    s4test.doClick();
                    startTest.doClick();
                    stest.doClick();
                    */
                    SwingWorker worker = new SwingWorker<Void, Void>() {
                        @Override
                        protected Void doInBackground() throws Exception {
                            try {
                                stopTest4();
                                s4test.setEnabled(false);
                                stopTest3();
                                s3test.setEnabled(false);
                                stopTest2();
                                stest.setEnabled(false);
                                stopTest1();
                                startTest.setEnabled(false);

                                startAlltests.setText("Start All");
                                startAlltests.setEnabled(true);
                                startTest.setEnabled(true);
                                stest.setEnabled(true);
                                s3test.setEnabled(true);
                                s4test.setEnabled(true);
                            } catch (Exception e) {
                                e.printStackTrace();
                            }
                            return null;
                        }

                    };
                    worker.execute();
                }
            }
        });
        iledPanel.add(startAlltests);
    }
    ledPanel.add(iledPanel, BorderLayout.CENTER);

    //tstats.add(ledPanel);
    panel.add(ledPanel, BorderLayout.CENTER);
    contentPane.add(panel, BorderLayout.PAGE_START);
    return contentPane;
}

From source file:wjhk.jupload2.policies.DefaultUploadPolicy.java

/**
 * @see wjhk.jupload2.policies.UploadPolicy#createProgressPanel(JProgressBar,
 *      JProgressBar, JButton, JButton, JUploadPanel)
 *//* ww w  .j a va 2 s  .co  m*/
public JPanel createProgressPanel(JProgressBar preparationProgressBar, JProgressBar uploadProgressBar,
        JButton uploadButton, JButton stopButton, JUploadPanel mainPanel) {

    // There may be two progress bar: one for preparation progress of files
    // (preparation before upload) and one to follow the actual upload.
    JPanel jProgressBarPanel = new JPanel();
    jProgressBarPanel.setLayout(new BorderLayout(10, 1));
    jProgressBarPanel.add(preparationProgressBar, BorderLayout.NORTH);
    jProgressBarPanel.add(uploadProgressBar, BorderLayout.SOUTH);

    JPanel jProgressPanel = new JPanel();
    jProgressPanel.setLayout(new BorderLayout(10, 0));
    jProgressPanel.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));
    jProgressPanel.add(uploadButton, BorderLayout.LINE_START);
    jProgressPanel.add(jProgressBarPanel, BorderLayout.CENTER);
    jProgressPanel.add(stopButton, BorderLayout.LINE_END);
    return jProgressPanel;
}

From source file:ru.spbspu.viewer.DataView.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 DataView Editor./*from  w w w  . j a v  a 2s . c  o  m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    jToolBar1 = new javax.swing.JToolBar();
    fileChooser = new javax.swing.JFileChooser();
    fftOrEnSpectrum = new javax.swing.ButtonGroup();
    scaling = new javax.swing.ButtonGroup();
    transformation = new javax.swing.ButtonGroup();
    v = new javax.swing.ButtonGroup();
    jFileChooser1 = new javax.swing.JFileChooser();
    refresh = new javax.swing.JButton();
    load = new javax.swing.JButton();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    controlPanel = new javax.swing.JPanel();
    frame = new javax.swing.JLabel();
    frameWidthInSecondsTextField = new javax.swing.JTextField();
    spinnerFrameWidth = new javax.swing.JSpinner();
    jLabel3 = new javax.swing.JLabel();
    spinnerDiscretization = new javax.swing.JSpinner();
    chosenFileTextField = new javax.swing.JTextField();
    autoscale = new javax.swing.JRadioButton();
    meanValue = new javax.swing.JRadioButton();
    maxValue = new javax.swing.JRadioButton();
    spectrogramPanel = new javax.swing.JPanel();
    window = new javax.swing.JLabel();
    spinnerWindowWidth = new javax.swing.JSpinner();
    spinnerLimitFreq = new javax.swing.JSpinner();
    jLabel5 = new javax.swing.JLabel();
    sliderSpectrogram = new javax.swing.JSlider();
    jLabel1 = new javax.swing.JLabel();
    fourier = new javax.swing.JRadioButton();
    wavelet = new javax.swing.JRadioButton();
    windowFunction = new javax.swing.JComboBox<>();
    llabelWindowFunction = new javax.swing.JLabel();
    testPanel = new javax.swing.JPanel();
    FourierTest = new javax.swing.JButton();
    WaveletTest = new javax.swing.JButton();
    jButton1 = new javax.swing.JButton();
    LPF = new javax.swing.JCheckBox();
    cropBeginningLabel = new javax.swing.JLabel();
    cropBeginningTextField = new javax.swing.JTextField();
    testDataPanel = new javax.swing.JPanel();
    ampl1Input = new javax.swing.JTextField();
    ampl2Input = new javax.swing.JTextField();
    ampl3Input = new javax.swing.JTextField();
    ampl1Label = new javax.swing.JLabel();
    ampl2Label = new javax.swing.JLabel();
    ampl3Label = new javax.swing.JLabel();
    freq1Label = new javax.swing.JLabel();
    freq2Label = new javax.swing.JLabel();
    freq3Label = new javax.swing.JLabel();
    freq1Input = new javax.swing.JTextField();
    freq2Input = new javax.swing.JTextField();
    freq3Input = new javax.swing.JTextField();
    discrLabel = new javax.swing.JLabel();
    discrInput = new javax.swing.JTextField();
    lengthInput = new javax.swing.JTextField();
    lengthLabel = new javax.swing.JLabel();
    middleWindow = new javax.swing.JPanel();
    showEnergySpectrum = new javax.swing.JRadioButton();
    vAcceleration = new javax.swing.JRadioButton();
    vDisplacement = new javax.swing.JRadioButton();
    jPanel4 = new javax.swing.JPanel();
    fileLengthSec = new javax.swing.JLabel();
    stop = new javax.swing.JButton();
    play = new javax.swing.JButton();
    positionInFileSec = new javax.swing.JLabel();
    fileLengthSecTextFiled = new javax.swing.JTextField();
    positionInFileSecTextField = new javax.swing.JTextField();
    seekSlider = new javax.swing.JSlider();
    jTabbedPane2 = new javax.swing.JTabbedPane();
    jPanel3 = new javax.swing.JPanel();
    jSplitPane1 = new javax.swing.JSplitPane();
    jPanel1 = new javax.swing.JPanel();
    jSplitPane3 = new javax.swing.JSplitPane();
    contrastSpectrogram = new javax.swing.JPanel();
    energy = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    spectrogram = new javax.swing.JPanel();
    labelForFrameScale = new javax.swing.JLabel();
    labelForFrameSpectr = new javax.swing.JLabel();
    cursor = new javax.swing.JProgressBar();
    jPanel6 = new javax.swing.JPanel();
    jSplitPane2 = new javax.swing.JSplitPane();
    fullEnergy = new javax.swing.JPanel();
    jScrollPane2 = new javax.swing.JScrollPane();
    fullSpectrogram = new javax.swing.JPanel();
    labelForFullSpectr = new javax.swing.JLabel();
    labelForFullScale = new javax.swing.JLabel();
    jMenuBar1 = new javax.swing.JMenuBar();
    fileMenu = new javax.swing.JMenu();
    openItem = new javax.swing.JMenuItem();
    sliderMenu = new javax.swing.JMenu();
    forward = new javax.swing.JMenuItem();
    backward = new javax.swing.JMenuItem();
    refreshItem = new javax.swing.JMenuItem();
    playItem = new javax.swing.JMenuItem();
    stopItem = new javax.swing.JMenuItem();

    jToolBar1.setRollover(true);

    fileChooser.setDialogTitle(" ");

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setLocationByPlatform(true);
    addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyPressed(java.awt.event.KeyEvent evt) {
            formKeyPressed(evt);
        }

        public void keyReleased(java.awt.event.KeyEvent evt) {
            formKeyReleased(evt);
        }
    });

    refresh.setText("");
    refresh.setEnabled(false);
    refresh.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            refreshActionPerformed(evt);
        }
    });

    load.setText("");
    load.setEnabled(false);
    load.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            loadActionPerformed(evt);
        }
    });

    jTabbedPane1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

    frame.setText("?  ?");

    frameWidthInSecondsTextField.setEnabled(false);
    frameWidthInSecondsTextField.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            frameWidthInSecondsTextFieldActionPerformed(evt);
        }
    });

    spinnerFrameWidth.setModel(new javax.swing.SpinnerNumberModel(8192, 256, 262144, 512));
    spinnerFrameWidth.setEnabled(false);
    spinnerFrameWidth.setOpaque(false);
    spinnerFrameWidth.setRequestFocusEnabled(false);
    spinnerFrameWidth.setValue(32768);
    spinnerFrameWidth.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            spinnerFrameWidthStateChanged(evt);
        }
    });

    jLabel3.setLabelFor(spinnerDiscretization);
    jLabel3.setText("? ?, ");

    spinnerDiscretization.setModel(new javax.swing.SpinnerNumberModel(5000, 1, 50000, 1000));
    spinnerDiscretization.setName(""); // NOI18N

    chosenFileTextField.setEnabled(false);
    chosenFileTextField.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            chosenFileTextFieldActionPerformed(evt);
        }
    });

    scaling.add(autoscale);
    autoscale.setSelected(true);
    autoscale.setText("??  ");
    autoscale.setActionCommand("auto");
    autoscale.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            autoscaleActionPerformed(evt);
        }
    });

    scaling.add(meanValue);
    meanValue.setText("?  ?");
    meanValue.setActionCommand("mean");
    meanValue.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            meanValueActionPerformed(evt);
        }
    });

    scaling.add(maxValue);
    maxValue.setText("?  ?");
    maxValue.setActionCommand("max");
    maxValue.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            maxValueActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout controlPanelLayout = new javax.swing.GroupLayout(controlPanel);
    controlPanel.setLayout(controlPanelLayout);
    controlPanelLayout.setHorizontalGroup(controlPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(controlPanelLayout.createSequentialGroup().addContainerGap().addGroup(controlPanelLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(controlPanelLayout.createSequentialGroup().addGroup(controlPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(frame)
                            .addGroup(controlPanelLayout.createSequentialGroup()
                                    .addComponent(spinnerFrameWidth, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18).addComponent(frameWidthInSecondsTextField,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 79,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGap(44, 44, 44)
                            .addGroup(controlPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel3).addComponent(spinnerDiscretization,
                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(10, 101, Short.MAX_VALUE))
                    .addGroup(controlPanelLayout.createSequentialGroup().addComponent(chosenFileTextField)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                    .addGroup(controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(meanValue).addComponent(autoscale).addComponent(maxValue))
                    .addGap(0, 224, Short.MAX_VALUE)));
    controlPanelLayout.setVerticalGroup(controlPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(controlPanelLayout.createSequentialGroup().addGap(2, 2, 2)
                    .addGroup(controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3).addComponent(frame).addComponent(autoscale))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(spinnerFrameWidth, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(spinnerDiscretization, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(frameWidthInSecondsTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(meanValue))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(maxValue).addComponent(chosenFileTextField,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jTabbedPane1.addTab("?? ", controlPanel);

    window.setLabelFor(spinnerWindowWidth);
    window.setText("");

    spinnerWindowWidth.setModel(new javax.swing.SpinnerNumberModel(128, 4, 8192, 128));
    spinnerWindowWidth.setEnabled(false);
    spinnerWindowWidth.setValue(256);

    spinnerLimitFreq.setModel(
            new SpinnerNumberModel(getSpinnerFreqLimit(), new Integer(5), new Integer(50000), new Integer(50)));
    spinnerLimitFreq.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            spinnerLimitFreqStateChanged(evt);
        }
    });

    jLabel5.setLabelFor(spinnerLimitFreq);
    jLabel5.setText("? ?");

    sliderSpectrogram.setValue(100);
    sliderSpectrogram.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            sliderSpectrogramStateChanged(evt);
        }
    });
    sliderSpectrogram.addFocusListener(new java.awt.event.FocusAdapter() {
        public void focusGained(java.awt.event.FocusEvent evt) {
            sliderSpectrogramFocusGained(evt);
        }
    });

    jLabel1.setLabelFor(sliderSpectrogram);
    jLabel1.setText("??");
    jLabel1.setToolTipText("");
    jLabel1.setName(""); // NOI18N

    transformation.add(fourier);
    fourier.setSelected(true);
    fourier.setText(" ");
    fourier.setActionCommand("fourier");

    transformation.add(wavelet);
    wavelet.setText(" ");
    wavelet.setActionCommand("wavelet");
    wavelet.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            waveletStateChanged(evt);
        }
    });

    windowFunction.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Hann", "Hamming" }));

    llabelWindowFunction.setLabelFor(windowFunction);
    llabelWindowFunction.setText("? ");

    javax.swing.GroupLayout spectrogramPanelLayout = new javax.swing.GroupLayout(spectrogramPanel);
    spectrogramPanel.setLayout(spectrogramPanelLayout);
    spectrogramPanelLayout.setHorizontalGroup(spectrogramPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(spectrogramPanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(spectrogramPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(spectrogramPanelLayout.createSequentialGroup()
                                    .addGroup(spectrogramPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(spinnerLimitFreq,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 110,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jLabel5))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addGroup(spectrogramPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(spinnerWindowWidth,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 120,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(window))
                                    .addGap(26, 26, 26)
                                    .addGroup(spectrogramPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(wavelet).addComponent(fourier))
                                    .addGap(43, 43, 43)
                                    .addGroup(spectrogramPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                                    false)
                                            .addComponent(llabelWindowFunction,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(windowFunction, 0,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                            .addGroup(spectrogramPanelLayout.createSequentialGroup().addComponent(jLabel1)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(sliderSpectrogram, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(430, Short.MAX_VALUE)));
    spectrogramPanelLayout.setVerticalGroup(spectrogramPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(spectrogramPanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(spectrogramPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(spectrogramPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(spectrogramPanelLayout.createSequentialGroup()
                                            .addGroup(spectrogramPanelLayout
                                                    .createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment.TRAILING)
                                                    .addGroup(spectrogramPanelLayout.createSequentialGroup()
                                                            .addComponent(window).addGap(5, 5, 5))
                                                    .addGroup(spectrogramPanelLayout.createSequentialGroup()
                                                            .addComponent(llabelWindowFunction).addPreferredGap(
                                                                    javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                                            .addGroup(spectrogramPanelLayout
                                                    .createParallelGroup(
                                                            javax.swing.GroupLayout.Alignment.TRAILING)
                                                    .addComponent(spinnerWindowWidth,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGroup(spectrogramPanelLayout
                                                            .createParallelGroup(
                                                                    javax.swing.GroupLayout.Alignment.BASELINE)
                                                            .addComponent(wavelet).addComponent(windowFunction,
                                                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                                    javax.swing.GroupLayout.PREFERRED_SIZE))))
                                    .addGroup(spectrogramPanelLayout.createSequentialGroup()
                                            .addComponent(jLabel5).addGap(5, 5, 5).addComponent(
                                                    spinnerLimitFreq, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(fourier))
                    .addGap(18, 18, 18)
                    .addGroup(spectrogramPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(spectrogramPanelLayout.createSequentialGroup().addComponent(jLabel1)
                                    .addGap(0, 0, Short.MAX_VALUE))
                            .addComponent(sliderSpectrogram, javax.swing.GroupLayout.PREFERRED_SIZE, 0,
                                    Short.MAX_VALUE))
                    .addContainerGap()));

    jTabbedPane1.addTab("?? ?", spectrogramPanel);

    FourierTest.setText("Fourire Test");
    FourierTest.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            FourierTestActionPerformed(evt);
        }
    });

    WaveletTest.setText("Wavelet Test");
    WaveletTest.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            WaveletTestActionPerformed(evt);
        }
    });

    jButton1.setText("jButton1");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
        }
    });

    LPF.setText(" ?");

    cropBeginningLabel.setText(" :");

    cropBeginningTextField.setText("jTextField1");

    javax.swing.GroupLayout testPanelLayout = new javax.swing.GroupLayout(testPanel);
    testPanel.setLayout(testPanelLayout);
    testPanelLayout.setHorizontalGroup(testPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(testPanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(testPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(FourierTest).addComponent(WaveletTest))
                    .addGap(31, 31, 31)
                    .addGroup(testPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(testPanelLayout.createSequentialGroup().addGap(133, 133, 133)
                                    .addComponent(cropBeginningLabel).addGap(3, 3, 3).addComponent(
                                            cropBeginningTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(testPanelLayout.createSequentialGroup().addComponent(jButton1)
                                    .addGap(65, 65, 65).addComponent(LPF)))
                    .addContainerGap(609, Short.MAX_VALUE)));
    testPanelLayout.setVerticalGroup(testPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(testPanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(testPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(FourierTest).addComponent(jButton1).addComponent(LPF))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(testPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(WaveletTest).addComponent(cropBeginningLabel)
                            .addComponent(cropBeginningTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(21, Short.MAX_VALUE)));

    jTabbedPane1.addTab("?", testPanel);

    ampl1Input.setText("10");

    ampl2Input.setText("20");

    ampl3Input.setText("30");

    ampl1Label.setText("?.1");

    ampl2Label.setText("?.2");

    ampl3Label.setText("?.3");

    freq1Label.setText("?.1");

    freq2Label.setText("?.2");

    freq3Label.setText("?.3");

    freq1Input.setText("100");

    freq2Input.setText("200");

    freq3Input.setText("300");

    discrLabel.setText("?.");

    discrInput.setText("5000");

    lengthInput.setText("131072");

    lengthLabel.setText("");

    javax.swing.GroupLayout testDataPanelLayout = new javax.swing.GroupLayout(testDataPanel);
    testDataPanel.setLayout(testDataPanelLayout);
    testDataPanelLayout.setHorizontalGroup(testDataPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(testDataPanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(testDataPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(ampl1Label).addComponent(ampl2Label).addComponent(ampl3Label))
                    .addGap(34, 34, 34)
                    .addGroup(testDataPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(ampl1Input, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(ampl2Input, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(ampl3Input, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(26, 26, 26)
                    .addGroup(testDataPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(testDataPanelLayout.createSequentialGroup().addComponent(freq3Label)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(freq3Input, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(testDataPanelLayout.createSequentialGroup().addGroup(testDataPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(testDataPanelLayout.createSequentialGroup()
                                            .addComponent(freq1Label)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(freq1Input, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(36, 36, 36).addComponent(discrLabel))
                                    .addGroup(testDataPanelLayout.createSequentialGroup()
                                            .addComponent(freq2Label)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(freq2Input, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(lengthLabel)))
                                    .addGap(18, 18, 18)
                                    .addGroup(testDataPanelLayout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lengthInput, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(discrInput, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addContainerGap(704, Short.MAX_VALUE)));
    testDataPanelLayout.setVerticalGroup(testDataPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(testDataPanelLayout.createSequentialGroup().addGap(6, 6, 6).addGroup(testDataPanelLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(ampl1Input, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ampl1Label).addComponent(freq1Label)
                    .addComponent(freq1Input, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(discrLabel).addComponent(discrInput, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                            testDataPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(ampl2Input, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(ampl2Label).addComponent(freq2Label)
                                    .addComponent(freq2Input, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lengthInput, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lengthLabel))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                            testDataPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(ampl3Input, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(ampl3Label).addComponent(freq3Label).addComponent(freq3Input,
                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jTabbedPane1.addTab("?", testDataPanel);

    v.add(showEnergySpectrum);
    showEnergySpectrum.setText("?");
    showEnergySpectrum.setActionCommand("energy");
    showEnergySpectrum.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            showEnergySpectrumStateChanged(evt);
        }
    });

    v.add(vAcceleration);
    vAcceleration.setText("?");
    vAcceleration.setActionCommand("accel");

    v.add(vDisplacement);
    vDisplacement.setSelected(true);
    vDisplacement.setText("?");
    vDisplacement.setActionCommand("displ");
    vDisplacement.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            vDisplacementStateChanged(evt);
        }
    });

    javax.swing.GroupLayout middleWindowLayout = new javax.swing.GroupLayout(middleWindow);
    middleWindow.setLayout(middleWindowLayout);
    middleWindowLayout.setHorizontalGroup(
            middleWindowLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(middleWindowLayout.createSequentialGroup().addContainerGap()
                            .addComponent(showEnergySpectrum)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(vDisplacement)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(vAcceleration).addContainerGap(697, Short.MAX_VALUE)));
    middleWindowLayout.setVerticalGroup(middleWindowLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(middleWindowLayout.createSequentialGroup().addContainerGap()
                    .addGroup(middleWindowLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(vDisplacement).addComponent(showEnergySpectrum)
                            .addComponent(vAcceleration))
                    .addContainerGap(67, Short.MAX_VALUE)));

    jTabbedPane1.addTab(".", middleWindow);

    jPanel4.setBorder(javax.swing.BorderFactory.createEtchedBorder());
    jPanel4.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

    fileLengthSec.setLabelFor(fileLengthSecTextFiled);
    fileLengthSec.setText(" , ?");
    jPanel4.add(fileLengthSec, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 10, -1, -1));

    stop.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ru/spbspu/viewer/stop.png"))); // NOI18N
    stop.setEnabled(false);
    stop.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            stopActionPerformed(evt);
        }
    });
    jPanel4.add(stop, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 20, 29, 32));

    play.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ru/spbspu/viewer/playPause.png"))); // NOI18N
    play.setEnabled(false);
    play.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            playActionPerformed(evt);
        }
    });
    jPanel4.add(play, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 80, 29, 32));

    positionInFileSec.setLabelFor(positionInFileSecTextField);
    positionInFileSec.setText("?  , ?");
    jPanel4.add(positionInFileSec, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 70, -1, -1));

    fileLengthSecTextFiled.setEnabled(false);
    jPanel4.add(fileLengthSecTextFiled, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 30, 90, -1));

    positionInFileSecTextField.setFont(new java.awt.Font("MS Reference Sans Serif", 0, 14)); // NOI18N
    positionInFileSecTextField.setCaretColor(new java.awt.Color(240, 240, 240));
    positionInFileSecTextField.setDisabledTextColor(new java.awt.Color(255, 153, 51));
    positionInFileSecTextField.setDoubleBuffered(true);
    positionInFileSecTextField.setEnabled(false);
    positionInFileSecTextField.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            positionInFileSecTextFieldActionPerformed(evt);
        }
    });
    jPanel4.add(positionInFileSecTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 90, 90, -1));

    seekSlider.setPaintLabels(true);
    seekSlider.setValue(0);
    seekSlider.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    seekSlider.setEnabled(false);
    seekSlider.addChangeListener(new javax.swing.event.ChangeListener() {
        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            seekSliderStateChanged(evt);
        }
    });
    seekSlider.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyPressed(java.awt.event.KeyEvent evt) {
            seekSliderKeyPressed(evt);
        }
    });

    jSplitPane1.setDividerLocation(150);
    jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
    jSplitPane1.setPreferredSize(new java.awt.Dimension(809, 150));

    jSplitPane3.setDividerLocation(75);
    jSplitPane3.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);

    contrastSpectrogram.setBackground(new java.awt.Color(204, 255, 204));
    contrastSpectrogram.setLayout(new java.awt.BorderLayout());
    jSplitPane3.setLeftComponent(contrastSpectrogram);

    energy.setBackground(new java.awt.Color(204, 255, 204));
    energy.setLayout(new java.awt.BorderLayout());
    jSplitPane3.setBottomComponent(energy);

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                    .addComponent(jSplitPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 1503, Short.MAX_VALUE)
                    .addGap(0, 0, 0)));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSplitPane3, javax.swing.GroupLayout.Alignment.TRAILING,
                    javax.swing.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE));

    jSplitPane1.setTopComponent(jPanel1);

    spectrogram.setBackground(new java.awt.Color(204, 255, 204));
    spectrogram.setEnabled(false);
    spectrogram.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            spectrogramMouseClicked(evt);
        }
    });
    spectrogram.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
        public void propertyChange(java.beans.PropertyChangeEvent evt) {
            spectrogramPropertyChange(evt);
        }
    });
    spectrogram.setLayout(new java.awt.GridBagLayout());

    labelForFrameScale.setMaximumSize(new java.awt.Dimension(40, 14));
    labelForFrameScale.setMinimumSize(new java.awt.Dimension(40, 14));
    labelForFrameScale.setPreferredSize(new java.awt.Dimension(65, 14));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
    spectrogram.add(labelForFrameScale, gridBagConstraints);

    labelForFrameSpectr.setEnabled(false);
    labelForFrameSpectr.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            labelForFrameSpectrMouseClicked(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    spectrogram.add(labelForFrameSpectr, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    spectrogram.add(cursor, gridBagConstraints);

    jScrollPane1.setViewportView(spectrogram);

    jSplitPane1.setBottomComponent(jScrollPane1);

    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout
            .setHorizontalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1503, Short.MAX_VALUE));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 354, Short.MAX_VALUE));

    jTabbedPane2.addTab("", jPanel3);

    jSplitPane2.setDividerLocation(200);
    jSplitPane2.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);

    fullEnergy.setLayout(new java.awt.BorderLayout());
    jSplitPane2.setLeftComponent(fullEnergy);

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

    labelForFullSpectr.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            labelForFullSpectrMouseClicked(evt);
        }
    });
    fullSpectrogram.add(labelForFullSpectr, java.awt.BorderLayout.CENTER);

    labelForFullScale.setMaximumSize(new java.awt.Dimension(35, 14));
    labelForFullScale.setMinimumSize(new java.awt.Dimension(35, 14));
    labelForFullScale.setPreferredSize(new java.awt.Dimension(65, 14));
    fullSpectrogram.add(labelForFullScale, java.awt.BorderLayout.LINE_START);

    jScrollPane2.setViewportView(fullSpectrogram);

    jSplitPane2.setRightComponent(jScrollPane2);

    javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
    jPanel6.setLayout(jPanel6Layout);
    jPanel6Layout.setHorizontalGroup(jPanel6Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 1503, Short.MAX_VALUE)
            .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSplitPane2)));
    jPanel6Layout.setVerticalGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 354, Short.MAX_VALUE).addGroup(jPanel6Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jSplitPane2)));

    jTabbedPane2.addTab("? ?", jPanel6);

    fileMenu.setText("");

    openItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O,
            java.awt.event.InputEvent.CTRL_MASK));
    openItem.setText("");
    openItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            openItemActionPerformed(evt);
        }
    });
    fileMenu.add(openItem);

    jMenuBar1.add(fileMenu);

    sliderMenu.setText("");
    sliderMenu.setEnabled(false);

    forward.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_RIGHT,
            java.awt.event.InputEvent.SHIFT_MASK));
    forward.setText("  ");
    forward.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            forwardActionPerformed(evt);
        }
    });
    sliderMenu.add(forward);

    backward.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_LEFT,
            java.awt.event.InputEvent.SHIFT_MASK));
    backward.setText("?  ");
    backward.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            backwardActionPerformed(evt);
        }
    });
    sliderMenu.add(backward);

    refreshItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, 0));
    refreshItem.setText("");
    refreshItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            refreshItemActionPerformed(evt);
        }
    });
    sliderMenu.add(refreshItem);

    playItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_SPACE, 0));
    playItem.setText("");
    playItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            playItemActionPerformed(evt);
        }
    });
    sliderMenu.add(playItem);

    stopItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, 0));
    stopItem.setText("");
    stopItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            stopItemActionPerformed(evt);
        }
    });
    sliderMenu.add(stopItem);

    jMenuBar1.add(sliderMenu);

    setJMenuBar(jMenuBar1);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(load, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(refresh, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 219,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0,
                                    Short.MAX_VALUE)
                            .addGap(80, 80, 80))
                    .addComponent(jTabbedPane2).addComponent(seekSlider, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))));

    layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { load, refresh });

    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup().addGap(31, 31, 31).addComponent(load)
                                    .addGap(18, 18, 18).addComponent(refresh))
                            .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 130,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 140,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jTabbedPane2)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(seekSlider, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)));

    layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { load, refresh });

    pack();
}