String text = field.getText(); if (text.length() == 0) { p.removeExtraField(name); } else { p.setExtraField(name, text);
if (e.getDocument() == field.getDocument()) { String text = field.getText(); if (text.length() == 0) { p.removeExtraField(name); } else { p.setExtraField(name, text); }  break;
	public void textUpdate() {		if (pictures != null && pictures.length == 1) {			Picture p = ((Picture)pictures[0]);			p.setCaption( jCaption.getText() );			Iterator it = extraTextAreas.keySet().iterator();			while (it.hasNext()) {				String name = (String) it.next();				JTextArea field = (JTextArea) extraTextAreas.get(name);				String text = field.getText();				if (text.length() == 0) {					p.removeExtraField(name);				} else {					p.setExtraField(name, text);				}			}		}	}