Questions tagged as 'jtable'

1
answer

How do I populate a JTable?

I have a fairly simple java application that connects to a database, in the console I type the query I want to pass by parameter to the executeQuery. Now I need to pass all this to a graphical interface. Is there any way I can create just one wi...
asked by 10.06.2014 / 06:03
1
answer

ArrayIndexOutOfBoundsException when trying to populate a JTable from a query

I'm running a query in the database to pass the information to a JTable . However, when performing a query, the following error appears: Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1 >= 1 at j...
asked by 10.03.2018 / 22:20
1
answer

How do I populate a JTable?

I have a fairly simple java application that connects to a database, in the console I type the query I want to pass by parameter to the executeQuery. Now I need to pass all this to a graphical interface. Is there any way I can create just one wi...
asked by 10.06.2014 / 06:03
1
answer

Problem reloading table

I'm having the following problem, on first run my DefaultTableModel loads normally as can be seen below in red: Aftermakingaregistration,changeordeletiononce,thetableupdatesnormally,butwhenIruntheseoperationsthesecondtimeon,Igetthefollowinge...
asked by 02.01.2018 / 03:46
1
answer

RowFilter.regexFilter does not filter columns of type Date in JTable

I have JTable with a TableModel custom, and I'm trying to run a search field using JTextField . However, columns of type Date and my class Cadastrante are not searched. In my TableModel , I overwritten...
asked by 08.04.2016 / 15:27
1
answer

How to create a dynamic JTable?

I have a JTable in my form, I wanted the size (number of rows and columns) of the table to be according to the number that the user type, how to do in java?     
asked by 04.06.2016 / 02:36
3
answers

Allow only integers in a column of JTable

Below I have a Jtable template. There is only one column that is editable for number (seconds). How do I validate to accept only integers, and in case the user types something else, except integer, return ZERO? public class Tabela_Fluxo...
asked by 21.08.2017 / 21:49
0
answers

I used the code below, and the code below. But it does not save the title of the Jtable lines, how to save the titles of the lines?

link MessageFormat header = new MessageFormat("Report Print"); MessageFormat footer = new MessageFormat("Page[0,number,integer]"); try { table.print(JTable.PrintMode.FIT_WIDTH, header, footer); }catch(Exception e){...
asked by 31.05.2017 / 21:19
1
answer

Set selected ComboBox item as clicked on jTable

I'm trying to fill in the fields of a form as the item clicked on jTable. Text fields are filled in normally, but the comboBox remains with the default value selected. //método que preenche a comboBox public void fillCBFornecedor(){ fornCt...
asked by 19.05.2017 / 01:28
0
answers

Increase amount of equal service

I have a table with the service code, service, quantity, value, and total. When I add in the table an ITEM 1 for example, the data of this service will be added to the table. But if I add again this same ITEM 1 in the table, I wanted to increase...
asked by 08.05.2017 / 19:13