table & TableModel

i am working in table and TableModel i want to show some data from the data base , the problem what i have is when i appear the dialog that contain the table for the first time i can see the information before than move the mouse over the table space. and every time i do action rely to the table ( move scroll ... select row ....) i got this exception in my console :

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

at adtek.pb.client.swing.memo.MemoTableModel.getValueAt(MemoTableModel.java:103)

at javax.swing.JTable.getValueAt(Unknown Source)

at javax.swing.JTable.prepareRenderer(Unknown Source)

at javax.swing.plaf.basic.BasicTableUI.paintCell(Unknown Source)

at javax.swing.plaf.basic.BasicTableUI.paintCells(Unknown Source)

at javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source)

at javax.swing.plaf.ComponentUI.update(Unknown Source)

at javax.swing.JComponent.paintComponent(Unknown Source)

at javax.swing.JComponent.paint(Unknown Source)

at javax.swing.JComponent.paintChildren(Unknown Source)

at javax.swing.JComponent.paint(Unknown Source)

at javax.swing.JViewport.paint(Unknown Source)

at javax.swing.JComponent.paintChildren(Unknown Source)

at javax.swing.JComponent.paint(Unknown Source)

at javax.swing.JComponent._paintImmediately(Unknown Source)

at javax.swing.JComponent.paintImmediately(Unknown Source)

at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)

at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)

at java.awt.event.InvocationEvent.dispatch(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)

any one can help .... thx

[2115 byte] By [fadfbia] at [2007-11-26 18:32:01]
# 1

Ooh.

It might help to see your code.

Then again, if your code is voluminous, try to boil it down to a small example of how you make this error happen. Either in this proces, you learn enough to solve your problem, or you end up with a small code example suitable for posting in this forum. Or maybe even better, in an appropriate GUI library forum.

Good luck. If we don't hear from you again, we'll take it as a good sign. :-)

OleVVa at 2007-7-9 6:06:08 > top of Java-index,Java Essentials,Java Programming...