How to get events from my class (is it a JavaBean)?



Hi,

I've built a GUI panel which I want to reuse in various places in my
app.

It's a JPanel featuring two JFormattedTextEntry boxes (each with a
JLabel). The two text boxes use formatted, validating functionality to
accept user start and end dates for a time period.

When it comes to using this thing in my app, how should I generate
events from it? Should I be generating ActionEvents or is that only
permitted on lower level Swing components?

Should I generate my own event?

Should I be fire a PropertyChangeEvent?

I want to generate events like

StartDateChanged
EndDateChange

the class will have getStartDate(), getEndDate() methods to then access
the values.

It sure feels like I'm writing a JavaBean (assuming I conform to the
golden rules) which leads me to PropertyChangeEvent?

I'm just unsure of how to structure components in the design. Any good
references would be great.

Thanks
Chris

.