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

JInternalFrame not serializable in GTK L&F

XMLWordPrintable

    • beta2
    • generic
    • generic

      4966168 reported that JInternalFrames are not serializable in Motif and GTK L&F. The fix to that bug did not resolve the issue with GTK L&F. An exception is still thrown.

      Steps to reproduce:
      1) Run the attached test TestSerializeInternalFrame
      2) Change L&F to GTK using Menu "Look And Feel"
      3) Click on button "Serialize InternalFrame"
      4) It will throw Exception in console
      5) Now try serializing in some other look and feel it will
         give message ""Successfully serialized JInternalFrame" on console

      Tested on Tiger b39

      Following is the exception message when serializing JInternalFrame under GTK
      ----------------------------------------------
      java.io.NotSerializableException: javax.swing.plaf.basic.BasicInternalFrameUI$Handler
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1072)
      at java.io.ObjectOutputStream.access+100(ObjectOutputStream.java:135)
      at java.io.ObjectOutputStream$PutFieldImpl.writeFields(ObjectOutputStream.java:1509)
      at java.io.ObjectOutputStream.writeFields(ObjectOutputStream.java:418)
      at java.awt.Container.writeObject(Container.java:3452)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:494)
      at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1330)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1281)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1070)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
      at TestSerializeInternalFrame$1.actionPerformed(TestSerializeInternalFrame.java:24)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1834)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2152)
      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:234)
      at java.awt.Component.processMouseEvent(Component.java:5465)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3078)
      at java.awt.Component.processEvent(Component.java:5230)
      at java.awt.Container.processEvent(Container.java:1961)
      at java.awt.Component.dispatchEventImpl(Component.java:3933)
      at java.awt.Container.dispatchEventImpl(Container.java:2019)
      at java.awt.Component.dispatchEvent(Component.java:3781)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4203)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3883)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3813)
      at java.awt.Container.dispatchEventImpl(Container.java:2005)
      at java.awt.Window.dispatchEventImpl(Window.java:1757)
      at java.awt.Component.dispatchEvent(Component.java:3781)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

            kizune Alexander Zuev
            shickeysunw Shannon Hickey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: