public DiceServerEditor(final IRemoteDiceServer diceServer){
  m_bean=diceServer;
  final int bottomSpace=1;
  final int labelSpace=2;
  int row=0;
  if (m_bean.sendsEmail()) {
    add(m_toLabel,new GridBagConstraints(0,row,1,1,0,0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(0,0,bottomSpace,labelSpace),0,0));
    add(m_toAddress,new GridBagConstraints(1,row,2,1,1.0,0,GridBagConstraints.EAST,GridBagConstraints.HORIZONTAL,new Insets(0,0,bottomSpace,0),0,0));
    m_toAddress.setText(m_bean.getToAddress());
    row++;
    add(m_ccLabel,new GridBagConstraints(0,row,1,1,0,0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(0,0,bottomSpace,labelSpace),0,0));
    add(m_ccAddress,new GridBagConstraints(1,row,2,1,1.0,0,GridBagConstraints.EAST,GridBagConstraints.HORIZONTAL,new Insets(0,0,bottomSpace,0),0,0));
    m_ccAddress.setText(m_bean.getCcAddress());
    row++;
  }
  if (m_bean.supportsGameId()) {
    final JLabel m_gameIdLabel=new JLabel("Game ID:");
    add(m_gameIdLabel,new GridBagConstraints(0,row,1,1,0,0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(0,0,bottomSpace,labelSpace),0,0));
    add(m_gameId,new GridBagConstraints(1,row,2,1,1.0,0,GridBagConstraints.EAST,GridBagConstraints.HORIZONTAL,new Insets(0,0,bottomSpace,0),0,0));
    m_gameId.setText(m_bean.getGameId());
    row++;
  }
  add(m_testDiceyButton,new GridBagConstraints(2,row,1,1,0,0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(0,0,bottomSpace,0),0,0));
  setupListeners();
}

public DiceServerEditor ( final IRemoteDiceServer diceServer ) { m_bean = diceServer ; final int bottomSpace = 1 ; final int labelSpace = 2 ; int row = 0 ; if ( m_bean . sendsEmail ( ) ) { add ( m_toLabel , new GridBagConstraints ( 0 , row , 1 , 1 , 0 , 0 , GridBagConstraints . WEST , GridBagConstraints . NONE , new Insets ( 0 , 0 , bottomSpace , labelSpace ) , 0 , 0 ) ) ; add ( m_toAddress , new GridBagConstraints ( 1 , row , 2 , 1 , 1.0 , 0 , GridBagConstraints . EAST , GridBagConstraints . HORIZONTAL , new Insets ( 0 , 0 , bottomSpace , 0 ) , 0 , 0 ) ) ; m_toAddress . setText ( m_bean . getToAddress ( ) ) ; row ++ ; add ( m_ccLabel , new GridBagConstraints ( 0 , row , 1 , 1 , 0 , 0 , GridBagConstraints . WEST , GridBagConstraints . NONE , new Insets ( 0 , 0 , bottomSpace , labelSpace ) , 0 , 0 ) ) ; add ( m_ccAddress , new GridBagConstraints ( 1 , row , 2 , 1 , 1.0 , 0 , GridBagConstraints . EAST , GridBagConstraints . HORIZONTAL , new Insets ( 0 , 0 , bottomSpace , 0 ) , 0 , 0 ) ) ; m_ccAddress . setText ( m_bean . getCcAddress ( ) ) ; row ++ ; } if ( m_bean . supportsGameId ( ) ) { final JLabel m_gameIdLabel = new JLabel ( "Game ID:" ) ; add ( m_gameIdLabel , new GridBagConstraints ( 0 , row , 1 , 1 , 0 , 0 , GridBagConstraints . WEST , GridBagConstraints . NONE , new Insets ( 0 , 0 , bottomSpace , labelSpace ) , 0 , 0 ) ) ; add ( m_gameId , new GridBagConstraints ( 1 , row , 2 , 1 , 1.0 , 0 , GridBagConstraints . EAST , GridBagConstraints . HORIZONTAL , new Insets ( 0 , 0 , bottomSpace , 0 ) , 0 , 0 ) ) ; m_gameId . setText ( m_bean . getGameId ( ) ) ; row ++ ; } add ( m_testDiceyButton , new GridBagConstraints ( 2 , row , 1 , 1 , 0 , 0 , GridBagConstraints . EAST , GridBagConstraints . NONE , new Insets ( 0 , 0 , bottomSpace , 0 ) , 0 , 0 ) ) ; setupListeners ( ) ; }
creating a new instance
