Questions tagged as 'jtable'

2
answers

Add mm: ss of a column in jtable

Good afternoon, I know that the way I explain it is complicated to help me. I have a jTable that contains a column where times are shown, those times in mm: ss. I need to calculate the average between these times. I made several attempts with...
asked by 18.07.2016 / 20:55
1
answer

Print ArrayList, Java Swing [closed]

I'm starting studies on Java applications with Swing, and I have questions about how to print my ArrayList. What is the best way to print or list an ArrayList within a window? In my case we have a calendar, we insert contacts into an Array...
asked by 13.11.2015 / 22:59
1
answer

put name in the columns from a vector of objects

public class TableModelAgendamento extends AbstractTableModel { int contador = 1; int qtdFuncionario; private TOFuncionario[] func = new TOFuncionario[qtdFuncionario]; String coluna[] = new String[qtdFuncionario]; private List<TOItemAgendamen...
asked by 19.09.2015 / 02:55
1
answer

Problems with paging in JTable

I am creating an application where I fill in the data from a table through the database, but there are many then wanted to organize better. However, the results displayed in the table are not constants. The implemented methods behave differen...
asked by 28.10.2018 / 21:59
1
answer

How to insert column title in a jTable?

I could not display the table title, could they help? Note: I entered "JScrollPane scroll = new JScrollPane(tabela); "and" contentPane.add(scroll); "or" getContentPane.add(scroll) "as I saw in questions / answers from that s...
asked by 18.03.2018 / 14:42
1
answer

Change the color of the JTable header

How do I change the header color of JTable that uses Nimbus Look And Fell ? I tried to use: JTableHeader header = jTable2.getTableHeader(); header.setBackground(java.awt.Color.yellow); But it did not work, it continues with the d...
asked by 08.05.2018 / 03:47
1
answer

Error when trying to put JCheckBox in a JTable column

I'm trying to add a column to a DefaultTableModel , but it seems to be giving some problems. Follow the code! JCheckBox jcheck; DefaultTableModel modelo = new DefaultTableModel(null, new String[]{"Data", "Hora", "SAP", "BPCS", "Etiqueta"...
asked by 14.11.2017 / 12:29
1
answer

Error to popular jtable with database

I have to make a client registration application in JAVA, I'm using eclipse. The problem is in the listarCli() method, because when I comment on this method the error does not appear. The error is: "java.lang.NullPointerException" Acco...
asked by 15.09.2017 / 18:31
1
answer

Check if you have reached the last row of the table

I am using this code to do an approved or disapproved check, but when it arrives on the last line, it is not checking if it is on the last line and does not give me the result. I would like to know how to check if you have reached the last...
asked by 03.10.2017 / 03:44
1
answer

IndexOutOfBounds while populating an AbstractTableModel

I have a AbstractTableModel that has a List filled through a method that fetches the data in the database. The method that fills List has two overloads: one with no parameters (which fetches all data) and one with a search paramete...
asked by 20.05.2017 / 07:08