Ciao a tutti.
Sarei davvero grato a chiunque mi possa suggerire una causa del comportamento che vi illustro ora..ha davvero del paranormale.
L'eccezione che viene lanciata dal programma è questa:
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1064)
at javax.swing.SwingGraphics.createSwingGraphics(Swin gGraphics.java:147)
at javax.swing.JComponent._paintImmediately(JComponen t.java:4677)
at javax.swing.JComponent.paintImmediately(JComponent .java:4495)
at javax.swing.RepaintManager.paintDirtyRegions(Repai ntManager.java:410)
at javax.swing.SystemEventQueueUtilities$ComponentWor kRequest.run(SystemEventQueueUtilities.java:117)
at java.awt.event.InvocationEvent.dispatch(Invocation Event.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 454)
at java.awt.EventDispatchThread.pumpOneEventForHierar chy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:100)
java.lang.NullPointerException
at javax.swing.JComponent._paintImmediately(JComponen t.java:4678)
at javax.swing.JComponent.paintImmediately(JComponent .java:4495)
at javax.swing.RepaintManager.paintDirtyRegions(Repai ntManager.java:410)
at javax.swing.SystemEventQueueUtilities$ComponentWor kRequest.run(SystemEventQueueUtilities.java:117)
at java.awt.event.InvocationEvent.dispatch(Invocation Event.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 454)
at java.awt.EventDispatchThread.pumpOneEventForHierar chy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:100)
In paintImmediately null graphics
In pratica sono riuscito a vedere che si ha ogni tanto (non sempre!) quando chiamo un metodo che setta il DefaultTableModel ad una tabella. Ecco il metodo:
codice:
private void settaModello(Vector contenuto, Vector header){
DefaultTableModel model = new DefaultTableModel(contenuto, header) {
public boolean isCellEditable (int row, int col) {
return false;
}
};
//elencoArchivi è il nome della tabella da settare
elencoArchivi.setModel(model);
elencoArchivi.setRowHeight(18);
elencoArchivi.setRowSelectionAllowed(true);
}
Spero ci sia qualcosa di sbagliato in questo metodo...
Vi prego aiutatemi!!!
Grazie a tutti in anticipo