63 Discussion / Question Topics

Remove Filter
Member Avatar for
Member Avatar for Lius

Need help with JTable header group : Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.table.JTableHeader cannot be cast to id.co.aal.common.GroupableTableHeader this is the part of table drawing ..... if(tabledraw) { tabledraw=false; for (int k = 0; k < m_data.getColumnCount(); k++) { TableCellRenderer renderer; if (k==Kehadirantable.COL_ALOKASI) renderer = new CheckCellRenderer(); else { DefaultTableCellRenderer …

Member Avatar for Jan_315
0
879
Member Avatar for snigger

Hi I need to show an image thumbnail in one of jTable cells But I don't know how to do it! I'm using netbeans to design GUI . How can I do that? Thanks

Member Avatar for JamesCherrill
0
4K
Member Avatar for scheppy

Hi Guys, I ussually dont post anything here often, just get everything off of everyone elses questions, but I'm having a strange problem that im scratching my head over, I have a JTable where I can Add and remove rows... This is just for testing purposes, I'm about to make …

Member Avatar for scheppy
0
745
Member Avatar for Nation

I have a JTable that a user can input data. I have an image that I would want to put at the top of my page when printed and also another image that I would want to work as footer. How do I print these on the same page including …

Member Avatar for mKorbel
0
1K
Member Avatar for CoilFyzx

Howdy-ho. I am trying to right click on my table and change the cell border color and highlight color of that cell. I have figure out how to give that particular cell focus when I right click it by using int row = fixed.rowAtPoint(evt.getPoint()); int col = fixed.columnAtPoint(evt.getPoint()); fixed.changeSelection(row, col, …

Member Avatar for mKorbel
0
670
Member Avatar for wallet123

It is relaed to the thread i posted a while ago. Before I edited the model of my table, it was working properly, but when i added some columns thats when the problem came out. Everytime i click the button that will open this window, it goes blank. Only a …

Member Avatar for wallet123
0
348
Member Avatar for CoilFyzx

Hello good day. Here is my problem: I have retrieved some a couple sets of data from my sql database and saved them in ArrayLists of (custom)types <Student> and <Subject>. I am using a single Table. I want to create a custom AbstractDataModel that displays the data from the ArrayList<Student>. …

Member Avatar for CoilFyzx
0
1K
Member Avatar for Pobunjenik

I've got a JTable called chances_T full of doubles ranging from 0 to 100. I'm trying to set the background color of each cell based on the cell's value. So I built a custom cell renderer: class CustomRenderer extends DefaultTableCellRenderer { @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, …

Member Avatar for mKorbel
0
451
Member Avatar for murali2489

Hi All, I have a questing regarding JTable. If i have two rows in JTable. if user selects a column in a particular row, I need to have the value of that particular column and also the values of rest of the columns in that row. Please advise how to …

Member Avatar for stultuske
0
136
Member Avatar for murali2489

Hi All, I am having a JTable which runs so strange. Jtable is very basic having three rows and three columns. If I use SetValue method to place data in any cell and run the program JTable is not visible. If i delete the SetValue Method from the program and …

Member Avatar for murali2489
0
352
Member Avatar for murali2489

Hi All, I have a Jtable with six columns. I am displaying the contents of my database into my Jtable. Its working fine. But I am facing trouble updating the changes done in Jtable cells to appropriate database cell. In the below code when I tried to edit the First …

Member Avatar for murali2489
0
357
Member Avatar for Deve

**I want to enter the value in jtable run time and want to dispaly its sum on same jtable when i pressed calculated button ** how to do please help :) import java.awt.BorderLayout; import java.awt.EventQueue; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.sql.*; import java.util.Vector; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.*; import …

Member Avatar for Deve
1
2K
Member Avatar for Zdneth_1

Hi.. I want to seek help about database in SQL and Jtable in Netbeans. In our sales inventory system, we have these tables in database namely 'stockmasterlist' and 'pricemasterlist'. They are relational since they have in common with regards to their 'ProductNumber'. Now, since they are of different tables but …

Member Avatar for pbj.codez
0
246
Member Avatar for CoilFyzx

Hello good day. I am designing two JTables; one on top of the other. The first one has nine columns. And the second one has 8 columns (The first column spans the first columns of the topmost table). What I wish to do now is to make the bottom table …

Member Avatar for JamesCherrill
0
465
Member Avatar for vishalonne

I am using Netbeans 7.1 and MySQL. I need 1 column in jtable which will contain jradiobutton and user can select any 1 row's jradiobutton Please refer the fig for detail. After selecting RB further processing will be done on jbutton click event. ![64496cca6997d07cf995950d67a3e3f0](/attachments/large/2/64496cca6997d07cf995950d67a3e3f0.JPG "64496cca6997d07cf995950d67a3e3f0") Here is the code - …

Member Avatar for mKorbel
0
337
Member Avatar for CoilFyzx

Hello Good day. Here is the problem I am trying to solve. I have a table as seen below. ![232465554203149acd8363d3a4a127ae](/attachments/large/3/232465554203149acd8363d3a4a127ae.jpg "232465554203149acd8363d3a4a127ae") My GOAL: Columns A through G are going to be filled with integers. (I have already created an integer model so that these cells only take integers). As the …

Member Avatar for CoilFyzx
0
445
Member Avatar for joseph.lyons.754

I have been tryin to get this to work for the past week if not two >:( with no joy. Worst of all its such a trivial problem. The program asks you to choose a town name from a combo box when you choose the location you shoud be brought …

Member Avatar for JamesCherrill
0
423
Member Avatar for JamesDanny

Hey Guys, i was looking at the post linked below and been trying to solve the issue, however, i have been unable to solve it. [Click Here](http://www.daniweb.com/software-development/java/threads/384109/data-from-text-file-into-jtable) The post says i "MUST create a new Vector for each row" in order for it to work. as mentioned above, i have …

Member Avatar for <M/>
0
280
Member Avatar for 03hasnam

From Class Model: public TableModel getTableData() { TableModel model=null; try { String sql = "SELECT eventID as 'Event ID', date as 'Date',eventName as 'Name', time as 'Start Time' FROM Event"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); model = (DbUtils.resultSetToTableModel(rs)); } catch(SQLException e){ e.printStackTrace(); } finally { try {rs.close(); pst.close(); } …

Member Avatar for Taywin
0
234
Member Avatar for 03hasnam

I am finding it difficult to update the `JTable` when I enter a person's name in search button. The program compiles correctly without any errors, but in `SearchActionPerformed` event when the search button is pressed an empty table comes up. Where without search, the table is full of values from …

Member Avatar for mvmalderen
0
555
Member Avatar for odose

How to select data from different tables in a single database and show in a single jtable.. Pls I need help

Member Avatar for peter_budo
0
169
Member Avatar for CoilFyzx

Hello perhaps you could help me with a problem please. I wish to display a table of results using a JTable. Customarily I use a 2D Object array which is initialized with the data in a manner as follows: public Object[][] data={ {"Biology",25},{"Additional Math", 54},{"Geography",43},{"History",21},{"Spanish", 47}, {"Information Tech.",110},{"Technical Drawing",54},{"French",45},{"Physics",76},{"Chemistry",76}, {"Principles …

Member Avatar for CoilFyzx
0
320
Member Avatar for vishu.bhavsar

Hi, I have 1 jframe containing 1 panel. This panel shows data using JTable. I want to put button at the bottom of the panel to print that data in PDF. Can I reduce the size of the JTable? Currently it takes the size as that of the panel. Thanks

Member Avatar for mKorbel
0
985
Member Avatar for shweta.tomar.798

how to instantly update jtable after addition/deletion of any record.And how to add checkBox in every rows of jtable in java .i will be grateful for any help...plzzzzzz rply thanx in adwc...

Member Avatar for stultuske
0
162
Member Avatar for aquagirl20

Hi! I have a huge problem with my PERT program. I've been trying to figure out how to display all of the data in jTable with one click and how to delete all them as well, like if I click on "reset" or "clear". What I've done is just the …

Member Avatar for aquagirl20
0
260
Member Avatar for 47pirates
Member Avatar for Zaad
-1
210
Member Avatar for 47pirates

I am trying to update database by editing cell values in jtable. my table looks like ![a](/attachments/large/2/a.JPG "a") When i edit the value in particular cell and without clicking anywhere if i click on Update button the database is not updated as like this ! ![b1](/attachments/large/2/b1.JPG "b1") but if i …

Member Avatar for dougWill
0
3K
Member Avatar for 47pirates

there are two panel in one panel there is search button and in the another one there is Jtable for displaying search result. In that jtable initially all the records are displayed. But when i try to search, it works but the problem is that i need to click search …

Member Avatar for 47pirates
0
423
Member Avatar for 47pirates

I want to update the contents of Jtable as shown below when the Jcombobox's item state is chaged in the left panel. but i am not being successful in it .Please help. ![untitled29](/attachments/large/2/untitled29.JPG "untitled29") when the table no value is changed in the left panel , i want corresponding Jtable …

Member Avatar for 47pirates
0
510
Member Avatar for speakon

Hello, I need to create a JDBC that connects to a mySQL database, retrieves the data from a table and displays it into a JTable. I have done this successfully, but have ran into a problem. The initial values I entered into the database (for testing) are permament. If I …

Member Avatar for speakon
0
365

The End.