Right-clicking on a JFreeChart

╄→гoц情女王★ 提交于 2019-12-24 16:05:18

问题


It seems to me that the chartMouseClicked method gets called only when the user left-clicks on a chart. What's being called when the user right-clicks on a chart and the popup menu is displayed? I want to do something in the background when the user right-clicks before the popup menu is displayed. Thanks!


回答1:


ChartPanel implements MouseListener to display the context menu. To accommodate disparate platforms, it checks isPopupTrigger() in both mousePressed() and mouseReleased(). You may need to override both methods.



来源:https://stackoverflow.com/questions/7758759/right-clicking-on-a-jfreechart

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!