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

NPE when trying to print demo applet Clock

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P4
    • None
    • 1.4.0
    • client-libs
    • sparc
    • solaris_2.6

    Description

      Build : 61 (jdk1.4)
      os : Solaris2.6
      App : Clock (in the demo/applet/Clock dir of the build)

      When executing Print with demo/applet/clock using the Appletviewer get an NPE.
      Fails to print under 2.6, win2000 for the above build.

      Tested on the following os platforms of the previous builds mentioned below and the same NPE is thrown ..

      Build os(platform)

      60 Win2000, WinNT,Win98
      59 Win2000

      java.lang.NullPointerException
              at java.util.Calendar.setTime(Calendar.java:903)
              at java.text.SimpleDateFormat.format(SimpleDateFormat.java:417)
              at java.text.SimpleDateFormat.format(SimpleDateFormat.java:407)
              at java.text.DateFormat.format(DateFormat.java:309)
              at Clock.paint(Clock.java:136)
              at java.awt.Component.print(Component.java:2424)
              at java.awt.Container.print(Container.java:1132)
              at sun.awt.motif.MComponentPeer.print(MComponentPeer.java:309)
              at sun.awt.motif.MPanelPeer.print(MPanelPeer.java:41)
              at java.awt.GraphicsCallback$PeerPrintCallback.run(GraphicsCallback.java:88)
              at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:63)
              at java.awt.Component.printAll(Component.java:2440)
              at sun.applet.AppletViewer.appletPrint(AppletViewer.java:702)
              at sun.applet.AppletViewer.processUserAction(AppletViewer.java:848)
              at sun.applet.AppletViewer$UserActionListener.actionPerformed(AppletViewer.java:131)
              at java.awt.MenuItem.processActionEvent(MenuItem.java:581)
              at java.awt.MenuItem.processEvent(MenuItem.java:545)
              at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:282)
              at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:272)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:441)
              at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:150)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:131)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

      Attachments

        Activity

          People

            serb Sergey Bylokhov
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: