Most voted "jtable" questions
Jtable is a Java Swing component used to display and edit regular two-dimensional cell tables.
Learn more…126 questions
Sort by count of
-
0
votes1
answer672
viewsChange the color of the Jtable header
How do I change the header color JTable using the Nimbus Look And Fell? I tried to use: JTableHeader header = jTable2.getTableHeader(); header.setBackground(java.awt.Color.yellow); But it didn’t…
-
0
votes1
answer25
viewsJtable - Nullpointerexception when I addRow() in jTable from another class
I wanted to know what solution to be able to add to jTable lines so as not to give me Nullpointerexception public class Estatistica extends javax.swing.JFrame { public static DefaultTableModel…
-
0
votes2
answers34
viewsjTable does not add the second string I put in an array
I created an array with two values and wanted to put it in a table... with an insert button (insert several lines) 1-I declared the string line[] and the values below; 2- I thought a 'for each'…
-
0
votes1
answer315
viewsHow to fire a method after editing an Integer column in Jtable
I need to call a method that shows the user any message. This method should be called at the exact moment the user finishes editing a Jtable column of type Integer and the user has not entered an…
-
0
votes1
answer27
viewsMy Jtable does not update when I add a Row [Solved]
I have a Jtable in my Mainform that receives data from a form in another window only after receiving the data Jtable does not update. private void btnAddActionPerformed(java.awt.event.ActionEvent…
-
0
votes2
answers833
viewsReturn search data to database in Jtable
I’m developing an interface that should return in a JTable values of a mysql table. I have developed the following method: public class Teste extends javax.swing.JFrame { private JTable table;…
-
0
votes1
answer29
viewsConversion error
I’m trying to update a schedule through Jtable. But when I try to update it gives an error java.sql.Sqldataexception: data Exception: invalid Character value for cast private class BtEditarListener…
-
0
votes1
answer122
viewsJtable with monetary value in a single column
In order to implement a monetary value formatting in a jtable, I tried to use the Rafael Chaves as a base and I managed to make the code below. import java.awt.Color; import java.awt.Component;…
-
0
votes1
answer97
viewsHow to remove the Header Columns border
I can’t seem to remove the white edge of the header of jTable public static JTable CMtable(String[] colunas, int width, int height) { TableColumn coluna; JTable tbl = new JTable();…
-
0
votes0
answers31
viewsI can’t show custom Jtable inside the frame
create a custom table model but do not click on my frame. Someone could help me? public class PessoaJTable extends JTable{ /** * */ private static final long serialVersionUID = 3182466937648479844L;…
-
0
votes1
answer32
viewsError, Sum of values in a Jtable
Good evening guys, I’m trying to implement a method that adds up the values of the lines of a JTable, but is always returning 0... Follow my Code. private void loadData() { List<ValoresEntity>…
-
0
votes0
answers172
viewsConduct research in jTable
I’m conducting a survey in my jTable, but when performing the research, the jTable displayed only content similar to my search. I would like to conduct a search on jTable without inhibiting all…
-
0
votes1
answer332
viewsDelete only lines with selected checkbox in a Jtable
How to delete from a JTable lines that are marked in a Checkbox that is in a table cell? I am using AbstractTableModel. The code I was able to create, erases only part of the selected records,…
-
-1
votes1
answer1510
views -
-1
votes1
answer94
viewsError accessing Jtable line
In my system is giving error in the line of code ModelUsuario modelUsuario = new ModelUsuario(); ControllerUsuario controllerUsuario = new ControllerUsuario(); //recebe a linha selecionada int linha…
-
-1
votes1
answer110
viewsHow to add to Abstracttablemodel a combobox populated by database information?
I would like to know if it is possible to implement a combobox in a AbstractTableModel so that it receives information directly from the database for filling. if possible someone could give me an…
-
-1
votes1
answer157
viewsError setting model in Jtable
So people, I was developing a frame that received a table from the database, I used the same scope of the function several times and it worked perfectly, I just modified the necessary to generate…
-
-1
votes1
answer316
viewsHow to import a csv file to a Jtable?
Does anyone know how to move from a csv file to a jtable? Currently but lists everything in the first column. private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your…
-
-1
votes1
answer267
viewsJtable only accept float numbers in your cell
I’m using this code to accept only numbers in the jtable cell, but I’d like to know how to accept . too. Someone can help me? I’m using Java Language on the netbeans platform. TableColumn col =…
-
-1
votes1
answer171
viewsError converting value to Jtable
I have an error when passing formatted value to the JTable, if anyone can help, I really appreciate. This error only happens when I format the number, I wonder how I do to fix it. Code: private void…
-
-1
votes1
answer85
viewsJtable search does not return as expected
I have a bug I don’t understand. The idea is simple, I should type a value in a field and it returns me in the table, this happens, but when I click on the value found in the search it selects me…
-
-1
votes1
answer335
viewsJtable Autosorter in columns
Personal I am a few years with a difficulty that even today I could not solve completely. By adding a TableRowSorter to a JTable automatically the columns can be ordered by clicking and with that I…
-
-1
votes1
answer710
viewsHow to dynamically change model data when changing the value of the list that fills it?
I have a Jtable where I have a column by the name of colun1 I want to know how I can alter Jtable’s data when any data on the list that fills it out changes. Example I have a list with listString…
-
-1
votes1
answer102
viewsIs it possible to change the color of a jtable cell of type Boolean?
I am trying to change the background color of certain Jtable cells, but when I change the color of a Boolean column it loses the format of a Checkbox and appears written "true" or "false". I want to…
-
-2
votes1
answer21
viewsHow to define the data types of the columns of a Jtable equal to the Mysql database?
I created a graphical user interface in Netbeans where I inserted a Jtable into a Jframe FORM. I have a Mysql database whose columns are: Id: Integer Name: String Active: Boolean But when I use:…
-
-4
votes1
answer70
viewsAdd one more check, how to proceed?
I would like to know how to add 1 more check. I would like to have row 31 checked as well. Example: Object obj2 = modelo.getValueAt(linha, 31); In this code here. else if…