Samstag, 9. Januar 2010

Add custom entries to NetBeans palette including events

Inspired by:
http://www.ryerson.ca/~dgrimsha/courses/cps841/JB_events.html

I could finally make my dream EventPanel.
Extending JPanel it allows Listeners to register for the paint event.

So you don't need to subclass JPanel anymore.
Just add EventPanel to NetBeans and add an event handler
for the now selectable paint event.

The Graphics2D object is placed into the the event Source object.

Get the source here:
http://kenai.com/projects/rayssharedcode/sources

Keine Kommentare: