Table model is attached to Java Swing JTable, providing content to the table, and accepting the cell editing events from the table.

learn more… | top users | synonyms

3
votes
2answers
46 views

JTable removing row gives ArrayOutofBounds exception -1

I have been browsing numerous sites about this and tried some different things but im stumped. Would be grateful for some help. The condition is working that checks if a checkbox is selected (true) ...
-2
votes
0answers
29 views

how to get value from ticked jcheckbox in a row from jtable [duplicate]

I have a table with 3 column and dynamic row based from database value and a jcheckbox in last column based on this code : TableColumn tcolumn = tabel.getColumnModel().getColumn(2); ...
0
votes
2answers
42 views

create the HashMap based on JTable

There is JTable with the following content Col1 | Col2 A | 1 A | 2 A | 3 B | 5 B | 1 C | 5 C | 4 C | 2 Based on this table, I need to create a HashMap ...
1
vote
2answers
37 views

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 ...
1
vote
1answer
33 views

How to prevent a cell from being highlighted when selected?

I have the first column of my AbstractTableModel designated to have a checkbox. But when I click on the checkbox the whole row gets selected. I don't mind this, but I was wondering if there was a way ...
3
votes
2answers
72 views

Before I write my own, is there an open source tablemodel that automatically collapses columns that contain all nulls?

So given a two dimensional array (actually an ArrayList<ArrayList<Object>>) of raw data as such: A B C D E Bob null 42 null null Sam null 38 blue 0 ...
1
vote
1answer
61 views

JTable does not save edit changes

I want design this JTable. The goal is the user to be able to edit the cells by double clicking on them. Any changes should be able to be saved and stored on a database later. My code is the ...
0
votes
2answers
65 views

Why is my JScrollpane not updating remove changes despite having validate() and repaint()

I have a terrible problem right now that's dooming my program at the moment. It seems that I can add elements to my ScrollPane via Jtable that has a custom model. It's fine when I add elements, the ...
0
votes
0answers
40 views

How to use tableModel to visualize filtered information in jTable

I need to develop a GUI with an interactive Table, where the user must be able to insert rows manually or import/save the information from/to an Excel file. Lets say I have a bunch of personal ...
0
votes
1answer
83 views

Have a TableModel. Need to sort based on two different columns simultaneously

My tableModel contains multiple columns (for ex: Columns A - F), of which when I first display, I should display the table sorted by firstly Column B and later by D. Now, the issue that am facing is: ...
0
votes
1answer
85 views

How to create a custom copy method for a custom model arraylist?

I'm having difficulty understanding how to create a copy method for a custom modellist. My goal is this: I have an arraylist that displays how many objects are in it. I created another list for the ...
1
vote
1answer
39 views

How to change rows with columns in JTable?

I have created my JTable like this: String[] columns = {"Country", "Continent", "Latitude", "Longitude"}; String[][] data = {{"A","B","C","D"}}; table = new ...
0
votes
5answers
151 views

How to refresh data in JTable I am using TableModel

Hi, I have created my TableModel and want to refresh JTable once I added a new row. What should be added to the listener to "refresh" JTable? public class MyTableModel implements TableModel { ...
1
vote
1answer
57 views

How to set Title in JTable

I am newbie in java and wanted to set table header in jtable i have taken array but not able to set header please guide me. I have tried setting through taking instance of JTable but didnt help. also ...
0
votes
1answer
218 views

java jtable removeRow : java.lang.IndexOutOfBoundsException: Index: 1, Size: 1

I'm removing a row in my JTable and i have this Exception : IndexOutOfBoundsException: Index: 1, Size: 1". This is my TableModel Classe: public Class MyTableModel extends AbstractTableModel { ...

1 2 3 4 5 13
15 30 50 per page