-
Bug
-
Resolution: Won't Fix
-
P3
-
None
-
1.2.2
-
generic, x86
-
generic, windows_nt
On JDK1.2.2 LabelView is incorrectly trying to optain the FontRendererContext when it possibly doesn't exist. I get a NullPointerException when I try to resize the master view. In this case I have a container but it is a dummy container that hasn't been added to anything else. Can we at least get this fixed for the release after 1.2.2?
line 1315
if (container == null) {
frc = DefaultRenderContext;
}
else {
frc = ((Graphics2D)container.getGraphics()).
-> getFontRenderContext();
}
Should be changed to
Container container = getContainer();
if (container == null) {
frc = DefaultRenderContext;
}
else {
Graphics2D g2d = (Graphics2D)container.getGraphics();
if (g2d != null) {
frc = g2d.getFontRenderContext();
} else {
frc = DefaultRenderContext;
}
}
Which is what line 120 does.
line 1315
if (container == null) {
frc = DefaultRenderContext;
}
else {
frc = ((Graphics2D)container.getGraphics()).
-> getFontRenderContext();
}
Should be changed to
Container container = getContainer();
if (container == null) {
frc = DefaultRenderContext;
}
else {
Graphics2D g2d = (Graphics2D)container.getGraphics();
if (g2d != null) {
frc = g2d.getFontRenderContext();
} else {
frc = DefaultRenderContext;
}
}
Which is what line 120 does.
- duplicates
-
JDK-4244891 JTextPane: getPrefferedSize() results in NPE
-
- Closed
-
-
JDK-4261837 Failure to print JTextPane under JDK 1.2.2
-
- Closed
-