src/tokenclustering/view/NewAreaDialog.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.
     */
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.
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 .
@SuppressWarnings("unchecked")
    private void initComponents() {
        widthSpinner = new javax.swing.JSpinner();
        widthLabel = new javax.swing.JLabel();
        heightLabel = new javax.swing.JLabel();
        heightSpinner = new javax.swing.JSpinner();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        newAreaButton = new javax.swing.JButton();
        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Choose token area size");
        setModal(true);
        setResizable(false);
        widthSpinner.setModel(new javax.swing.SpinnerNumberModel(5, 1, 23, 1));
        widthLabel.setText("width:");
        heightLabel.setText("height:");
        heightSpinner.setModel(new javax.swing.SpinnerNumberModel(5, 1, 33, 1));
        jLabel1.setText("token(s)");
        jLabel2.setText("token(s)");
        newAreaButton.setText("ok");
        newAreaButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                newAreaButtonActionPerformed(evt);
            }
        });
        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(33, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(newAreaButton, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(heightLabel)
                            .addComponent(widthLabel))
                        .addGap(36, 36, 36)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(widthSpinner)
                            .addComponent(heightSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1)
                            .addComponent(jLabel2))))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(widthLabel)
                    .addComponent(widthSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(heightSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(heightLabel)
                    .addComponent(jLabel2))
                .addGap(18, 18, 18)
                .addComponent(newAreaButton)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pack();
    }
@ SuppressWarnings ( "unchecked" ) private void initComponents ( ) { widthSpinner = new javax . swing . JSpinner ( ) ; widthLabel = new javax . swing . JLabel ( ) ; heightLabel = new javax . swing . JLabel ( ) ; heightSpinner = new javax . swing . JSpinner ( ) ; jLabel1 = new javax . swing . JLabel ( ) ; jLabel2 = new javax . swing . JLabel ( ) ; newAreaButton = new javax . swing . JButton ( ) ; setDefaultCloseOperation ( javax . swing . WindowConstants . DISPOSE_ON_CLOSE ) ; setTitle ( "Choose token area size" ) ; setModal ( true ) ; setResizable ( false ) ; widthSpinner . setModel ( new javax . swing . SpinnerNumberModel ( 5 , 1 , 23 , 1 ) ) ; widthLabel . setText ( "width:" ) ; heightLabel . setText ( "height:" ) ; heightSpinner . setModel ( new javax . swing . SpinnerNumberModel ( 5 , 1 , 33 , 1 ) ) ; jLabel1 . setText ( "token(s)" ) ; jLabel2 . setText ( "token(s)" ) ; newAreaButton . setText ( "ok" ) ; newAreaButton . addActionListener ( new java . awt . event . ActionListener ( ) { public void actionPerformed ( java . awt . event . ActionEvent evt ) { newAreaButtonActionPerformed ( evt ) ; } } ) ; javax . swing . GroupLayout layout = new javax . swing . GroupLayout ( getContentPane ( ) ) ; getContentPane ( ) . setLayout ( layout ) ; layout . setHorizontalGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING ) . addGroup ( javax . swing . GroupLayout . Alignment . TRAILING , layout . createSequentialGroup ( ) . addContainerGap ( 33 , Short . MAX_VALUE ) . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . TRAILING ) . addComponent ( newAreaButton , javax . swing . GroupLayout . PREFERRED_SIZE , 73 , javax . swing . GroupLayout . PREFERRED_SIZE ) . addGroup ( layout . createSequentialGroup ( ) . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . TRAILING ) . addComponent ( heightLabel ) . addComponent ( widthLabel ) ) . addGap ( 36 , 36 , 36 ) . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING , false ) . addComponent ( widthSpinner ) . addComponent ( heightSpinner , javax . swing . GroupLayout . PREFERRED_SIZE , 113 , javax . swing . GroupLayout . PREFERRED_SIZE ) ) . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED ) . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING ) . addComponent ( jLabel1 ) . addComponent ( jLabel2 ) ) ) ) . addContainerGap ( ) ) ) ; layout . setVerticalGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING ) . addGroup ( layout . createSequentialGroup ( ) . addContainerGap ( ) . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . CENTER ) . addComponent ( widthLabel ) . addComponent ( widthSpinner , javax . swing . GroupLayout . PREFERRED_SIZE , javax . swing . GroupLayout . DEFAULT_SIZE , javax . swing . GroupLayout . PREFERRED_SIZE ) . addComponent ( jLabel1 ) ) . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED ) . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . CENTER ) . addComponent ( heightSpinner , javax . swing . GroupLayout . PREFERRED_SIZE , javax . swing . GroupLayout . DEFAULT_SIZE , javax . swing . GroupLayout . PREFERRED_SIZE ) . addComponent ( heightLabel ) . addComponent ( jLabel2 ) ) . addGap ( 18 , 18 , 18 ) . addComponent ( newAreaButton ) . addContainerGap ( javax . swing . GroupLayout . DEFAULT_SIZE , Short . MAX_VALUE ) ) ) ; pack ( ) ; }
This method is called from within the constructor to
 initialize the form.
This method is called from within the constructor to initialize the form .
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents