• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception when I delete the last rwo of the JTable using the button I put in one of the cells.

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thank you for reading my post.
My problem is tat when I am trying to delete the last row in a JTable using a button that I placed in one of its columns I receive an exception which cripple the JTable.
I was dealing with this error for one day and I am nowhere. Please let me know if you have any suggestion about it.
I developed following two classes to add a button to one cell of a JTable:

The TableCellRenderer implementation:



The TableCellEditor implementation:


And finally here is how I load the data and use these two classes to add the button to the Jtable:


It works perfect when I press delete button for all rows except for the last row. either it is the only row in the table or there are tens of rows in the table, when I press the delete button for the last row it return the followin exception: The exception happened when my table had 7 rows and I delete the 7th row.

 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question answered in OP's cross-post at forums.sun.com.
 
N. Priore
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pete stein wrote:Question answered in OP's cross-post at forums.sun.com.


And the link to that page would be what? For those of us that would like to see the answer.
 
Rob Spoor
Sheriff
Pie
Posts: 20545
56
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Raminaa, http://faq.javaranch.com/java/BeForthrightWhenCrossPostingToOtherSites
 
Rob Camick
Ranch Hand
Posts: 2599
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
N. Priore wrote:
pete stein wrote:Question answered in OP's cross-post at forums.sun.com.


And the link to that page would be what? For those of us that would like to see the answer.


Actually no answer to the question was given.

The answer provided, explains why people have lost interest in attempting to help this individual. Anway here is the
link
 
N. Priore
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Camick wrote:
N. Priore wrote:
pete stein wrote:Question answered in OP's cross-post at forums.sun.com.


And the link to that page would be what? For those of us that would like to see the answer.


Actually no answer to the question was given.

The answer provided, explains why people have lost interest in attempting to help this individual. Anway here is the
link


Thank you. I appreciate the response.
 
Maneesh Godbole
Saloon Keeper
Posts: 11061
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Pete, Rob.
One more user to my personal ignore list.
 
Doua Beri
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


try to add before you delete the row




hope this helps you.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic