Relating to a question here, the row heights of the JTable are changed when the renderers are prepared by the JTable. I need to size the JDialog on opening to be just big enough to show the items I've put in the table. Problem is, I can't seem to find a way to know when the JTable has been properly sized (after it's called every renderer, basically) so that I can calculate the total size of the table by it's row heights.
If I just do it on windowOpening() I seem to get it before the row heights have been changed by the custom renderers, so it's too small. Just letting the JTable do the work isn't an option, they don't change/update their scrollable size.
Yeah, this was my problem. It didn't occur to me that I had everything I needed to invoke the getTableCellRendererComponent() myself and that's all I really need. At a glance this seems to work beautifully for a modal dialog. populate() adds the initial data to the table and resize() calculates the total height of the rows and changes it's scrollable size to meet it.
[ October 27, 2005: Message edited by: Ken Blair ]
subject: Detect a JDialog has been fully displayed?