我一直在尝试用序列化来解决我的问题,不幸的是我迷路了。如果有人可以帮助我找到问题,我将不胜感激。我已经在每个类中实现了 Serializable。
已解决:问题是,一个类实现了 Serializable 并扩展了 AbstractTableModel。我为表模型创建了新的类,问题就消失了。
IO java.io.NotSerializableException: com.apple.laf.AquaPainter$AquaSingleImagePainter
- field (class "com.apple.laf.AquaTableHeaderBorder", name: "painter", type: "class com.apple.laf.AquaPainter")
- object (class "com.apple.laf.AquaTableHeaderBorder", com.apple.laf.AquaTableHeaderBorder@77eb5239)
- field (class "javax.swing.JComponent", name: "border", type: "interface javax.swing.border.Border")
- custom writeObject data (class "javax.swing.JComponent")
- object (class "sun.swing.table.DefaultTableCellHeaderRenderer", sun.swing.table.DefaultTableCellHeaderRenderer[Table.cellRenderer,-150,-16,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=com.apple.laf.AquaTableHeaderBorder@77eb5239,flags=25165832,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,horizontalAlignment=CENTER,horizontalTextPosition=TRAILING,iconTextGap=4,labelFor=,text=Cena,verticalAlignment=CENTER,verticalTextPosition=CENTER])
- field (class "javax.swing.table.JTableHeader", name: "defaultRenderer", type: "interface javax.swing.table.TableCellRenderer")
- custom writeObject data (class "javax.swing.table.JTableHeader")
- object (class "javax.swing.table.JTableHeader", javax.swing.table.JTableHeader[,0,0,450x16,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=16777544,maximumSize=,minimumSize=,preferredSize=,draggedDistance=0,reorderingAllowed=true,resizingAllowed=true,updateTableInRealTime=true])
- custom writeObject data (class "javax.swing.event.EventListenerList")
- object (class "javax.swing.event.EventListenerList", EventListenerList: 2 listeners: type javax.swing.event.TableColumnModelListener listener javax.swing.JTable[,0,0,450x16,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=251674952,maximumSize=,minimumSize=,preferredSize=,autoCreateColumnsFromModel=true,autoResizeMode=AUTO_RESIZE_SUBSEQUENT_COLUMNS,cellSelectionEnabled=false,editingColumn=-1,editingRow=-1,gridColor=javax.swing.plaf.ColorUIResource[r=255,g=255,b=255],preferredViewportSize=java.awt.Dimension[width=450,height=400],rowHeight=16,rowMargin=1,rowSelectionAllowed=true,selectionBackground=com.apple.laf.AquaImageFactory$SystemColorProxy[r=49,g=102,b=202],selectionForeground=com.apple.laf.AquaImageFactory$SystemColorProxy[r=255,g=255,b=255],showHorizontalLines=true,showVerticalLines=true] type javax.swing.event.TableColumnModelListener listener javax.swing.table.JTableHeader[,0,0,450x16,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=16777544,maximumSize=,minimumSize=,preferredSize=,draggedDistance=0,reorderingAllowed=true,resizingAllowed=true,updateTableInRealTime=true])
- field (class "javax.swing.table.DefaultTableColumnModel", name: "listenerList", type: "class javax.swing.event.EventListenerList")
- object (class "javax.swing.table.DefaultTableColumnModel", javax.swing.table.DefaultTableColumnModel@4621e873)
- field (class "javax.swing.JTable", name: "columnModel", type: "interface javax.swing.table.TableColumnModel")
- custom writeObject data (class "javax.swing.JTable")
- object (class "javax.swing.JTable", javax.swing.JTable[,0,0,450x16,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=251658568,maximumSize=,minimumSize=,preferredSize=,autoCreateColumnsFromModel=true,autoResizeMode=AUTO_RESIZE_SUBSEQUENT_COLUMNS,cellSelectionEnabled=false,editingColumn=-1,editingRow=-1,gridColor=javax.swing.plaf.ColorUIResource[r=255,g=255,b=255],preferredViewportSize=java.awt.Dimension[width=450,height=400],rowHeight=16,rowMargin=1,rowSelectionAllowed=true,selectionBackground=com.apple.laf.AquaImageFactory$SystemColorProxy[r=49,g=102,b=202],selectionForeground=com.apple.laf.AquaImageFactory$SystemColorProxy[r=255,g=255,b=255],showHorizontalLines=true,showVerticalLines=true])
- custom writeObject data (class "javax.swing.event.EventListenerList")
- object (class "javax.swing.event.EventListenerList", EventListenerList: 1 listeners: type javax.swing.event.TableModelListener listener javax.swing.JTable[,0,0,450x16,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=251658568,maximumSize=,minimumSize=,preferredSize=,autoCreateColumnsFromModel=true,autoResizeMode=AUTO_RESIZE_SUBSEQUENT_COLUMNS,cellSelectionEnabled=false,editingColumn=-1,editingRow=-1,gridColor=javax.swing.plaf.ColorUIResource[r=255,g=255,b=255],preferredViewportSize=java.awt.Dimension[width=450,height=400],rowHeight=16,rowMargin=1,rowSelectionAllowed=true,selectionBackground=com.apple.laf.AquaImageFactory$SystemColorProxy[r=49,g=102,b=202],selectionForeground=com.apple.laf.AquaImageFactory$SystemColorProxy[r=255,g=255,b=255],showHorizontalLines=true,showVerticalLines=true])
- field (class "javax.swing.table.AbstractTableModel", name: "listenerList", type: "class javax.swing.event.EventListenerList")
- object (class "zakaznik.Host", Zakaznik{nazev=rychly0, ucetDPH=27.0})
- custom writeObject data (class "java.util.ArrayList")
- object (class "java.util.ArrayList", [Zakaznik{nazev=rychly0, ucetDPH=27.0}])
- field (class "zakaznik.Zakaznici", name: "rychly", type: "interface java.util.List")
- root object (class "zakaznik.Zakaznici", zakaznik.Zakaznici@60ab6b6f)