Java abstract class which provides default implementations for most of the methods in the TableModel interface.
Questions tagged [abstracttablemodel]
294 questions
1
vote
1 answer
How to do getValueAt() when using an AbstractTableModel
I'm trying to make an program that shows all files in the temerary folder using an AbstractTableModel but how do i code the getValueAt() method.
The names of the files should be in the first column and the file path should be in the second column.
I…

Piet Jetse
- 388
- 1
- 5
- 16
1
vote
2 answers
JTable CheckBox uneditable
I've made my AbstractTableModel but my checkbox in table is not editable. When I click on it, nothing changes, my checkbox in column "Done" is still unchecked. How can I make it checkable ? Also I need to save Order Number when CheckBox is checked,…

Mahir Duraković
- 135
- 1
- 23
1
vote
2 answers
Change/Update JTable content with JComboBox(category)
I have a problem with my JTable. My JTable displays content of a database. One database table has the name category. Every category is displayed in the JComboBox. If I click on a category it should update the table content.
Here is a short snipped…

Gerret
- 2,948
- 4
- 18
- 28
1
vote
2 answers
Row refreshing when cell is edited
Im having problems with this JTable. I edit a cell like this
Then i commit changes pressing enter. Here im hoping that table gui refresh with new values.
But they aren't show, they are only show when i change selection like…

nachokk
- 14,363
- 4
- 24
- 53
1
vote
2 answers
Can't refresh my JTable with new data
I create a JTable when the frame is intially created, but create an empty AbstractTableModel which I extended. Then the user has to select something from a JComboBox and the user can preview the messages dealing with that specified selection.
When…

samwell
- 2,757
- 9
- 33
- 48
1
vote
1 answer
remove or Add rows from JTable with AbstractTableModel
ive been trying to update the table after the insertion or deletion of items from a abstract table model but whenever i do that, instead of removing the old records and replace with the new ones, the old rows remains and it creates all the rows…

Ogre3dUser
- 79
- 1
- 3
- 10
1
vote
3 answers
How to update the view of JTable after adding a new row?
This is my TableModel, I have extended AbstractTableModel
class CustomTableModel extends AbstractTableModel
{
String[] columnNames = {"Name","Contact","eMail","Address","City","Pin","State","Type","ID"};
Vector data = new…

user2380811
- 55
- 1
- 7
1
vote
2 answers
Add row to top of AbstractTableModel
I have a abstractTableModel which I need to add rows to the top, so the user can see the most recent entered data, but default it adds to the bottom of the table. Any suggestions?

Ulbo
- 346
- 8
- 20
1
vote
1 answer
Add/Remove more columns to a JTable from a custom AbstractTableModel
I have a vector with HashMap elements.
I want to put it in a table and every HashTable value must be in column with HashTable key column-title.
So elements with key "key1" must appear on table column with name "key1".
The problem is when I try to…

Chameleon
- 1,804
- 2
- 15
- 21
1
vote
1 answer
AbstractTableModel and cell editor
The example i have found:
http://www.java2s.com/Code/Java/Swing-Components/ButtonTableExample.htm
show how to create a JTable with specified column (button). It works properly, but the my problem is, that i need to use AbstractTableModel instead of…

Adam Płócieniak
- 106
- 7
1
vote
2 answers
Hiding an individual cell in JTable depending on model value
I have a JTable showing values from a model allowing integer values 0, 1 and 2. The values are shown in a 9 by 9 grid (like a sudoku game board).
My question is: How do I hide the zero values from the GUI?
That is, in the table cells that has a…

Fredrik Rafn Strandberg
- 159
- 13
1
vote
1 answer
Edit JTable row
I use JTable to show users information.
I add a edit button that when user select a row and clicked that button, selected row must edit and rewrite to file.
How Should do it?
public class AllUser extends AbstractTableModel {
UserInformation uiS =…

Sajad
- 2,273
- 11
- 49
- 92
1
vote
0 answers
Java: JTable Listener in AbstractTableModel seems to not work
I have been reading about the TableModelListener (http://www.cs.auckland.ac.nz/compsci230s1c/lectures/xinfeng/swingmodelview.pdf) for a while now and I am trying to implement a Listener for a JTable which uses the AbstractTableModel.
To explain the…

Dimitra Micha
- 2,089
- 8
- 27
- 31
1
vote
2 answers
Effect JTable Cell Value Changing On Text file
I use this method for changing my table cell value,
it change on jtable But not change on text file!
public class user_AllBooks extends AbstractTableModel {
BookInformation book_info = new BookInformation();
String[] columns = new…

Sajad
- 2,273
- 11
- 49
- 92
1
vote
3 answers
Add Row to JTable and File
I use this method to add a new row to my jtable and file too.
But when i clicked to add button, That new record added to jtable, but when i see the text file, I found something like this:
myproject.Library.BookInformation@9899472
where is my…

Sajad
- 2,273
- 11
- 49
- 92