Don't know if it's the cause of the problem but a table doesn't have any children so you should use repaint not revalidate.
Dave Wathen Canzonet Limited Phone: +44 (0)20 8660 5171 Mobile: +44 (0)7968 167934 Fax: +44 (0)870 051 7664 http://www.canzonet.com mailto:[EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Reinstein, Lenny Sent: 06 September 2002 00:12 To: '[EMAIL PROTECTED]' Subject: Selecting rows in JTable I want to acomplish something that seemed very simple to me -- selecting rows and chaning row selections in the JTable based on certain logic real time. I want to continuously change row selections and want it to be visible to the user dynamically, as it happens. However, the code below does not seem to work. If I execute the code before I add the JTable component, it works. while(true) { int selection = getRowSelection(); // some busines logic here listTable.setRowSelectionInterval(selection , selection ); listTable.revalidate(); } Any ideas on what I can do here? Thanks. > -Lenny _______________________________________________ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing _______________________________________________ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing
