This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
swing:text_fields [2015/05/10 17:41] gthanos [Scroll Panes (Scroll Bars)] |
swing:text_fields [2016/02/26 11:15] (current) |
||
|---|---|---|---|
| Line 384: | Line 384: | ||
| </code> | </code> | ||
| + | ===== Document Listeners ===== | ||
| + | |||
| + | Κάθε component ή κάθε κατηγορία component συνδέεται με κάποιο Listener Interface. Τα παραπάνω text related components συνδέονται με το interface [[http://docs.oracle.com/javase/7/docs/api/javax/swing/event/DocumentListener.html|javax.swing.event.DocumentListener]]. Οι μέθοδοι του συγκεκριμένου interface δίνονται παρακάτω. | ||
| + | <code java> | ||
| + | void changedUpdate(DocumentEvent e); | ||
| + | //Gives notification that an attribute or set of attributes changed. | ||
| + | |||
| + | void insertUpdate(DocumentEvent e); | ||
| + | //Gives notification that there was an insert into the document. | ||
| + | |||
| + | void removeUpdate(DocumentEvent e); | ||
| + | //Gives notification that a portion of the document has been removed. | ||
| + | </code> | ||