SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Originally posted by Maneesh Godbole:
Why are you using the abstract table model? Any particular reason why you cannot use the DefaultTableModel?
Originally posted by Sharad Golu:
After trying this code,I am facing tese issues..
1) I need to click on every cell then only checkbox is visible.
2) Once i click another cell then checkbox of that particular cell is only visible and previouly clicked cell is again displaying nothing(just like blank TextField.
Originally posted by Sharad:
Rob
Last thread was reagrding adding checkbox and this is for checkbox is not working.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Originally posted by Sharad:
long back when i created my user id on this website.. i just entered it as Sharad Golu....
Now i have make the correction and it will display only sharad further.
I haven't dropped the 2nd part by mistake![]()
Originally posted by Sharad:
ok ok....
My first & last name are already there...I have only modified the Display Name
I think "Add checkbox in Jtable" subject moved to "Add first & last Name" :roll:
Now back to thread...
I am displaying 10 rows(data is setted in model) in my Jtable with checkboxes & on clicking delete button, 5 selected rows are deleted from model(& i.e model is updated successfully with the remaining 5 records only.
But, still my table is displaying all the 10 records. All the time i need to restart my application to get the affected result..
My requirement is, if data model is upadated the JTable should also gets updated automatically with the new records only and user didnt need tio restart the application again.
Please le me know how to implemment this.
Thanks
Sharad
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Originally posted by Sharad:
My first & last name are already there...I have only modified the Display Name
AbstractTableModel has some methods to fire updates. Not surprisingly, they all start with "fireTable". Check those out. In this case, you need fireTableRowsDeleted.
Originally posted by Sharad Goluone:
here the problem is.. Database rows are deleted successfully but table model ramains as it is..
Say for example ---
My Jtable is displaying list of records with checkboxes...
out of 3 checkboxes in a table i select 2 checkbox and click dalete button.
selected two rows are deleted successfully from Database but table/tablemodel is remains unaffected(i.e rows deleted from DB but table model is not updating)..and displaying the same result..
I need to display only one row now with resarting my application.
Please let me know how to implement this..I am not using any kind of listeners on table as of now.
Well behaved women rarely make history - Eleanor Roosevelt. tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|