Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TableModelEvent ... problem with ALL_COLUMNS

Status
Not open for further replies.

jadeT

Programmer
Sep 26, 2007
1
0
0
GY
the model code fires a TablemodelEvent.
the constructor is written like this -
TableModelEvent(this, 0, ALL_COLUMNS, INSERT)
when i try to compile this line,
it complains saying that it does not recognise the ALL_COLUMNS adn the INSERT parameters.
PLEASE HELP ME ASAP !!!!
 
Look at these sample constructors of TableModelEvent (from sun's doc):

1) TableModelEvent(source); // The data, ie. all rows changed
2) TableModelEvent(source, HEADER_ROW); // Structure change, reallcoate TableColumns
3) TableModelEvent(source, 1); // Row 1 changed
4) TableModelEvent(source, 3, 6); // Rows 3 to 6 inclusive changed
5) TableModelEvent(source, 2, 2, 6); // Cell at (2, 6) changed
6) TableModelEvent(source, 3, 6, ALL_COLUMNS, INSERT); // Rows (3, 6) were inserted
7) TableModelEvent(source, 3, 6, ALL_COLUMNS, DELETE); // Rows (3, 6) were deleted


Look at no 6): it has 5 arguments (in your code you have only 4). Maybe

TableModelEvent(this, 0, 0, ALL_COLUMNS, INSERT);

will work (rows 0 to 0)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top