private void addAngle(){
  if (angles == null) {
    angles=new double[1];
    selectedAngleIndex=0;
    btnDeleteAngle.setEnabled(true);
  }
 else {
    double[] tmpAngles=new double[angles.length + 1];
    for (int i=0; i < angles.length; i++) {
      tmpAngles[i]=angles[i];
    }
    angles=tmpAngles;
  }
  angles[angles.length - 1]=0.0d;
  angleModel.add(angles[angles.length - 1] + "");
  selectedAngleIndex=angles.length - 1;
  jTFChangeAngle.setText(angles[selectedAngleIndex] + "\u00BA");
  jLAngleCount.setText(JL_NUMBER_OF_ANGLES_TEXT + angles.length);
  repaint();
}

private void addAngle ( ) { if ( angles == null ) { angles = new double [ 1 ] ; selectedAngleIndex = 0 ; btnDeleteAngle . setEnabled ( true ) ; } else { double [ ] tmpAngles = new double [ angles . length + 1 ] ; for ( int i = 0 ; i < angles . length ; i ++ ) { tmpAngles [ i ] = angles [ i ] ; } angles = tmpAngles ; } angles [ angles . length - 1 ] = 0.0d ; angleModel . add ( angles [ angles . length - 1 ] + "" ) ; selectedAngleIndex = angles . length - 1 ; jTFChangeAngle . setText ( angles [ selectedAngleIndex ] + "º" ) ; jLAngleCount . setText ( JL_NUMBER_OF_ANGLES_TEXT + angles . length ) ; repaint ( ) ; }
adds an angle and updates all relevant gui components .
