Java abstract class which provides default implementations for most of the methods in the TableModel interface.
Questions tagged [abstracttablemodel]
294 questions
0
votes
1 answer
Custom AbstractTableModel not displaying data correctly
I want to extract data from a table in the database based on the columns I specify using an AbstractTableModel. There are 8 columns in the table but want to only show 3 of the 8 columns.
For example:
The database has these columns: ID, First_Name,…

wojg21
- 93
- 1
- 10
0
votes
1 answer
swing jtable display a number of rows by default
I am developing a desktop application with java swing and NetBeans
It uses a jtable with a custom table model to render data.
I want to display a minimum number of rows with the table
such that even when the actual number of rows to be…

CodeAngel
- 569
- 1
- 11
- 31
0
votes
2 answers
Deletion of JTable row
I'm working on jTable and I intend on deleting specific rows as part of the data manipulation to be conducted on the table. Essentially I've been able to successfully delete a row which the user would specify but I what I really want to do is to…

TokTok123
- 753
- 3
- 11
- 27
0
votes
1 answer
Improving design by extracting multiple TableModels into a single TableModelManager
I've been stuck on this particular part of my design and I'd like some input as to how I should approach it. My program consists of courses LeerTrajecten and elements Elementen. Both of these objects can exist independently, but elements can also be…

Jeroen Vannevel
- 43,651
- 22
- 107
- 170
0
votes
1 answer
I'm adding an empty row to my JTable (implementing AbstractTableModel). How do I update my model in real time?
Ok so I think the title is all I've got to ask here.
My AbstractTableModel works fine, when I want to add an empty row, I use the following code to do so:
public void addRow() {
Object[][] oldData = data;
data = new Object[oldData.length +…

Karan Goel
- 1,117
- 1
- 12
- 24
0
votes
1 answer
Why is the constructor not working in the code below?
Here I want to allocate number of rows in a table dynamically using constructor.
datamodel is the class and datamodel(int count) method assigns no.of row.
import javax.swing.table.AbstractTableModel;
@SuppressWarnings("serial")
public class…

Praful
- 43
- 2
- 6
0
votes
3 answers
Java: Display two different JTables which are created from the same AbstractTableModel
I have a problem in the display of two different JTables which are created by the same AbstractTableModel. I don't really think that is important to show the code of the AbstractTableModel, but if I am asked for I may present it as well.
I just…

Dimitra Micha
- 2,089
- 8
- 27
- 31
0
votes
1 answer
Java: Adding a row of JCombobox in a AbstractTableModel
I am trying to make a row which will contain JCombobox in a class which extends AbstractTableModel.
I have a 2D array which is called data. I also use the method getColumnCount() in order to implement two buttons "Previous" and "Next". I have marked…

Dimitra Micha
- 2,089
- 8
- 27
- 31
0
votes
1 answer
Java JTable set AbstractTableModel in constructor after my code
I have a class that extends JTable, and I want to set it's AbstractTableModel, but the only way I can see how that's possible is by calling the JTable constructor using super.
However, I need to initialize some variables (that hold the table data)…

Theon144
- 87
- 1
- 5
0
votes
2 answers
Allowing JTable to be edited by program only, but allowing users able to copy data from it
Not really sure how to word the title with out making it a paragraph long.
Basically I have a JTable in my program that I can't let the users edit. But the program must be able to edit it itself. Futhermore, the user must be allowed to actually…

J_mie6
- 720
- 1
- 9
- 25
0
votes
3 answers
TableModel - Doesn`t show anything in the gui?
I am fetching the data from the DAO to the GUI level.
When I want to load the Table I get an empty table only with the right row count of the clicked db symbol:
To load the elements I use:
playlistTable.addMouseListener(new MouseAdapter() {
…

maximus
- 11,264
- 30
- 93
- 124
0
votes
2 answers
Java Swing JTable: cannot access the values in the table due to incorrect usage/creation of table model
I am just beginning to program using Java Swing. I am not very familiar with each of the many Java Swing Classes, and have ran into a stumbling block regarding the creation of a Table.
I am trying to figure out how to add a table to a Java Swing…

fudge22it
- 103
- 1
- 2
- 13
0
votes
1 answer
Extends AbstractTableModel and populate jTable dynamically
Basically, I'm working on a Client Server Architecture so Objects can be modified externally by some Clients.
I have a bank :
public class Bank{
private List operationList = new ArrayList();
public void…

xenom
- 377
- 1
- 5
- 15
0
votes
1 answer
JTable#repaint() not functioning as expected
This application pulls data from a text file and inserts it into JTable. An Observer is attached to check every 300 ms if there is a change to the file and reload the data. I have the setChanged() and notifyObservers() in my Observer class.
When…

Fred
- 29
- 8
0
votes
2 answers
JTable from AbstractTableModel not showing
Im using Window Builder plugin in eclipse to make all the visual components, and i add a JTable, and at first it was a simple JTable, and it show the data correctly. Since i need that the data of the JTable be non-editable, i create a model to use…

Pedro
- 41
- 9