aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Exception when I delete the last rwo of the JTable using the button I put in one of the cells. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Exception when I delete the last rwo of the JTable using the button I put in one of the cells." Watch "Exception when I delete the last rwo of the JTable using the button I put in one of the cells." New topic
Author

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

raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 551
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

Joined: Feb 23, 2007
Posts: 1561
Question answered in OP's cross-post at forums.sun.com.
N. Priore
Greenhorn

Joined: Aug 10, 2009
Posts: 4
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

Joined: Oct 27, 2005
Posts: 19755
    
  20

Raminaa, http://faq.javaranch.com/java/BeForthrightWhenCrossPostingToOtherSites


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2213
    
    7
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

Joined: Aug 10, 2009
Posts: 4
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

Joined: Jul 26, 2007
Posts: 10519
    
    9

Thank you Pete, Rob.
One more user to my personal ignore list.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Doua Beri
Ranch Hand

Joined: Sep 24, 2009
Posts: 60


try to add before you delete the row




hope this helps you.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception when I delete the last rwo of the JTable using the button I put in one of the cells.