Java abstract class which provides default implementations for most of the methods in the TableModel interface.
Questions tagged [abstracttablemodel]
294 questions
2
votes
1 answer
how to update AbstractTableModel
I made reference to a number of methods.
That the effective way for fireTableCellUpdated.
But in fact I still do not apply.
How to make the table content update in the after DETA value update.
The method I call GJJ method implementation.
Although…

HLto Dm
- 275
- 2
- 5
- 13
2
votes
3 answers
Get row values of ticked checkbox in jtable
class TableModel extends AbstractTableModel {
Object rowData[][] = DataAccess.getSentences();
String columnNames[] = {"Category", "Sentences", "Boolean"};
public int getColumnCount() {
return…

Jong
- 131
- 1
- 2
- 12
2
votes
1 answer
Delete row from JTable with custom table model
I've a subclass of JTable that uses a custom table model (an implementation of AbstractTableModel) to manage data.
The problem occurs when I try to delete a row with the method deleteRow. The row in my table is replaced by a blank string but the…

Luca
- 1,704
- 3
- 29
- 42
2
votes
2 answers
How to display empty column when load txt to JTable?
I need to load .txt to JTable with delimiter, I found a good sample here
This is the sample data :
102|Beth Reiser||New York|(212)5558725
111|Dylan Ricci||Syracuse|(315)5554486
116|Brian Gugliuzza||Mamaroneck|(914)5553817
120|Gertrude…

Fahmi Ramadhan
- 287
- 2
- 4
- 11
2
votes
4 answers
auto update jtable columns when model changes
I've got a class which implements the TableModel Interface.
When I call setModel on my jTable and set my class as the model and then call jTable.updateUI();everything is fine.
But in some circumstances I want to change the model with a different…

soupdiver
- 3,504
- 9
- 40
- 68
2
votes
1 answer
how can i use removeTableModelListener
I implemented "addTableModelListener" at run-time in my table-model, but I want to create one more control for removing it. I have searched Google, but I haven't found any suitable logic to implement removing the table model listener.
Please help me…

Wahaj Latif
- 47
- 5
2
votes
2 answers
Implementing ArrayLists to Table models
Hi I have an arraylist of a class I created called Pets which has the variables below
private String name;
private String species;
private int age;
I wanted to display this arraylist into a jTable and I did that succesfully by using…

skon
- 605
- 1
- 7
- 13
1
vote
5 answers
Java: How to insert rows(data) into JTable explicitly if rows are inserted by AbstractTableModel
In my application there is a JTable and I want to insert row after creating table.
Following all codes are in the constructor of the frame.
Code:
private TableModel model = new AbstractTableModel(){
String[] columnNames = {"First Name","Last…

Vinit ...
- 1,409
- 10
- 37
- 66
1
vote
1 answer
Database data doesn't fill into JTable
I've been working on this code for couple of days. My procedure on the database works fine but it doesn't fill into the table. I'm going through the code again and again but I can't find what's wrong... The error I get is: JavaNullPointerException…

neocorp
- 569
- 7
- 20
1
vote
0 answers
A way to set font in Abstract Table Model
I created a abstract table model that shows data stored. My problem is that the font size is too big for the row height. Is there a way to set font in abstract table model?

Vince Viloria
- 35
- 4
1
vote
2 answers
Best practise for updating data in a AbstractTableModel in a non AWT thread
I've sub classed AbstractTableModel for use as the model for my JTable. Whenever data is added to I call fireTableRowsInserted() in the AWT thread. All access to my underlying container is made thread safe by using synchronized methods.
This pattern…

CodeBuddy
- 5,749
- 1
- 25
- 30
1
vote
1 answer
How to toggle the value of a checkbox in a JTable when extending from AbstractTableModel
I hope you can help me with a problem that has been bugging me for days now!
I've read a lot of SO answers and various examples from around the web and I've tried my best to read the DefaultTableModel source code to try and understand what's…

DoTheDonkeyKonga
- 113
- 1
- 6
1
vote
1 answer
java /TableModel of Objects/Update Object"
I've a collection of Stock objects that I'm updating about 10/15 variables for in real-time. I'm accessing each Stock by its ID in the collection. I'm also trying to display this in a JTable and have implemented an AbstractTablemodel. It's not…
user761437
1
vote
1 answer
Updating TableModel of spanned cell setHorizontalSpan causes IllegalArgumentException
Using con.setHorizontalSpan(2); produces IllegalArgumentException when trying to update TableModel,
If I remove this line of code, the table updates normally; I basically need to span specific cells, and hide those cells that I don't need displayed,…

Jari
- 121
- 4
1
vote
0 answers
Add Rows and Data in Specific Cells with Multithread run - ArrayIndexOutOfBoundsException
I'm trying to run an app that shows the result of the 4 elapsed time of 4 cars in a JTable.
So I'm looking for update the cell of the faster car first meanwhile, the other cars are arriving by the time by a sleeping via threads.
Each thread run the…