Example usage for javax.swing WindowConstants DISPOSE_ON_CLOSE

List of usage examples for javax.swing WindowConstants DISPOSE_ON_CLOSE

Introduction

In this page you can find the example usage for javax.swing WindowConstants DISPOSE_ON_CLOSE.

Prototype

int DISPOSE_ON_CLOSE

To view the source code for javax.swing WindowConstants DISPOSE_ON_CLOSE.

Click Source Link

Document

The dispose-window default window close operation.

Usage

From source file:com.stonelion.zooviewer.ui.JZVNodePanel.java

/**
 * Returns the 'Add child' action./*from  ww w.  java 2  s . c om*/
 *
 * @return the action
 */
@SuppressWarnings("serial")
private Action getAddChildAction() {
    if (addChildAction == null) {
        String actionCommand = bundle.getString(ADD_CHILD_NODE_KEY);
        String actionKey = bundle.getString(ADD_CHILD_NODE_KEY + ".action");
        addChildAction = new AbstractAction(actionCommand, Icons.ADD) {
            @Override
            public void actionPerformed(ActionEvent e) {
                System.out.println("actionPerformed(): action = " + e.getActionCommand());
                if (checkAction()) {
                    model.addNode(StringUtils.removeEnd(nodes[0].getPath(), "/") + "/" + childName,
                            childText.getBytes());
                }
                childName = childText = "";
            }

            private boolean checkAction() {
                JDialog dlg = createAddChildDialog();

                dlg.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
                dlg.setSize(800, 600);
                dlg.setLocationRelativeTo(null);
                dlg.setVisible(true);

                boolean nameIsEmpty = childName == null || childName.isEmpty();
                boolean dataIsEmpty = childText == null;
                return !nameIsEmpty && !dataIsEmpty;
            }
        };
        addChildAction.putValue(Action.ACTION_COMMAND_KEY, actionKey);
    }
    return this.addChildAction;
}

From source file:com.tiempometa.muestradatos.JReadTags.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY
    // //GEN-BEGIN:initComponents
    ResourceBundle bundle = ResourceBundle.getBundle("com.tiempometa.muestradatos.muestradatos");
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    label2 = new JLabel();
    nextBibTextField = new JTextField();
    statusLabel = new JLabel();
    startReadingButton = new JButton();
    bibLabel = new JLabel();
    scrollPane1 = new JScrollPane();
    tagReadTable = new JTable();
    label3 = new JLabel();
    tidTextField = new JTextField();
    deleteSelectedButton = new JButton();
    label4 = new JLabel();
    epcTextField = new JTextField();
    deleteReadButton = new JButton();
    label1 = new JLabel();
    dataToStoreComboBox = new JComboBox<>();
    deleteAllButton = new JButton();
    allowDuplicateBibsCheckBox = new JCheckBox();
    buttonBar = new JPanel();
    closeButton = new JButton();
    CellConstraints cc = new CellConstraints();

    //======== this ========
    setTitle(bundle.getString("JReadTags.this.title"));
    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    setResizable(false);/*from ww w  . ja v  a2 s  . co  m*/
    setIconImage(
            new ImageIcon(getClass().getResource("/com/tiempometa/resources/tiempometa_icon_large_alpha.png"))
                    .getImage());
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {
        dialogPane.setBorder(Borders.DIALOG_BORDER);
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setLayout(new FormLayout(
                    new ColumnSpec[] { new ColumnSpec(Sizes.dluX(15)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            new ColumnSpec(Sizes.dluX(52)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            new ColumnSpec(Sizes.dluX(138)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            new ColumnSpec(Sizes.dluX(71)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
                            new ColumnSpec(Sizes.dluX(155)) },
                    new RowSpec[] { new RowSpec(Sizes.dluY(17)), FormFactory.LINE_GAP_ROWSPEC,
                            new RowSpec(Sizes.dluY(20)), FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            new RowSpec(Sizes.dluY(20)), FormFactory.LINE_GAP_ROWSPEC,
                            new RowSpec(Sizes.dluY(25)), FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC,
                            FormFactory.DEFAULT_ROWSPEC }));

            //---- label2 ----
            label2.setText(bundle.getString("JReadTags.label2.text"));
            label2.setFont(new Font("Tahoma", Font.PLAIN, 36));
            contentPanel.add(label2, cc.xywh(3, 5, 3, 1));

            //---- nextBibTextField ----
            nextBibTextField.setFont(new Font("Tahoma", Font.PLAIN, 36));
            nextBibTextField.setHorizontalAlignment(SwingConstants.RIGHT);
            nextBibTextField.setText(bundle.getString("JReadTags.nextBibTextField.text"));
            contentPanel.add(nextBibTextField, cc.xy(7, 5));

            //---- statusLabel ----
            statusLabel.setText(bundle.getString("JReadTags.statusLabel.text"));
            statusLabel.setHorizontalAlignment(SwingConstants.CENTER);
            statusLabel.setBackground(Color.yellow);
            statusLabel.setOpaque(true);
            statusLabel.setFont(new Font("Tahoma", Font.BOLD, 20));
            contentPanel.add(statusLabel, cc.xywh(9, 3, 1, 5));

            //---- startReadingButton ----
            startReadingButton.setText(bundle.getString("JReadTags.startReadingButton.text"));
            startReadingButton.setFont(new Font("Tahoma", Font.PLAIN, 14));
            startReadingButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    startReadingButtonActionPerformed(e);
                }
            });
            contentPanel.add(startReadingButton, cc.xywh(3, 7, 3, 1));

            //---- bibLabel ----
            bibLabel.setForeground(Color.red);
            bibLabel.setFont(new Font("Tahoma", Font.BOLD, 36));
            bibLabel.setHorizontalAlignment(SwingConstants.CENTER);
            contentPanel.add(bibLabel, cc.xy(9, 9));

            //======== scrollPane1 ========
            {
                scrollPane1.setViewportView(tagReadTable);
            }
            contentPanel.add(scrollPane1, cc.xywh(3, 11, 7, 1));

            //---- label3 ----
            label3.setText(bundle.getString("JReadTags.label3.text"));
            label3.setHorizontalAlignment(SwingConstants.RIGHT);
            label3.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(label3, cc.xy(3, 13));

            //---- tidTextField ----
            tidTextField.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(tidTextField, cc.xy(5, 13));

            //---- deleteSelectedButton ----
            deleteSelectedButton.setText(bundle.getString("JReadTags.deleteSelectedButton.text"));
            deleteSelectedButton.setFont(new Font("Tahoma", Font.PLAIN, 14));
            deleteSelectedButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    deleteSelectedButtonActionPerformed(e);
                }
            });
            contentPanel.add(deleteSelectedButton, cc.xy(9, 13));

            //---- label4 ----
            label4.setText(bundle.getString("JReadTags.label4.text"));
            label4.setHorizontalAlignment(SwingConstants.RIGHT);
            label4.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(label4, cc.xy(3, 15));

            //---- epcTextField ----
            epcTextField.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(epcTextField, cc.xy(5, 15));

            //---- deleteReadButton ----
            deleteReadButton.setText(bundle.getString("JReadTags.deleteReadButton.text"));
            deleteReadButton.setFont(new Font("Tahoma", Font.PLAIN, 14));
            deleteReadButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    deleteReadButtonActionPerformed(e);
                }
            });
            contentPanel.add(deleteReadButton, cc.xy(9, 15));

            //---- label1 ----
            label1.setText(bundle.getString("JReadTags.label1.text"));
            label1.setHorizontalAlignment(SwingConstants.RIGHT);
            label1.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(label1, cc.xy(3, 17));

            //---- dataToStoreComboBox ----
            dataToStoreComboBox.setModel(new DefaultComboBoxModel<>(new String[] { "EPC", "TID" }));
            dataToStoreComboBox.setFont(new Font("Tahoma", Font.PLAIN, 14));
            contentPanel.add(dataToStoreComboBox, cc.xy(5, 17));

            //---- deleteAllButton ----
            deleteAllButton.setText(bundle.getString("JReadTags.deleteAllButton.text"));
            deleteAllButton.setFont(new Font("Tahoma", Font.PLAIN, 14));
            deleteAllButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    deleteAllButtonActionPerformed(e);
                }
            });
            contentPanel.add(deleteAllButton, cc.xy(9, 17));

            //---- allowDuplicateBibsCheckBox ----
            allowDuplicateBibsCheckBox.setText(bundle.getString("JReadTags.allowDuplicateBibsCheckBox.text"));
            contentPanel.add(allowDuplicateBibsCheckBox, cc.xy(5, 19));
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);

        //======== buttonBar ========
        {
            buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER);
            buttonBar.setLayout(
                    new FormLayout(new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC },
                            RowSpec.decodeSpecs("pref")));

            //---- closeButton ----
            closeButton.setText("Cerrar");
            closeButton.setFont(new Font("Tahoma", Font.PLAIN, 14));
            closeButton.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    closeButtonActionPerformed(e);
                }
            });
            buttonBar.add(closeButton, cc.xy(2, 1));
        }
        dialogPane.add(buttonBar, BorderLayout.SOUTH);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    setSize(710, 675);
    setLocationRelativeTo(getOwner());
    // //GEN-END:initComponents
}

From source file:omr.glyph.ui.TextAreaBrowser.java

private void showHistogram(TextArea area, Oriented orientation) {
    int[] histo = area.getHistogram(orientation);
    boolean vertical = orientation.isVertical();
    Rectangle rect = area.getAbsoluteContour();

    // Projection data
    XYSeries dataSeries = new XYSeries("Foreground Pixels");
    int offset = vertical ? rect.x : rect.y;

    for (int i = 0; i < histo.length; i++) {
        if (vertical) {
            dataSeries.add(offset + i, histo[i]);
        } else {/*from  ww w.j av a 2 s  . co  m*/
            dataSeries.add(i - offset - histo.length + 1, histo[histo.length - 1 - i]);
        }
    }

    XYSeriesCollection dataset = new XYSeriesCollection();
    dataset.addSeries(dataSeries);

    // Chart
    JFreeChart chart;

    if (vertical) {
        chart = ChartFactory.createXYAreaChart("Vertical Projections", // Title
                "Abscissa", "Cumulated Pixels", dataset, // Dataset
                PlotOrientation.VERTICAL, // orientation,
                false, // Show legend
                false, // Show tool tips
                false // urls
        );
    } else {
        // Thresholds
        addLine(dataset, area, "Base", area.getBaseline());
        addLine(dataset, area, "Median", area.getMedianLine());
        addLine(dataset, area, "Top", area.getTopline());

        chart = ChartFactory.createXYLineChart(
                "Horizontal Projections top:" + area.getTopline() + " median:" + area.getMedianLine() + " base:"
                        + area.getBaseline(), // Title
                "Ordinate", "Cumulated Pixels", dataset, // Dataset
                PlotOrientation.HORIZONTAL, // orientation,
                true, // Show legend
                true, // Show tool tips
                false // urls
        );
    }

    // Hosting frame
    ChartFrame frame = new ChartFrame("Histogram of " + rect, chart, true);
    frame.pack();
    frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    RefineryUtilities.centerFrameOnScreen(frame);
    frame.setVisible(true);
}

From source file:org.pf.midea.MainUI.java

private void menuItemAboutActionPerformed(ActionEvent e) {
    JFrame about = new JFrame(" ");
    about.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    JPanel nestedPanel = new JPanel();
    nestedPanel.setLayout(new GridLayout(17, 1));
    nestedPanel/*from  ww  w. java2  s. c o m*/
            .add(new JLabel("? ? ?"));
    nestedPanel.add(new JLabel("?  ?"));
    nestedPanel.add(new JLabel("  ?"));
    nestedPanel.add(new JLabel(""));
    nestedPanel.add(new JLabel(" . . ?, 20072013"));
    nestedPanel.add(new JLabel(" ?  ? "));
    nestedPanel.add(new JLabel(""));
    nestedPanel.add(new JLabel("   ???"));
    nestedPanel.add(new JLabel(
            "   ?   ? 4.2."));
    nestedPanel.add(new JLabel(
            "   ?  ??"));
    nestedPanel.add(new JLabel("  COPYING (???  )."));
    nestedPanel.add(new JLabel(""));
    nestedPanel.add(new JLabel(
            "?  ? ??  ?:"));
    JLabel labelMail = new JLabel(
            "<html><a href=\"mailto:oleksandr@natalenko.name\">oleksandr@natalenko.name</a></html>");
    labelMail.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseClicked(MouseEvent e) {
            try {
                Desktop.getDesktop()
                        .mail(new URI("mailto:oleksandr@natalenko.name?subject=" + URLEncoder.encode(
                                "? ? ?",
                                "UTF-8")));
            } catch (URISyntaxException | IOException ex) {
                ex.printStackTrace();
            }
        }
    });
    nestedPanel.add(labelMail);
    nestedPanel.add(new JLabel(""));
    nestedPanel.add(new JLabel("-? :"));
    JLabel labelURL = new JLabel("<html><a href=\"http://natalenko.name/\">http://natalenko.name/</a></html>");
    labelURL.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseClicked(MouseEvent e) {
            try {
                Desktop.getDesktop().browse(new URI("http://natalenko.name/"));
            } catch (URISyntaxException | IOException ex) {
                ex.printStackTrace();
            }
        }
    });
    nestedPanel.add(labelURL);
    about.add(nestedPanel);
    about.pack();
    about.setLocationRelativeTo(null);
    about.setVisible(true);
}

From source file:edu.pdi2.visual.PDI.java

private void initGUI() {
    try {//from w ww  .  j  a v a2  s .c  om
        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        getContentPane().setLayout(null);

        this.setTitle("Procesamiento Digital de Imagenes"); //$NON-NLS-1$
        getContentPane().setBackground(new java.awt.Color(212, 208, 200));
        this.setResizable(false);
        this.addFocusListener(new FocusAdapter() {
            public void focusGained(FocusEvent evt) {
                thisFocusGained(evt);
            }
        });
        {
            jMenuBar1 = new JMenuBar();
            setJMenuBar(jMenuBar1);
            {
                jMenu1 = new JMenu();
                jMenuBar1.add(jMenu1);
                jMenu1.setText("File"); //$NON-NLS-1$
                {
                    jMenuItem1 = new JMenuItem();
                    // jMenu1.add(jMenuItem1);
                    jMenu1.add(getJMenuOpenImage());
                    jMenu1.add(getJSeparator1());
                    jMenu1.add(getJMenuItemExit());

                    jMenuItem1.setText("Open Image"); //$NON-NLS-1$
                    jMenuItem1.addMouseListener(new MouseAdapter() {
                        public void mouseReleased(MouseEvent evt) {
                            jMenuItem1MouseReleased(evt);
                        }

                    });
                }
            }
            {
                jMenu3 = new JMenu();
                jMenuBar1.add(jMenu3);
                jMenuBar1.add(getJMenuView());
                jMenu3.setText("Options"); //$NON-NLS-1$
                jMenu3.setEnabled(false);
                {
                    jMenuItem3 = new JMenuItem();
                    jMenu3.add(getJMenuItem2());
                    jMenu3.add(jMenuItem3);
                    jMenuItem3.setText("False Color Image"); //$NON-NLS-1$
                    jMenuItem3.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            menuFalseColorActionPerformed(evt);
                        }
                    });
                }
                {
                    jMenuItem4 = new JMenuItem();
                    jMenu3.add(jMenuItem4);
                    jMenuItem4.setText("Mesh"); //$NON-NLS-1$
                    jMenuItem4.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                            jMenuItem4ActionPerformed(evt);
                        }
                    });
                }
                {
                    jMenu4 = new JMenu();
                    jMenu3.add(jMenu4);
                    jMenu3.add(getJMenuItem5());
                    jMenu3.add(getJGenerarSignature());
                    jMenu4.setText("Image"); //$NON-NLS-1$
                    {
                        jmiCorrectedReflectance = new JMenuItem();
                        jMenu4.add(jmiCorrectedReflectance);
                        jmiCorrectedReflectance.setText("Corrected Reflectance"); //$NON-NLS-1$
                        jmiCorrectedReflectance.setAccelerator(KeyStroke.getKeyStroke("ctrl pressed 1")); //$NON-NLS-1$
                        jmiCorrectedReflectance.addActionListener(new ActionListener() {
                            public void actionPerformed(ActionEvent evt) {
                                jmiCorrectedRadianceActionPerformed(evt);
                            }
                        });
                    }
                    {
                        jmiCorrectedRadiance = new JMenuItem();
                        jMenu4.add(jmiCorrectedRadiance);
                        jmiCorrectedRadiance.setText("Corrected Radiance"); //$NON-NLS-1$
                        jmiCorrectedRadiance.setAccelerator(KeyStroke.getKeyStroke("ctrl pressed 2"));
                        jmiCorrectedRadiance.addActionListener(new ActionListener() {
                            public void actionPerformed(ActionEvent evt) {
                                jmiCorrectedReflectanceActionPerformed(evt);
                            }
                        });
                    }
                }
            }
        }
        // First we create the instance of DisplayThumbnail with a 0.1
        // scale.
        // dt.setBorder(BorderFactory.createTitledBorder(""));
        // We must register mouse motion listeners to it !

        // Now we create the instance of DisplayJAI to show the region
        // corresponding to the viewport.

        // Set it size.
        {
            image = new JPanel();

            getContentPane().add(image);
            image.setBounds(1, 10, 590, dHeight + 10);
            {
                dj = new DisplayJAIWithAnnotations();
                image.add(dj);
                dj.setBounds(0, 0, dWidth, dHeight);
                dj.setPreferredSize(new Dimension(dWidth, dHeight));
                dj.setMinimumSize(new Dimension(dWidth, dHeight));
                dj.setMaximumSize(new Dimension(dWidth, dHeight));
                dj.setBorder(BorderFactory.createTitledBorder(""));
                dj.addMouseListener(new MouseAdapter() {
                    public void mousePressed(MouseEvent evt) {
                        djMousePressed(evt);
                    }
                });
                dj.addMouseMotionListener(new MouseMotionAdapter() {
                    public void mouseMoved(MouseEvent evt) {
                        djMouseMoved(evt);
                    }

                    public void mouseDragged(MouseEvent evt) {
                        djMouseDragged(evt);
                    }
                });
            }
            getContentPane().add(getLatLon());
        }

        pack();
        this.setSize(604, 579);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

From source file:eu.ggnet.dwoss.stock.CommissioningManagerView.java

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

    unitIdLabel = new javax.swing.JLabel();
    unitIdTextField = new javax.swing.JTextField();
    jScrollPane1 = new javax.swing.JScrollPane();
    unitsList = new javax.swing.JList();
    jScrollPane2 = new javax.swing.JScrollPane();
    transactionList = new javax.swing.JList();
    cancelButton = new javax.swing.JButton();
    done2Button = new javax.swing.JButton();
    detailButton = new javax.swing.JButton();
    failButton = new javax.swing.JButton();
    done1Button = new javax.swing.JButton();
    confirmButton = new javax.swing.JButton();
    jScrollPane4 = new javax.swing.JScrollPane();
    statusTextPane = new javax.swing.JTextPane();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Kommissionsmanager");

    unitIdLabel.setText("UnitId:");

    unitIdTextField.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            unitIdTextFieldActionPerformed(evt);
        }
    });

    jScrollPane1.setViewportView(unitsList);

    jScrollPane2.setViewportView(transactionList);

    cancelButton.setText("Abbrechen");
    cancelButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cancelButtonActionPerformed(evt);
        }
    });

    done2Button.setText("Authentifiziere User 2");
    done2Button.setEnabled(false);
    done2Button.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            done2ButtonActionPerformed(evt);
        }
    });

    detailButton.setText("Details");
    detailButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            detailButtonActionPerformed(evt);
        }
    });

    failButton.setText("Fail Transaktion");
    failButton.setEnabled(false);

    done1Button.setText("Authentifiziere User 1");
    done1Button.setEnabled(false);
    done1Button.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            done1ButtonActionPerformed(evt);
        }
    });

    confirmButton.setFont(confirmButton.getFont());
    confirmButton.setText("Statusnderung durchfhren");
    confirmButton.setEnabled(false);
    confirmButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            confirmButtonActionPerformed(evt);
        }
    });

    statusTextPane.setContentType("text/html"); // NOI18N
    jScrollPane4.setViewportView(statusTextPane);

    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.TRAILING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING,
                            javax.swing.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING,
                            layout.createSequentialGroup().addComponent(unitIdLabel)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(unitIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 162,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jScrollPane4)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 243,
                                    Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(failButton, javax.swing.GroupLayout.PREFERRED_SIZE, 119,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addGroup(layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                                    false)
                                            .addComponent(detailButton,
                                                    javax.swing.GroupLayout.Alignment.TRAILING,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(cancelButton,
                                                    javax.swing.GroupLayout.Alignment.TRAILING,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                            .addComponent(done2Button, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(confirmButton, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(done1Button, javax.swing.GroupLayout.Alignment.LEADING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addGap(15, 15, 15)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 154,
                                    Short.MAX_VALUE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(detailButton).addComponent(failButton))
                            .addGap(31, 31, 31)
                            .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 124,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(done1Button)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(done2Button, javax.swing.GroupLayout.PREFERRED_SIZE, 29,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(confirmButton)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(cancelButton))
                    .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(unitIdLabel).addComponent(unitIdTextField,
                                            javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(
                                    jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 479, Short.MAX_VALUE)))
                    .addContainerGap()));

    pack();
}

From source file:biz.wolschon.finance.jgnucash.accountProperties.AccountProperties.java

/**
 * {@inheritDoc}/*from  w w  w .  j a v a 2s  . c  o  m*/
 */
@Override
public void actionPerformed(final ActionEvent aE) {
    JPanel newPanel = new JPanel(new GridLayout(2, 2));

    newPanel.add(new JLabel("GUID:"));
    final JTextField disabledIDInput = new JTextField(myAccount.getId());
    final JPopupMenu accountIDPopupMenu = createAccountIDPopupMenu();
    disabledIDInput.setEditable(false);
    disabledIDInput.addMouseListener(new MouseAdapter() {

        @Override
        public void mouseReleased(final MouseEvent arg0) {
            if (arg0.isPopupTrigger()) {
                accountIDPopupMenu.show(disabledIDInput, arg0.getX(), arg0.getY());
            }
        }

        @Override
        public void mousePressed(final MouseEvent arg0) {
            if (arg0.isPopupTrigger()) {
                accountIDPopupMenu.show(disabledIDInput, arg0.getX(), arg0.getY());
            }
        }

    });
    newPanel.add(disabledIDInput);

    newPanel.add(new JLabel("name:"));
    final JTextField nameInput = new JTextField(myAccount.getName());
    nameInput.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(final ActionEvent aE) {
            myAccount.setName(nameInput.getText());
        }

    });
    newPanel.add(nameInput);

    myFrame = new JFrame(myAccount.getName());
    myFrame.getContentPane().setLayout(new BorderLayout());
    myFrame.getContentPane().add(newPanel, BorderLayout.NORTH);
    myFrame.getContentPane().add(getButtonsPanel(), BorderLayout.SOUTH);

    myFrame.getContentPane().add(getMySettingsPanel(), BorderLayout.CENTER);
    myFrame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    myFrame.pack();
    myFrame.setVisible(true);
}

From source file:de.mpg.mpi_inf.bioinf.netanalyzer.ui.SaveChartDialog.java

/**
 * Creates and lays out the controls inside this dialog's content pane.
 * <p>//from  w ww.j  a v  a  2s .c  o m
 * This method is called upon initialization only.
 * </p>
 */
private void initControls() {
    JPanel sizePanel = new JPanel(new GridLayout(2, 3, 4, 4));
    sizePanel.setBorder(BorderFactory.createTitledBorder(Messages.DI_IMAGESIZE));

    // Add a spinner for choosing width
    sizePanel.add(new JLabel(Messages.DI_WIDTH, SwingConstants.RIGHT));
    int width = ChartPanel.DEFAULT_WIDTH;
    int minWidth = ChartPanel.DEFAULT_MINIMUM_DRAW_WIDTH;
    int maxWidth = ChartPanel.DEFAULT_MAXIMUM_DRAW_WIDTH;
    SpinnerModel widthSettings = new SpinnerNumberModel(width, minWidth, maxWidth, 1);
    sizePanel.add(widthSpinner = new JSpinner(widthSettings));
    sizePanel.add(new JLabel(Messages.DI_PIXELS));

    // Add a spinner for choosing height
    sizePanel.add(new JLabel(Messages.DI_HEIGHT, SwingConstants.RIGHT));
    int height = ChartPanel.DEFAULT_HEIGHT;
    int minHeight = ChartPanel.DEFAULT_MINIMUM_DRAW_HEIGHT;
    int maxHeight = ChartPanel.DEFAULT_MAXIMUM_DRAW_HEIGHT;
    SpinnerModel heightSettings = new SpinnerNumberModel(height, minHeight, maxHeight, 1);
    sizePanel.add(heightSpinner = new JSpinner(heightSettings));
    sizePanel.add(new JLabel(Messages.DI_PIXELS));

    // Add Save and Cancel buttons
    JPanel buttons = new JPanel(new GridLayout(1, 2, 4, 0));
    buttons.add(btnSave = Utils.createButton(Messages.DI_SAVE, null, this));
    buttons.add(btnCancel = Utils.createButton(Messages.DI_CANCEL, null, this));
    Box buttonsBox = Box.createHorizontalBox();
    buttonsBox.add(Box.createHorizontalGlue());
    buttonsBox.add(buttons);
    buttonsBox.add(Box.createHorizontalGlue());

    Container contentPane = getContentPane();
    contentPane.add(sizePanel, BorderLayout.NORTH);
    contentPane.add(Box.createVerticalStrut(Utils.BORDER_SIZE / 2));
    contentPane.add(buttonsBox, BorderLayout.PAGE_END);
    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    Utils.setStandardBorder(getRootPane());
}

From source file:org.broad.igv.util.stats.KMPlotFrame.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    dialogPane = new JPanel();
    contentPanel = new JPanel();
    panel1 = new JPanel();
    panel2 = new JPanel();
    label2 = new JLabel();
    survivalColumnControl = new JComboBox();
    panel3 = new JPanel();
    label3 = new JLabel();
    censurColumnControl = new JComboBox();
    panel4 = new JPanel();
    label4 = new JLabel();
    groupByControl = new JComboBox();

    //======== this ========
    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Kaplan-Meier Plot");
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    //======== dialogPane ========
    {/*from  w  w w .j  av  a 2s.co m*/
        dialogPane.setBorder(new EmptyBorder(12, 12, 12, 12));
        dialogPane.setLayout(new BorderLayout());

        //======== contentPanel ========
        {
            contentPanel.setLayout(new BorderLayout());

            //======== panel1 ========
            {
                panel1.setAlignmentX(0.0F);
                panel1.setLayout(new BoxLayout(panel1, BoxLayout.Y_AXIS));

                //======== panel2 ========
                {
                    panel2.setAlignmentX(1.0F);
                    panel2.setLayout(null);

                    //---- label2 ----
                    label2.setText("Survival column");
                    panel2.add(label2);
                    label2.setBounds(new Rectangle(new Point(5, 10), label2.getPreferredSize()));

                    //---- survivalColumnControl ----
                    survivalColumnControl.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            survivalColumnControlActionPerformed(e);
                        }
                    });
                    panel2.add(survivalColumnControl);
                    survivalColumnControl.setBounds(120, 5, 235,
                            survivalColumnControl.getPreferredSize().height);

                    { // compute preferred size
                        Dimension preferredSize = new Dimension();
                        for (int i = 0; i < panel2.getComponentCount(); i++) {
                            Rectangle bounds = panel2.getComponent(i).getBounds();
                            preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                            preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
                        }
                        Insets insets = panel2.getInsets();
                        preferredSize.width += insets.right;
                        preferredSize.height += insets.bottom;
                        panel2.setMinimumSize(preferredSize);
                        panel2.setPreferredSize(preferredSize);
                    }
                }
                panel1.add(panel2);

                //======== panel3 ========
                {
                    panel3.setAlignmentX(1.0F);
                    panel3.setLayout(null);

                    //---- label3 ----
                    label3.setText("Censure column");
                    panel3.add(label3);
                    label3.setBounds(new Rectangle(new Point(5, 10), label3.getPreferredSize()));

                    //---- censurColumnControl ----
                    censurColumnControl.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            survivalColumnControlActionPerformed(e);
                        }
                    });
                    panel3.add(censurColumnControl);
                    censurColumnControl.setBounds(120, 5, 235, censurColumnControl.getPreferredSize().height);

                    { // compute preferred size
                        Dimension preferredSize = new Dimension();
                        for (int i = 0; i < panel3.getComponentCount(); i++) {
                            Rectangle bounds = panel3.getComponent(i).getBounds();
                            preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                            preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
                        }
                        Insets insets = panel3.getInsets();
                        preferredSize.width += insets.right;
                        preferredSize.height += insets.bottom;
                        panel3.setMinimumSize(preferredSize);
                        panel3.setPreferredSize(preferredSize);
                    }
                }
                panel1.add(panel3);

                //======== panel4 ========
                {
                    panel4.setAlignmentX(1.0F);
                    panel4.setLayout(null);

                    //---- label4 ----
                    label4.setText("Group by");
                    panel4.add(label4);
                    label4.setBounds(new Rectangle(new Point(5, 10), label4.getPreferredSize()));

                    //---- groupByControl ----
                    groupByControl.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            survivalColumnControlActionPerformed(e);
                        }
                    });
                    panel4.add(groupByControl);
                    groupByControl.setBounds(120, 5, 235, groupByControl.getPreferredSize().height);

                    { // compute preferred size
                        Dimension preferredSize = new Dimension();
                        for (int i = 0; i < panel4.getComponentCount(); i++) {
                            Rectangle bounds = panel4.getComponent(i).getBounds();
                            preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                            preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
                        }
                        Insets insets = panel4.getInsets();
                        preferredSize.width += insets.right;
                        preferredSize.height += insets.bottom;
                        panel4.setMinimumSize(preferredSize);
                        panel4.setPreferredSize(preferredSize);
                    }
                }
                panel1.add(panel4);
            }
            contentPanel.add(panel1, BorderLayout.NORTH);
        }
        dialogPane.add(contentPanel, BorderLayout.CENTER);
    }
    contentPane.add(dialogPane, BorderLayout.CENTER);
    setSize(565, 510);
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:com.ga.forms.DailyLogUI.java

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

    jPanel1 = new javax.swing.JPanel();
    mainTitleLbl = new javax.swing.JLabel();
    jSeparator1 = new javax.swing.JSeparator();
    exitButton = new javax.swing.JButton();
    exportButton = new javax.swing.JButton();
    dailyLogPanel = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    dailyLogTable = new javax.swing.JTable();
    addButton = new javax.swing.JButton();
    analysisPanel = new javax.swing.JPanel();
    netDurationLbl = new javax.swing.JLabel();
    durationLbl = new javax.swing.JLabel();
    monthlyRequiredDurationLbl = new javax.swing.JLabel();
    monthlyDurationLbl = new javax.swing.JLabel();
    durationDifferenceLbl = new javax.swing.JLabel();
    differenceLbl = new javax.swing.JLabel();
    monthCombo = new javax.swing.JComboBox();
    yearCombo = new javax.swing.JComboBox();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

    jPanel1.setMaximumSize(new java.awt.Dimension(395, 389));
    jPanel1.setMinimumSize(new java.awt.Dimension(395, 389));
    jPanel1.setPreferredSize(new java.awt.Dimension(464, 474));

    mainTitleLbl.setFont(new java.awt.Font("Arial", 0, 36)); // NOI18N
    mainTitleLbl.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    mainTitleLbl.setText("Daily Log Manager");
    mainTitleLbl.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

    exitButton.setText("Exit");
    exitButton.setMaximumSize(new java.awt.Dimension(72, 29));
    exitButton.setMinimumSize(new java.awt.Dimension(72, 29));
    exitButton.setPreferredSize(new java.awt.Dimension(72, 29));
    exitButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exitButtonActionPerformed(evt);
        }
    });

    exportButton.setText("Export");
    exportButton.setMaximumSize(new java.awt.Dimension(92, 29));
    exportButton.setMinimumSize(new java.awt.Dimension(92, 29));
    exportButton.setPreferredSize(new java.awt.Dimension(92, 29));
    exportButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exportButtonActionPerformed(evt);
        }
    });

    dailyLogPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Daily Logs"));
    dailyLogPanel.setFont(new java.awt.Font("Arial", 0, 15)); // NOI18N
    dailyLogPanel.setName("Daily Log Entry"); // NOI18N
    dailyLogPanel.setPreferredSize(new java.awt.Dimension(240, 190));

    jScrollPane1.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N

    dailyLogTable
            .setModel(new javax.swing.table.DefaultTableModel(
                    new Object[][] { { null, null, null, null }, { null, null, null, null },
                            { null, null, null, null }, { null, null, null, null } },
                    new String[] { "Title 1", "Title 2", "Title 3", "Title 4" }));
    jScrollPane1.setViewportView(dailyLogTable);

    javax.swing.GroupLayout dailyLogPanelLayout = new javax.swing.GroupLayout(dailyLogPanel);
    dailyLogPanel.setLayout(dailyLogPanelLayout);
    dailyLogPanelLayout.setHorizontalGroup(
            dailyLogPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 770, Short.MAX_VALUE));
    dailyLogPanelLayout
            .setVerticalGroup(dailyLogPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE));

    addButton.setText("Add");
    addButton.setMaximumSize(new java.awt.Dimension(72, 29));
    addButton.setMinimumSize(new java.awt.Dimension(72, 29));
    addButton.setPreferredSize(new java.awt.Dimension(72, 29));
    addButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            addButtonActionPerformed(evt);
        }
    });

    analysisPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Analysis"));

    netDurationLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
    netDurationLbl.setText("NET DURATION:");

    durationLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N

    monthlyRequiredDurationLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
    monthlyRequiredDurationLbl.setText("MONTHLY REQUIRED DURATION:");

    monthlyDurationLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N

    durationDifferenceLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N
    durationDifferenceLbl.setText("DIFFERENCE:");

    differenceLbl.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N

    javax.swing.GroupLayout analysisPanelLayout = new javax.swing.GroupLayout(analysisPanel);
    analysisPanel.setLayout(analysisPanelLayout);
    analysisPanelLayout.setHorizontalGroup(analysisPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(analysisPanelLayout.createSequentialGroup().addContainerGap().addGroup(analysisPanelLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(analysisPanelLayout.createSequentialGroup().addComponent(netDurationLbl)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(durationLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 71,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(
                            analysisPanelLayout.createSequentialGroup().addComponent(monthlyRequiredDurationLbl)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(monthlyDurationLbl, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            71, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(analysisPanelLayout.createSequentialGroup().addComponent(durationDifferenceLbl)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(differenceLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 71,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(18, Short.MAX_VALUE)));
    analysisPanelLayout
            .setVerticalGroup(analysisPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(analysisPanelLayout.createSequentialGroup().addContainerGap()
                            .addGroup(analysisPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(netDurationLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(durationLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(analysisPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(monthlyDurationLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(monthlyRequiredDurationLbl))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(analysisPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(differenceLbl, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(durationDifferenceLbl))
                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    netDurationLbl.getAccessibleContext().setAccessibleName("netDurationLbl");
    durationLbl.getAccessibleContext().setAccessibleName("durationLbl");
    monthlyRequiredDurationLbl.getAccessibleContext().setAccessibleName("monthlyRequiredDurationLbl");
    monthlyDurationLbl.getAccessibleContext().setAccessibleName("monthlyDurationLbl");
    durationDifferenceLbl.getAccessibleContext().setAccessibleName("durationDifferenceLbl");
    differenceLbl.getAccessibleContext().setAccessibleName("differenceLbl");

    monthCombo.setModel(
            new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
    monthCombo.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            monthComboActionPerformed(evt);
        }
    });

    yearCombo.setModel(
            new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
    yearCombo.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            yearComboActionPerformed(evt);
        }
    });

    jLabel1.setText("Month:");

    jLabel2.setText("Year:");

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jSeparator1)
            .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(addButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(exportButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(exitButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup().addGap(6, 6, 6)
                            .addGroup(jPanel1Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                            .addComponent(analysisPanel, 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(jLabel1)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(monthCombo, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(24, 24, 24).addComponent(jLabel2)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(yearCombo, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(mainTitleLbl, javax.swing.GroupLayout.Alignment.TRAILING,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(dailyLogPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 788,
                                            Short.MAX_VALUE))))
                    .addContainerGap()));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                    .addComponent(mainTitleLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 70,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(dailyLogPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 206,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(analysisPanel, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel1Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(monthCombo, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(yearCombo, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel1).addComponent(jLabel2)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 6,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(exitButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(exportButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(addButton, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));

    exportButton.getAccessibleContext().setAccessibleName("exportButton");
    addButton.getAccessibleContext().setAccessibleName("addButton");
    analysisPanel.getAccessibleContext().setAccessibleName("analysisPanel");
    jLabel1.getAccessibleContext().setAccessibleName("monthLbl");
    jLabel2.getAccessibleContext().setAccessibleName("yearLbl");

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 800, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 800, Short.MAX_VALUE)));
    layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGap(0, 469, Short.MAX_VALUE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 469,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(0, 0, Short.MAX_VALUE))));

    pack();
}