Hi!
It seams that my problem is a very common one but I am just too stupid to get it solved.
What I want to have is a JTable with JButtons in one row.
That's no problem (hm... okay it was / is a problem) after searching half of the internet for examples. I found one that really worked but not the way I want it. The buttons just should throw an ActionEvent that I can catch in my main class (extends JFrame) and then the table's row to which this button blongs should be deleted.
I managed to do this with the example I found but tried to remove the row within the getCellEditorValue() of the "ButtonEditor" class (extends DefaultCellEditor). As a result I got an ArrayIndexOutOfBounceException.
I am really fishing in the dark here. Why is it the use of JTable that complicated?
Summary:
I need an implementation of JTable with a constructor that eats vectors for headers and data and holds a row of 'delete'-buttons that can remove 'their row'.
I know that this can be done but either I am to stupid or I am having a blockade. However... I hope that there is someone out there who can give me a working and transparent solution of what I need?!
The more I work with swing the more I hate it... this doesn't make any fun at all. :-(
Cheers
frag
patrick.metz@epost.de
It seams that my problem is a very common one but I am just too stupid to get it solved.
What I want to have is a JTable with JButtons in one row.
That's no problem (hm... okay it was / is a problem) after searching half of the internet for examples. I found one that really worked but not the way I want it. The buttons just should throw an ActionEvent that I can catch in my main class (extends JFrame) and then the table's row to which this button blongs should be deleted.
I managed to do this with the example I found but tried to remove the row within the getCellEditorValue() of the "ButtonEditor" class (extends DefaultCellEditor). As a result I got an ArrayIndexOutOfBounceException.
I am really fishing in the dark here. Why is it the use of JTable that complicated?
Summary:
I need an implementation of JTable with a constructor that eats vectors for headers and data and holds a row of 'delete'-buttons that can remove 'their row'.
I know that this can be done but either I am to stupid or I am having a blockade. However... I hope that there is someone out there who can give me a working and transparent solution of what I need?!
The more I work with swing the more I hate it... this doesn't make any fun at all. :-(
Cheers
frag
patrick.metz@epost.de