-
Bug
-
Resolution: Cannot Reproduce
-
P5
-
None
-
1.4.2_04
-
None
-
sparc
-
solaris_8
Unable to print Java applets(with charts) thru Solaris version of j2re1.4.2_04
==============================================================================
While using Jpanel.printComponents(Graphics) in JPI1.4.2_04, the print is not
working but while trying to use Jpanel.print(Graphics) or
Jpanel.printAll(Graphics) , it is working fine. Basically the problem is
observed while printing the Chart thru java applets using j2re1.4.2_04.
But j2re1.4.2_04 is working fine in windows. The problem is coming only
while using j2re1.4.2_04 in solaris
The following code segment is not working in solaris version of j2re1.4.2_04
***********************************************************************************
public void print (Graphics page, Dimension pSize)
{
Component compList[] = _summaryPanel.getComponents();
Image scaleImg;
int height = (pSize.height - 160) / 3;
int ycoord = 110;
page.setColor (Color.gray);
// Rsp Time Section
page.drawLine ( 0, ycoord, 250, ycoord);
page.drawLine (370, ycoord, pSize.width, ycoord);
page.setColor (Color.black);
page.drawString (PropHandler.PROPS.getGUIStr("rspTimes"),250,
ycoord+3);
page.translate (-29, ycoord + 7);
((JPanel)compList[0]).printComponents (page);
page.translate (29, -(ycoord+7));
scaleImg = _rspTimeChart.snapshot().getScaledInstance (
pSize.width - compList[0].getSize().width
+ 43,
height, Image.SCALE_SMOOTH);
page.drawImage (scaleImg, compList[0].getSize().width - 50,
ycoord + 6, null); */
// Error Section
ycoord += height + 15;
page.setColor (Color.gray);
page.drawLine (0, ycoord, 270, ycoord);
page.drawLine (310, ycoord, pSize.width, ycoord);
page.setColor (Color.black);
page.drawString (PropHandler.PROPS.getGUIStr("errors"), 270,
ycoord+3);
page.translate (5, ycoord+7);
PropHandler.PROPS.displayErrorMsg((Frame)this.getTopLevelAncestor(),
"In Error Section , Before printComponents");
((JPanel)compList[2]).printComponents (page);
page.translate (-5, -(ycoord+7));
scaleImg = _errChart.snapshot().getScaledInstance (
pSize.width - compList[2].getSize().width - 3,
height, Image.SCALE_SMOOTH);
page.drawImage (scaleImg, compList[2].getSize().width - 3,
ycoord + 6, null); */
// Threshold Section
ycoord += height + 20;
page.setColor (Color.gray);
page.drawLine ( 0, ycoord, 250, ycoord);
page.drawLine (379, ycoord, pSize.width, ycoord);
page.setColor (Color.black);
page.drawString (PropHandler.PROPS.getGUIStr("thrsSummary"),
250, ycoord+3);
page.translate (5, ycoord+30);
((JPanel)compList[4]).printComponents (page);
page.translate (-5, -(ycoord+30));
scaleImg = _thrsChart.snapshot().getScaledInstance (
pSize.width - compList[4].getSize().width - 3,
height, Image.SCALE_SMOOTH);
/* page.drawImage (scaleImg, compList[4].getSize().width - 3,
ycoord + 6,
null); */
page.dispose();
}
***********************************************************************************
========
Unable to attach the testcase in the bugtraq. The tar
file is in
/net/oasis.west.sun.com/export/scratch/manish/customers/cisco/calls/829098/printDemo.tar
With the testcase provided by PTS (printdemo.tar):
When running with 1.4.2_04 sol-sparc it gives the following exception and
prints few text components. (open the ps/prn file in ghostviewer).
With 1.3.1_09 sol-sparc it works fine without any exception.
With 1.4.2_06 win-i586 it works fine without any exception.
java.lang.NullPointerException
at java.awt.geom.Area.<init>(Area.java:54)
at sun.print.PSPathGraphics.drawImageToPS(PSPathGraphics.java:1020)
at sun.print.PSPathGraphics.drawImage(PSPathGraphics.java:495)
at sun.print.PSPathGraphics.drawImage(PSPathGraphics.java:406)
at sun.print.PSPathGraphics.drawImage(PSPathGraphics.java:345)
at sun.print.PSPathGraphics.drawImage(PSPathGraphics.java:288)
at sun.print.PSPathGraphics.drawImage(PSPathGraphics.java:197)
at sun.print.ProxyGraphics.drawImage(ProxyGraphics.java:814)
at DemoScroller.print(DemoScroller.java:230)
at DemoFrame.actionPerformed(DemoFrame.java:177)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
###@###.### 2004-08-31
========================================
To run the test case:
% java -classpath "demo.jar:jcchart362J.jar" DemoFrame
###@###.### 2004-09-02
========================================
==============================================================================
While using Jpanel.printComponents(Graphics) in JPI1.4.2_04, the print is not
working but while trying to use Jpanel.print(Graphics) or
Jpanel.printAll(Graphics) , it is working fine. Basically the problem is
observed while printing the Chart thru java applets using j2re1.4.2_04.
But j2re1.4.2_04 is working fine in windows. The problem is coming only
while using j2re1.4.2_04 in solaris
The following code segment is not working in solaris version of j2re1.4.2_04
***********************************************************************************
public void print (Graphics page, Dimension pSize)
{
Component compList[] = _summaryPanel.getComponents();
Image scaleImg;
int height = (pSize.height - 160) / 3;
int ycoord = 110;
page.setColor (Color.gray);
// Rsp Time Section
page.drawLine ( 0, ycoord, 250, ycoord);
page.drawLine (370, ycoord, pSize.width, ycoord);
page.setColor (Color.black);
page.drawString (PropHandler.PROPS.getGUIStr("rspTimes"),250,
ycoord+3);
page.translate (-29, ycoord + 7);
((JPanel)compList[0]).printComponents (page);
page.translate (29, -(ycoord+7));
scaleImg = _rspTimeChart.snapshot().getScaledInstance (
pSize.width - compList[0].getSize().width
+ 43,
height, Image.SCALE_SMOOTH);
page.drawImage (scaleImg, compList[0].getSize().width - 50,
ycoord + 6, null); */
// Error Section
ycoord += height + 15;
page.setColor (Color.gray);
page.drawLine (0, ycoord, 270, ycoord);
page.drawLine (310, ycoord, pSize.width, ycoord);
page.setColor (Color.black);
page.drawString (PropHandler.PROPS.getGUIStr("errors"), 270,
ycoord+3);
page.translate (5, ycoord+7);
PropHandler.PROPS.displayErrorMsg((Frame)this.getTopLevelAncestor(),
"In Error Section , Before printComponents");
((JPanel)compList[2]).printComponents (page);
page.translate (-5, -(ycoord+7));
scaleImg = _errChart.snapshot().getScaledInstance (
pSize.width - compList[2].getSize().width - 3,
height, Image.SCALE_SMOOTH);
page.drawImage (scaleImg, compList[2].getSize().width - 3,
ycoord + 6, null); */
// Threshold Section
ycoord += height + 20;
page.setColor (Color.gray);
page.drawLine ( 0, ycoord, 250, ycoord);
page.drawLine (379, ycoord, pSize.width, ycoord);
page.setColor (Color.black);
page.drawString (PropHandler.PROPS.getGUIStr("thrsSummary"),
250, ycoord+3);
page.translate (5, ycoord+30);
((JPanel)compList[4]).printComponents (page);
page.translate (-5, -(ycoord+30));
scaleImg = _thrsChart.snapshot().getScaledInstance (
pSize.width - compList[4].getSize().width - 3,
height, Image.SCALE_SMOOTH);
/* page.drawImage (scaleImg, compList[4].getSize().width - 3,
ycoord + 6,
null); */
page.dispose();
}
***********************************************************************************
========
Unable to attach the testcase in the bugtraq. The tar
file is in
/net/oasis.west.sun.com/export/scratch/manish/customers/cisco/calls/829098/printDemo.tar
With the testcase provided by PTS (printdemo.tar):
When running with 1.4.2_04 sol-sparc it gives the following exception and
prints few text components. (open the ps/prn file in ghostviewer).
With 1.3.1_09 sol-sparc it works fine without any exception.
With 1.4.2_06 win-i586 it works fine without any exception.
java.lang.NullPointerException
at java.awt.geom.Area.<init>(Area.java:54)
at sun.print.PSPathGraphics.drawImageToPS(PSPathGraphics.java:1020)
at sun.print.PSPathGraphics.drawImage(PSPathGraphics.java:495)
at sun.print.PSPathGraphics.drawImage(PSPathGraphics.java:406)
at sun.print.PSPathGraphics.drawImage(PSPathGraphics.java:345)
at sun.print.PSPathGraphics.drawImage(PSPathGraphics.java:288)
at sun.print.PSPathGraphics.drawImage(PSPathGraphics.java:197)
at sun.print.ProxyGraphics.drawImage(ProxyGraphics.java:814)
at DemoScroller.print(DemoScroller.java:230)
at DemoFrame.actionPerformed(DemoFrame.java:177)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
###@###.### 2004-08-31
========================================
To run the test case:
% java -classpath "demo.jar:jcchart362J.jar" DemoFrame
###@###.### 2004-09-02
========================================
- relates to
-
JDK-4968560 Printing not working on mercury b12 with jdk 1.4.2_04 Build 01
- Closed