LAndrew.xp Posted November 9, 2017 Share Posted November 9, 2017 How can i add JRHyperlinkListener to net.sf.jasperreports.swing.JRViewer?net.sf.jasperreports.view.JRViewer is not in the 6.4.3 library. Link to comment Share on other sites More sharing options...
lucianc Posted November 10, 2017 Share Posted November 10, 2017 You'll have to extend JRViewer and add the listener to JRViewerPanel. Like this (using an anonymous class, but you can define a named class as well): new net.sf.jasperreports.swing.JRViewer(...) { @Override protected JRViewerPanel createViewerPanel() { JRViewerPanel panel = super.createViewerPanel(); panel.addHyperlinkListener(listener); return panel; } };[/code]Regards,Lucian Link to comment Share on other sites More sharing options...
LAndrew.xp Posted November 13, 2017 Author Share Posted November 13, 2017 Lucian, thank you very much for your help! It's working! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now