Re: [Microba-controls] Listener
Brought to you by:
michaelbaranov
From: Michael B. <mic...@gm...> - 2006-05-08 21:05:10
|
Hello! AFAIR this event (commit/revert) is triggered only if the user explicitly commits a new date value (changes the date by selecting it with mouse, keyboard or on focus loss with certain focus loss behaviors). To be notified of any changes of the date, monitor the property named "date", or watch for an action: 1) myPicker.addPropertyChangeListener(DatePicker.PROPERTY_NAME_DATE, myListener); or 2) myPicker.addActionListener(myListener); Hope this helps, Michael. > Hello! > > First of all: thanks for this great, free tool! > I have just one little question: > > I want to call a specified method when the value of a datepicker has > been changed. > experiments with > > --- CODE --- > > private DatePicker displayfield = new DatePicker(); > > CommitListener cl = new CommitListener(){ > public void commit(CommitEvent ce){ > calculate(); > } > }; > > displayfield.addCommitListener(cl); > > > -- / CODE --- > > didn't work unfortunately. > > Thank you for your help! > > Greetings, > DigiTalk |