1 7 package javax.swing.text.html; 8 9 import javax.swing.text.*; 10 11 12 21 22 class TextAreaDocument extends PlainDocument { 23 24 String initialText; 25 26 27 31 void reset() { 32 try { 33 remove(0, getLength()); 34 if (initialText != null) { 35 insertString(0, initialText, null); 36 } 37 } catch (BadLocationException e) { 38 } 39 } 40 41 45 void storeInitialText() { 46 try { 47 initialText = getText(0, getLength()); 48 } catch (BadLocationException e) { 49 } 50 } 51 } 52 53 54 55 56 | Popular Tags |