Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4400742

Can't print with appletviewer in merlin b46

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 1.4.0
    • Fix Version/s: None
    • Component/s: client-libs

      Description

      hercule.li@prc 2000-12-26

      I found out this bug in merlin build 46

      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b46)
      Java HotSpot(TM) Client VM (build 1.4beta-B45, mixed mode)

      locale : zh_CN

      This bug dose NOT exist in merlin build 44.

      In merlin b46, when using appletviewer to startup a application,
      then choose print from Applet menu, there will be some error
      message flash out like below

      java.lang.NullPointerException
              at javax.swing.text.PlainView.getLineWidth(PlainView.java:590)
              at javax.swing.text.PlainView.updateDamage(PlainView.java:497)
              at javax.swing.text.PlainView.insertUpdate(PlainView.java:398)
              at javax.swing.text.FieldView.insertUpdate(FieldView.java:266)
              at javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(BasicTextUjava:1396)
              at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicxtUI.java:1630)
              at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocumentava:183)
              at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocume.java:640)
              at javax.swing.text.AbstractDocument.insertString(AbstractDocument.jav600)
              at javax.swing.text.PlainDocument.insertString(PlainDocument.java:115)
              at javax.swing.text.JTextComponent.setText(JTextComponent.java:1242)
              at javax.swing.plaf.basic.BasicComboBoxEditor.setItem(BasicComboBoxEdir.java:56)
              at javax.swing.JComboBox.configureEditor(JComboBox.java:1187)
              at javax.swing.plaf.basic.BasicComboBoxUI$PropertyChangeHandler.properChange(BasicComboBoxUI.java:532)
              at javax.swing.plaf.metal.MetalComboBoxUI$MetalPropertyChangeListener.opertyChange(MetalComboBoxUI.java:76)
              at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwiPropertyChangeSupport.java:268)
              at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwiPropertyChangeSupport.java:236)
              at javax.swing.JComponent.firePropertyChange(JComponent.java:3584)
              at javax.swing.JComboBox.setModel(JComboBox.java:222)
              at sun.awt.print.PrintDialog.initPrintPanel(PrintDialog.java:368)
              at sun.awt.print.PrintDialog.<init>(PrintDialog.java:218)
              at sun.awt.print.PrintControl$2.run(PrintControl.java:439)
              at java.security.AccessController.doPrivileged(Native Method)
              at sun.awt.print.PrintControl.displayCommonDialog(PrintControl.java:43
              at sun.awt.print.PrintControl.displayNativeDialog(PrintControl.java:51
              at sun.awt.print.PrintControl.displayDialog(PrintControl.java:418)
              at sun.print.PrintJob2D.printDialog(PrintJob2D.java:148)
              at sun.awt.motif.MToolkit.getPrintJob(MToolkit.java:396)
              at sun.applet.AppletViewer.appletPrint(AppletViewer.java:691)
              at sun.applet.AppletViewer.processUserAction(AppletViewer.java:848)
              at sun.applet.AppletViewer$UserActionListener.actionPerformed(AppletVier.java:131)
              at java.awt.MenuItem.processActionEvent(MenuItem.java:558)
              at java.awt.MenuItem.processEvent(MenuItem.java:522)
              at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:276)
              at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:266)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:439)
              at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:0)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:12
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:12
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)


      Reproduce steps:
          run demo program under $JAVAHOME/demo/jfc/SwingApplet ,
              appletviewer SwingApplet.html
          then choose print from the applet menu.
          
      -------------- end of hercule.li@prc 2000-12-26



      hercule.li@prc 2001-01-12

      This bug appears if you choose the encoding "zh_CN.EUC".

      If you choose encoding as "zh_CN.GBK", there is NO bug.


      BTW, this bug still exists in merlin b47.

      ------ end of hercule.li@prc 2001-01-12

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shickeysunw Shannon Hickey (Inactive)
                Reporter:
                hlisunw Hercule Li (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: