• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with table model

 
walid aly
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear group
I am trying to extend defaulttablemodel , but i found my self forced to implement most of the methods of defaulttablemodel , although they r already implemented in the defaultablemodel class.
otherwise i am having a null pointerexception
the methods i had to implement r:-
public void setDataVector(Vector v1,Vector v2)
public int getColumnCount()
public String getColumnName(int columnIndex)
public Object getValueAt(int rowIndex,int columnIndex)
public void setValueAt(Object aValue,int rowIndex,int columnIndex)
can any one explain
walid
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something is not set, obviously. Use the stack trace to find where the exception is thrown. Find the corresponding place in the JDK source to see what is missing.
You might be better off using AbstractTableModel, by the way.
- Peter
 
walid aly
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actuall i was using stacktrace
the null pointer exeption is from using any method that i do not implement in my subclass
also
y it is better to use abstractmodel
thanks
walid
Originally posted by Peter den Haan:
Something is not set, obviously. Use the stack trace to find where the exception is thrown. Find the corresponding place in the JDK source to see what is missing.
You might be better off using AbstractTableModel, by the way.
- Peter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic