-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
P4
-
None
-
Affects Version/s: 1.1
-
Component/s: client-libs
-
sparc
-
solaris_2.6
Detailed Description:
Try this.
---------
import java.awt.*;
import java.awt.event.*;
import java.io.*;
public class test {
public static void main(String args[]) throws IOException {
ObjectOutputStream oos = new ObjectOutputStream(
new ByteArrayOutputStream());
ScrollPane sp = new ScrollPane();
sp.getHAdjustable().addAdjustmentListener(new AdjustmentListener() {
public void adjustmentValueChanged(AdjustmentEvent ev) {}
}); // this is key
oos.writeObject(sp);
}
}
Try this.
---------
import java.awt.*;
import java.awt.event.*;
import java.io.*;
public class test {
public static void main(String args[]) throws IOException {
ObjectOutputStream oos = new ObjectOutputStream(
new ByteArrayOutputStream());
ScrollPane sp = new ScrollPane();
sp.getHAdjustable().addAdjustmentListener(new AdjustmentListener() {
public void adjustmentValueChanged(AdjustmentEvent ev) {}
}); // this is key
oos.writeObject(sp);
}
}
- duplicates
-
JDK-4085659 need to document serialization of AWT listeners
-
- Resolved
-