• Post Reply Bookmark Topic Watch Topic
  • New Topic

Event Handling  RSS feed

 
Marembo Ochieng'
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a calendar class that listens to date range selections. the design of the calendar allows one to specify
a RangeListener that is notified of range selection events.
Also, the range calendar allows you to add an item in its JPopupMenu, so that it can be displayed when a range is selected
When a range is added, the range calendar invokes the RangeListener's method rangeAdded(DateRange, PopupController).
The PopupController allows you to add an item to the date range calendar.

I define my range listener as follows

my problem is that the DateRange prints out to the corrent value, but the action listener receives only the first DateRange supplied when creating the JMenuItem, why cant it be able
to subsequently receive the next ranges?

I modified the code and specified the containing class as the ActionListener


However, the second style always prints that the selected range is null?
Can someone help me please?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!