Hi!
Hab irgend nen fehler bei meinem castoperatoren:
der sagt mir immer (also die VM):
Liegt beim Cast das Problem oder was ist das Problem?
ToMiNaToR
Hab irgend nen fehler bei meinem castoperatoren:
Code:
public void edrawstring(int i, int col){
if(((String)((ArrayList)bib.get(firstentry+i)).get(5)).equals("n")){ //eigentliche Zeile: 108
offscreen.setColor(new Color(255,255,255));
offscreen.setFont(fntnorm);
}
offscreen.drawString(((String)((ArrayList)bib.get(firstentry+i)).get(1)),0,100);
}
der sagt mir immer (also die VM):
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.Integer
at ETK.guiList.edrawstring(guiList.java:108)
at ETK.guiList.edrawlist(guiList.java:94)
at ETK.guiList.paint(guiList.java:128)
at sun.awt.RepaintArea.paintComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.Integer
at ETK.guiList.edrawstring(guiList.java:108)
at ETK.guiList.edrawlist(guiList.java:94)
at ETK.guiList.paint(guiList.java:128)
at sun.awt.RepaintArea.paintComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Liegt beim Cast das Problem oder was ist das Problem?
ToMiNaToR