Java abstract class which provides default implementations for most of the methods in the TableModel interface.
Questions tagged [abstracttablemodel]
294 questions
0
votes
0 answers
Abstract Table Model isCellEditable() Overriding did not make cells editable
I am implementing a JTable with a TableModel.
I've got a problem to make cells editable on this specific one.
Here is my isCellEditable overriding of the TableModel
@Override
public boolean isCellEditable(int rowIndex, int columnIndex) {
…

Samuel T
- 1
- 1
0
votes
1 answer
JTable Date Column cannot be edited
I am developing a desktop application in java with NetBeans 8.0
there is a JTable with a custom made table model. However I am able to
edit a column with the Date data type.
Below are the code snippets.
public class DuesTableModel extends…

CodeAngel
- 569
- 1
- 11
- 31
0
votes
1 answer
How to update Jtable propertly using a class extending AbstractTableModel?
This class extends AbstractTableModel. It has an ArrayList arr but I don't know how to use the fire methods.
public void adiciona(Entidad e) {
if(DEBUG)
System.out.println( " tamaño: "+tamaño()+" columas: "+getColumnCount()+"" + …

corlaez
- 1,352
- 1
- 15
- 30
0
votes
3 answers
java AbstractTableModel 2 Different Color For Each Row
I want to increase readability of my jtable , here is MyTableModel.java class below , how to make each row with 2 different color shown in this picture . What should be the specific method that I can give different color to each row to increase…

mussdroid
- 732
- 1
- 9
- 22
0
votes
1 answer
insert Row into jtable using AbstractTableModel with hibernate
im developing an application and i'm trying to insert a new row into jtable
i've followed this tutorial , the user can add/remove product information(row) through a form.the database & the table should be updated ,the remove function works well but…

Mohamed Nageh
- 1,963
- 1
- 19
- 27
0
votes
1 answer
JTable, isCellEditable return true and cell isn't editable
i have a problem with JTable and isCellEditable. I use two arrays to make a cell editable:
private boolean cEFilm[]={true,true,true,true,false,false,false,false,true,false};
private boolean…

Raziel
- 53
- 1
- 8
0
votes
1 answer
Duplicate Row in JTable using AbstractTableModel and ArrayList
I am using a JTable and extending an AbstractTableModel to do so. My data container is an ArrayList of "Entries", a data structure I defined to store a group of objects.
I am looking for assistance/advice on how to implement a button that allows the…

NewbornCodeMonkey
- 198
- 1
- 13
0
votes
1 answer
Sorted JTable's return value of rowAtPoint(Point)
I am trying to make a Checkbox change value on click in a JTable. Here is the code I use for that in the MouseListener
public void mouseClicked(MouseEvent e) {
Point mouse = e.getPoint();
int row = table.rowAtPoint(mouse);
int col =…

usama8800
- 893
- 3
- 10
- 20
0
votes
1 answer
JTable fireDataChanged duplicating cell values
I tried searching for the answer but I never found anyone having this problem.
Basically what's happening is that the JTable that's supposed to show my objects is duplicating the value of last cell value into the cell before that.
To be more…

mercin
- 15
- 4
0
votes
2 answers
How to refresh a JTable on JScrollPane
as many other persons, I want my JTable being actualized after adding rows.
Here you can see the fragments of my code.
ArrayList<> foundR = new ArrayList();
JTable resultsTable = new JTable();
AbstractTableModel resultsModel = new…

user2957954
- 1,221
- 2
- 18
- 39
0
votes
1 answer
AbstractTableModel doesnt return drive names
I am trying to create system file browser with starting in drive directory.
public class FileSystemTableModel extends AbstractTableModel implements
Constants {
private File currentDircetory;
private File[] files;
@Override
public Object…

Cupuycblack
- 9
- 1
- 2
0
votes
1 answer
JTable renders removed JButton instead of a new one
The program in general is 3 arrays of a custom objects , with a JTable representing each array. I have a custom renderer and tablemodel. The custom object has inside it an object which is every visual element.
When I remove a row from 1 table and…

user3224416
- 522
- 5
- 15
0
votes
1 answer
Creating table model from resultset with checkbox
I open case about it but i dont understand adviced articles. Because i dont find good example about it. If someone write a sample code for below scenario very helpful for me. Let me explain my problem;
I have SQL table in MSSQL DB like;
Column 1:…

Black White
- 700
- 3
- 11
- 31
0
votes
2 answers
Change Column names of AbstractTableModel
Is it possible to change AbstractTableModel column names dynamically?
I am trying to implement setColumnName(0, "Speed rpm") method.
public class MyModel extends AbstractTableModel {
private String[] columnNames = {"Speed", "Pressure",
…

Vijay Vennapusa
- 169
- 3
- 15
0
votes
2 answers
Add Rows in JTable
I am trying to insert Dynamic Rows from Array. I am using following code given on Oracle site:
class mYModel extends AbstractTableModel
{
Object rowData[][] = { {Boolean.TRUE ,"11","OMF","C++","Jhon Doe",22}};
Object[] arr = new Object[5];
…

Volatil3
- 14,253
- 38
- 134
- 263