• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Question answered in OP's cross-post at forums.sun.com.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Raminaa, http://faq.javaranch.com/java/BeForthrightWhenCrossPostingToOtherSites
 
Rancher
Posts: 3324
32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Pete, Rob.
One more user to my personal ignore list.
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


try to add before you delete the row




hope this helps you.

 
reply
    Bookmark Topic Watch Topic
  • New Topic