Questions tagged [abstracttablemodel]

Java abstract class which provides default implementations for most of the methods in the TableModel interface.

294 questions
0
votes
2 answers

Updating JTable Data -- using a AbstractTableModel

I have been reading the forums extensively and tried numerous methods on how to solve this problem. The Problem: I made a custom AbstractTableModel so I can control the way my data is displayed. It is simply stored in a String[][]. It connects to a…
Richie Episcopo
  • 383
  • 1
  • 3
  • 15
0
votes
1 answer

adding data dynamically to the Extended class of AbstractTableModel

I've some data that loaded from my db and stored in a another class as a public static List,i can't access my data in MyTableModel class to store and see them in the jtable... there are many other ways exist to filling table with my data but they…
A.R.H
  • 383
  • 2
  • 6
  • 25
0
votes
1 answer

Execute the query on getValueAt and return the results asynchronously

I am implementing a swing jtable with a huge number of data, i want the data to be loaded at the moment of getValueAt in the data model and print "Loading" in the cell and return the data later, I dont wanna to execute the query in the UI Thread.…
Vervatovskis
  • 2,277
  • 5
  • 29
  • 46
0
votes
1 answer

JTable column names displayed wrong

I want to display some things in a JTable. The problem is that the JTable columnnames are "A", "B", "C", ... my code is like this: import javax.swing.JTable; public class View extends JFrame implements Observer { private JTable contentTable; …
0
votes
2 answers

Resizing columns within my JTable in the GUI

I have this code : JPanel textPanel = new JPanel(); textPanel.setLayout(new GridLayout(0,1)); //JPanel text = new JPanel(); //text.setBorder(new TitledBorder(new EtchedBorder(), "Disploay Area")); MyModel model = new…
Ducky
  • 25
  • 1
  • 4
0
votes
2 answers

How to pass an array of objects to a button?

I have two classes: one called Student and the other one called Course. I would like to make a simulation for a simple registration system. My Student class part has the following form: class Student { private String id, private Course[]…
Little
  • 3,363
  • 10
  • 45
  • 74
0
votes
1 answer

JTable loading row by entering the first cell value

How to load row data by enter the first cell value, for example a watchList JTable and in the first column is the stock code thus when I enter F symbol I will got the detailed info related to the stock like name, last price, bid and Ask?
Tareq Saleh
  • 33
  • 1
  • 3
0
votes
0 answers

JPanel will not show data on gui

Hi I'm working on a project and I need to use a JTable. I sub classed AbstractTableModel and then put the data into the table. That works correctly. I create a new JTable object passing in my AbstractTableModel. Next, I make it a AutoScrollPane.…
swhite
  • 471
  • 1
  • 6
  • 11
0
votes
2 answers

Create JTable from ArrayList

Now that I managed to put the objects from a file into a ArrayList, I have to display them into a JTable. These are the 3 objects contained in my ArrayList Lieu(45.573715, -73.900295, "p1"); Lieu(45.573882,…
Alexandre Huard
  • 23
  • 1
  • 1
  • 5
0
votes
2 answers

Pass LinkedList from another class for JTable. Automatically update table

So, I am currently building the GUI for my program. I am using JTables with a custom AbstractTableModel to fill them with the contents of my different LinkedLists. However, if I add a JTable to my GUI class, and initialize the LinkedList class…
Nino
  • 17
  • 1
  • 9
0
votes
1 answer

GUI Not working with custom AbstractTableModel. Errors "Unknown Source"

I am currently creating, or more trying to create the GUI for my project. What I need to do now, is create a JTable that reads the data from a LinkedList. I have a custom TableAbstractModel for this. public class StudentTableModel extends…
Nino
  • 17
  • 1
  • 9
0
votes
2 answers

How to define actively-updating CellEditor within TableModel

I'm creating a TableModel which extends AbstractTableModel. Its contents, though, changes regularly and the number of columns changes depending on the data displayed. Occasionally, I'll need to use a ComboBox to edit the cells in column 2, and…
Slothario
  • 2,830
  • 3
  • 31
  • 47
0
votes
3 answers

Overriding "getValueAt" in AbstractTableModel to bind Map to JTable

I have the following code: class Files { private static String files; private static String duration; private static String status; public Files(String files, String duration, String status) { this.files = files; …
Omid
  • 823
  • 1
  • 11
  • 31
0
votes
1 answer

Extending AbstractTableModel not updating cell contents in JTable

Can someone show me why my JTable is not updating with my model below? It comes up fine the first time but when I enter new data being held in the arrays int nh, string hNam, int vh, string proc_1 , string proc_2, the table won´t update with the new…
0
votes
1 answer

Jtable not updating with my abstracttablemodel

I am new at programming and am working on my first school assignment. I have written a gui that accepts input and outputs data in a jtable added to a jpaddedpane. When the table first appears it shows all the correct data. But when I enter new input…