code: private void initComponents() {
          java.awt.GridBagConstraints gridBagConstraints;
  
          jLabel1 = new javax.swing.JLabel();
          jProgressBar1 = new javax.swing.JProgressBar();
          cancelButton = new javax.swing.JButton();
  
          getContentPane().setLayout(new java.awt.GridBagLayout());
  
          addWindowListener(new java.awt.event.WindowAdapter() {
              public void windowClosing(java.awt.event.WindowEvent evt) {
                  closeDialog(evt);
              }
          });
  
          jLabel1.setText("Printing...");
          gridBagConstraints = new java.awt.GridBagConstraints();
          gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
          gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
          getContentPane().add(jLabel1, gridBagConstraints);
  
          jProgressBar1.setIndeterminate(true);
          gridBagConstraints = new java.awt.GridBagConstraints();
          gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
          gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
          getContentPane().add(jProgressBar1, gridBagConstraints);
  
          cancelButton.setText("Cancel");
          cancelButton.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  cancelButtonActionPerformed(evt);
              }
          });
  
          gridBagConstraints = new java.awt.GridBagConstraints();
          gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
          getContentPane().add(cancelButton, gridBagConstraints);
  
          pack();
      }
docs: <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents