private void updateWKTString(){
  String wktString=WKTConversion.generateWKTString(wktGeometry,true);
  boolean valid=false;
  boolean empty=false;
  if (wktGeometry != null) {
    valid=wktGeometry.isValid();
    empty=wktGeometry.isEmpty();
  }
  if (valid) {
    wktTextArea.setText(wktString);
  }
  if (valid || empty) {
    wktTextArea.setBackground(Color.white);
  }
 else {
    wktTextArea.setBackground(Color.red);
  }
  btnReload.setEnabled(false);
}

private void updateWKTString ( ) { String wktString = WKTConversion . generateWKTString ( wktGeometry , true ) ; boolean valid = false ; boolean empty = false ; if ( wktGeometry != null ) { valid = wktGeometry . isValid ( ) ; empty = wktGeometry . isEmpty ( ) ; } if ( valid ) { wktTextArea . setText ( wktString ) ; } if ( valid || empty ) { wktTextArea . setBackground ( Color . white ) ; } else { wktTextArea . setBackground ( Color . red ) ; } btnReload . setEnabled ( false ) ; }
update wkt string in the text area .
