• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Mike London

Event Handling

Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
    Bookmark Topic Watch Topic
  • New Topic