Listing 8. The insertUpdate method. |
---|
public void insertUpdate(DocumentEvent e){ try{ redInt = Integer.parseInt( redField.getText()); if((redInt >= 0) && (redInt <= 255)){ paintColorSwatch(); }//end if }catch(Exception ex){ //do nothing on exception }//end catch }//end insertUpdate //-------------------------------------------// }//end new DocumentListener );//end addDocumentListener |