Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Empty JTable causing problem?

0 views
Skip to first unread message

Greg Speegle

unread,
Sep 22, 2000, 3:00:00 AM9/22/00
to

I was wondering if the following was a known problem or not. Unfortunately, my
program is several hundred lines long, and I don't know where the problem is
coming from. I do know it only happens when the data underlying the JTable is
empty, and that it doesn't disrupt the execution of the program.

Any hints would be appreciated, as I'm about to have to slog through it with
the debugger to try and find what is triggering this.

I get the following exception:

java.lang.NullPointerException
at javax.swing.SwingUtilities.computeIntersection(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.pumpOneEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Thanks in advance,

Greg Speegle


Dave Glasser

unread,
Sep 22, 2000, 9:37:41 PM9/22/00
to
When your table data is empty, are your sure your TableModel's
getRowCount() method is returning 0? If not, that's probably the cause
of the problem.

Gr...@10happythings.com (Greg Speegle) wrote on Fri, 22 Sep 2000
19:53:22 GMT in comp.lang.java.gui:

0 new messages