急求!!!Java异常如何解决????

韩鹤 发布于 2011/05/25 23:13
阅读 556
收藏 1

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at com.haiersoft.jxc.jinhuodan.view.JinhuodanFrm$computeInfo.componentRemoved(JinhuodanFrm.java:350) at java.awt.Container.processContainerEvent(Container.java:2070) at java.awt.Container.processEvent(Container.java:2038) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.Container.remove(Container.java:1162) at java.awt.Container.remove(Container.java:1198) at javax.swing.JTable.removeEditor(JTable.java:5803) at javax.swing.JTable.editingStopped(JTable.java:4713) at javax.swing.AbstractCellEditor.fireEditingStopped(AbstractCellEditor.java:125) at javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(DefaultCellEditor.java:350) at javax.swing.DefaultCellEditor.stopCellEditing(DefaultCellEditor.java:215) at javax.swing.JTable$GenericEditor.stopCellEditing(JTable.java:5466) at javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(BasicTableUI.java:980) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263) at java.awt.Component.processMouseEvent(Component.java:6264) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6032) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4235) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

加载中
0
blur
blur

请看异常。

java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at com.haiersoft.jxc.jinhuodan.view.JinhuodanFrm$computeInfo.componentRemoved(JinhuodanFrm.java:350) 

0
韩鹤

String column7 = (String) table.getValueAt(i, 7);
    String column6 = (String) table.getValueAt(i, 6);
     我怎么试也不行,

0
szmneo
szmneo

引用来自#3楼“韩鹤”的帖子

String column7 = (String) table.getValueAt(i, 7);
    String column6 = (String) table.getValueAt(i, 6);
     我怎么试也不行,

还是看看基本的java书吧

 String column6 =String.valueOf(table.getValueAt(i, 6));

0
blur
blur

引用来自#3楼“韩鹤”的帖子

String column7 = (String) table.getValueAt(i, 7);
    String column6 = (String) table.getValueAt(i, 6);
     我怎么试也不行,

补习一下类型转换的知识。

String.valueOf()

或Integer.toString()

0
DreamWorker
DreamWorker

海尔啊,好像还是进货单,呵呵,要是我的团队肯定要挨K的,居然敢用拼音。

0
aoyanfeng
aoyanfeng

Java GUI 喔,很少见。

不过,我也挺喜欢的。

返回顶部
顶部