Index Out Of Bounds Exception: Index: 40, Size: 40 at Basic Table UI.paint Cells(Bas ic Table UI.java:1974) at javax.basic. JComponent.paint(JComponent.java:1038) at javax.swing. JComponent.paint To Offscreen(JComponent .java:5124) at javax.swing. Buffer Strategy Paint Manager.paint(Buffe r Strategy Paint Manager.java:278) at javax.swing.
It seems the underlying sort has worked correctly, but these changes are not reflected to the JTable properly or are not processed by the JTable properly. * * Note selecting a cell and updating causes interesting repaints as some of the rows get repainted * (you can see duplicated keys when old data exists) * * @author Robert Trevethan * */ public class Test Class ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : When sorting on updates, add a "Row Sorter Listener" to the sorter, catch the sorter changed event and on the Row Sorter Event.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Using the code supplied, 1. Click the update table button (loads new random values into table) 3. SORTED trigger a repaint of the JTable, which is not an efficient workaround.
The version numbers are given below, complete with build number.
To determine the version of your JDK software, use the following command: Bug Database - In most cases, the bug ID number in each description below is a link to the detailed bug report on the Bug Database (Bug Parade) web site.
Bug Database enables you to file your own bug reports, add comments to existing bug reports, and vote for the bugs you consider most important.
The full internal version number for this update release is 1.5.0_22-b03 (where "b" means "build"). This release contains Olson time zone data version 2009m.This document summarizes changes made in all the 1.5.0 update releases, including a link to the original 1.5.0 release notes.Note that bug fixes in previous update versions are also included in the current update version.content for that column appears resorted in the view). Keys being * simple characters / Strings and the values being random integers. Toggle sort the Value column ascending or descending * 2. You should see values change and resort in the Value column, but the keys remain stationary. Force a repaint by selecting a row, you should see row repaint with the up to date information * 5.However the other columns in these rows are not repainted - displaying old data. making a selection, switching column order), will cause the cells to repaint and they will then display the correct information. Select all rows and repaint, the selection is causing the table to repaint everything and * everything is repainted.I created 3 JTables 2X2 each and all the tables are empty,.. How can i do that.i created Jtable as follows JTable Table; // i created 3 table varaibles Table One, Table Two, Table Three Default Table Model model; // i used the same model for all tables When i created a program with single JTable, i used to update withfollowing commandsmodel.insert Row(Integer.parse Int(iterno)-1, new Object );model.remove Row(Integer.parse Int(iterno)); Now i have one 'model' and 3 tables, how can i update all the threetables with single 'model'.