Well, I've had all kinds of difficulties working with JTable so far.
I am working with a very simple table. Originally, I constructed it like this:
The data is not known at the time of construction which is why I was passing a null Vector for the dataRows param.
That code worked fine from my PC but the JTable constructor threw NullPointerExceptions on another PC. Both PCs were running
java 1.4.2_05.
So, since one JVM seemed to not like the null dataRows, I created an empty dataRows Vector, like this::
That fixed the NPE's and both PC's seemed to be happy.
However, now I am running into another strange problem with this code:
As you can see the intent is to simply remove all rows from a table. But on [B]one[B] PC, I am getting a ClassCastException in that method. On the other PC, it works fine.
Anyone experience this?
Why would table.getModel() on one PC using the same JRE return something other than DefaultTableModel???