Technology Network Community
Oracle Database
Fusion Middleware
Development Tools
Server & Storage Systems
Enterprise Management
Berkeley DB Family
Cloud Computing
Big Data
Business Intelligence
Migration and Modernization
E-Business Suite
PeopleSoft Enterprise
JD Edwards World
JD Edwards EnterpriseOne
User Productivity Kit Pro (UPK) and Tutor
Governance, Risk & Compliance (GRC)
Master Data Management (MDM)
Oracle CRM On Demand
On Demand: SaaS and Managed Applications
AutoVue Enterprise Visualization
Agile PLM
Endeca Experience Management
Fusion Applications
Archived Forums



New To Java

Problem with JTable and changeSelection method

Hi!  I can't get the changeSelection (int row, int col, boolean, boolean) to work. Actually, nothing happens when I call it. When i print the row and col count it clearly says, row = 100 and col = 1. Anybody know why changeSelection() doesnt work?  try {                  JTable table = new JTable( model );                         model.setRowCount(0);                       Vector data = new Vector();         String aLine;                filename = listener.getFilename();         if (filename == null)         throw new IOException("No filename");            else { 	LogFile f = FileManager.getInstance().openReadonly(filename);             for (int i =0 ; i <20 ; i++){                  int myseqno = 0;             String xmpInfo = null;                              f.positionAt(foundAtSeqno -10);                      myseqno =;             while (XMP.getBodyLen(b) == 0) {                 xmpInfo = "(extHdr) ";                 myseqno =;             }                      Vector row = new Vector();             String s = new String(b, XMP.getBodyOffset(b), XMP.getBodyLen(b));             Object g = new StringCellValue(s, fakeObject);                      row.addElement(g);               model.insertRow(i ,row);             model.fireTableDataChanged();                      foundAtSeqno++; //            System.out.println("Rowcount" + table.getRowCount()); //            System.out.println("Colcount" + table.getColumnCount());       }      System.out.println("Rowcount" + table.getRowCount());                          table.changeSelection(10, 0, false, false); 

try to do this: model.fireTableDataChanged();  after table.changeSelection(10, 0, false, false);   did you see the documentation :,%20int,%20boolean,%20boolean)   ?

No, still, nothing happens...

Related Links

3D Parallel projection algorithm
Closing JFrame doesnt effect the InternalFrmaes
Globalmmcs frustratuion
Class TimeUtils
Cast a List to boolean[]
scrollbar in a JTextPane
Multiple panes - displaying one at a time...possible?
Problem with Images JAVA ME
JNDI and OpenLdap problem
How can I display images in drop down.
Display folder and file with icon
standalone java program
A dateformat problem!
Help reading a file?
how to upload excel files using servlets