22 Solved Topics

Remove Filter
Member Avatar for
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 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 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 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 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 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
Member Avatar for blackmagic01021

Hello, I have a observer pattern based JTable. With time it is poulated with new data packets. I use addRow functionalities to add my rows. But I want to put always the last coming datapackets at the top. How to do it??

0
127
Member Avatar for kalz

Hello Everyone I have an Internal frame in my application which has a JTable populated with values from a database and a JButton which performs some operation when a row is selected from the JTable.When the user does not select a row from the JTable and clicks the JButton, I …

Member Avatar for kalz
0
452
Member Avatar for cozmo87

I'm writing an application for processing scientific data. The data is displayed in a jTable. I'm done with the data processing itself, now I want to do some conditional formatting to make interpretation easier for the end user. [LIST=1] [*]The last column of the table contains a threshold value, and …

Member Avatar for mKorbel
0
2K
Member Avatar for Melow

i'm trying to populate a JList, and i saw that this is how it supose to work [code] JTable tabel = new JTable(); tabel = new JTable(row, cols); while (it.hasNext() && it1.hasNext() && it2.hasNext() && it3.hasNext() && it4.hasNext()) { Object ob[][] = { { it.next(), it1.next(), it2.next(), it3.next(), it4.next() }} …

Member Avatar for Melow
0
171
Member Avatar for white feather

[CODE] public void setTableModel(List<Users> users) { eraseTableRows(); for (int i = 0; i < users.size(); i++) { Users u = users.get(i); tm.insertRow(i, new Object[] { stuff }); } } private void eraseTableRows() { for (int i = 0; i > tm.getRowCount(); i++) { tm.removeRow(i); } [/CODE] i've tried this and …

Member Avatar for white feather
0
143
Member Avatar for Clawsy

Hello, I would like to be able to add 'n' columns programmatically and SET THEIR TITLE as I add them. I have 2 questions: 1. How can I change the title? (not by seting a model to my table but just 'changing a property' - if possible)? 2. Is there …

Member Avatar for Clawsy
0
229

The End.