private void initGUI(){
  JPanel outerPanel=new JPanel();
  outerPanel.setLayout(new GridBagLayout());
  GridBagConstraints gbc=new GridBagConstraints();
  gbc.gridx=0;
  gbc.gridy=0;
  gbc.weightx=1;
  gbc.fill=GridBagConstraints.BOTH;
  outerPanel.add(createStep1Panel(),gbc);
  if (oAuth.isOAuth2()) {
    gbc.gridy+=1;
    outerPanel.add(createStep2Panel(),gbc);
  }
  statusLabel=new JLabel();
  statusLabel.setMinimumSize(new Dimension(400,25));
  statusLabel.setPreferredSize(new Dimension(400,25));
  statusLabel.setHorizontalAlignment(JLabel.RIGHT);
  gbc.gridy+=1;
  gbc.insets=new Insets(5,5,5,5);
  outerPanel.add(statusLabel,gbc);
  gbc.gridy+=1;
  Component btPanel=createButtons();
  outerPanel.add(btPanel,gbc);
  add(outerPanel);
  layoutDefault(outerPanel,confirmButton,cancelButton);
  if (oAuth.isOAuth2()) {
    setPreferredSize(new Dimension(375,430));
  }
 else {
    setPreferredSize(new Dimension(375,320));
  }
  setResizable(false);
  setModal(true);
  pack();
  setLocationRelativeTo(ApplicationFrame.getApplicationFrame());
}

private void initGUI ( ) { JPanel outerPanel = new JPanel ( ) ; outerPanel . setLayout ( new GridBagLayout ( ) ) ; GridBagConstraints gbc = new GridBagConstraints ( ) ; gbc . gridx = 0 ; gbc . gridy = 0 ; gbc . weightx = 1 ; gbc . fill = GridBagConstraints . BOTH ; outerPanel . add ( createStep1Panel ( ) , gbc ) ; if ( oAuth . isOAuth2 ( ) ) { gbc . gridy += 1 ; outerPanel . add ( createStep2Panel ( ) , gbc ) ; } statusLabel = new JLabel ( ) ; statusLabel . setMinimumSize ( new Dimension ( 400 , 25 ) ) ; statusLabel . setPreferredSize ( new Dimension ( 400 , 25 ) ) ; statusLabel . setHorizontalAlignment ( JLabel . RIGHT ) ; gbc . gridy += 1 ; gbc . insets = new Insets ( 5 , 5 , 5 , 5 ) ; outerPanel . add ( statusLabel , gbc ) ; gbc . gridy += 1 ; Component btPanel = createButtons ( ) ; outerPanel . add ( btPanel , gbc ) ; add ( outerPanel ) ; layoutDefault ( outerPanel , confirmButton , cancelButton ) ; if ( oAuth . isOAuth2 ( ) ) { setPreferredSize ( new Dimension ( 375 , 430 ) ) ; } else { setPreferredSize ( new Dimension ( 375 , 320 ) ) ; } setResizable ( false ) ; setModal ( true ) ; pack ( ) ; setLocationRelativeTo ( ApplicationFrame . getApplicationFrame ( ) ) ; }
basic method to initialize the gui .
