adding menu item to chartpanel popup menu

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
magicoopa
Posts: 1
Joined: Thu Jan 14, 2010 11:35 pm
antibot: No, of course not.

adding menu item to chartpanel popup menu

Post by magicoopa » Thu Jan 14, 2010 11:40 pm

I want to add a menu item, say import to pdf file, to chartpanel popup menu. any suggestion?

skunk
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia

Re: adding menu item to chartpanel popup menu

Post by skunk » Fri Jan 15, 2010 2:41 am

Code: Select all

chartPanel.getPopupMenu().add(new JMenuItem(...));

MitchBuell
Posts: 47
Joined: Thu Dec 11, 2008 7:59 pm

Re: adding menu item to chartpanel popup menu

Post by MitchBuell » Fri Jan 15, 2010 4:40 pm

Customize PopupMenu in ChartPanel: http://www.jfree.org/phpBB2/viewtopic.php?f=3&t=27752

But to add something to the exisiting PopupMenu, use the above suggestion.

Locked