[#5691] - Subclassing JRViewer

Category:
Bug report
Priority:
Normal
Status:
New
Project: Severity:
Block
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:

Subclassing JRViewer outside library leads to error on object construction.

For example

JRViewer viewer = new JRViewer(print) {

@Override
public void setZoomRatio(float newZoom) {
super.setZoomRatio(newZoom);
NbPreferences.forModule(ReportOutputFormat.class).putFloat("zoomRatio", newZoom);
}

};

it yields

java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(ImageIcon.java:181)
at net.sf.jasperreports.view.JRViewer.initComponents(JRViewer.java:754)
at net.sf.jasperreports.view.JRViewer.<init>(JRViewer.java:400)
at net.sf.jasperreports.view.JRViewer.<init>(JRViewer.java:311)
at net.sf.jasperreports.view.JRViewer.<init>(JRViewer.java:272)
at net.sf.jasperreports.view.JRViewer.<init>(JRViewer.java:245)

v6.1
JRViewer
w.sitnikov's picture
Joined: Aug 25 2015 - 4:45am
Last seen: 7 years 1 week ago

1 Comment:

#1

Did you resolve your zoom ratio issue?

Feedback
randomness