Posted Monday, April 21, 2008 @ 19:14:07
Thanks.
I've managed to avoid having the first row of a table be selected automatically, but the first cell in each table still appears "selected" such that it looks to have focus (but doesn't)--i.e. the cell is surrounded by an extra bold box, even when the row is not selected.
I imagine there's a workaround for this too, but along with the first row in a table being selected by default and the "extra bold" look of the box around selected cells, default cell selection doesn't seem to fit with the expected behavior of other Java or windowing components in general. For instance, in my aborted version of creating my own DBTable, without doing any programming to prevent it, no row was selected by default before a user actually selected it; also, in a frame containing multiple tables, only one cell in the selected table appears selected and has focus, all others loose focus and return to their normal appearance; and finally the selected cell is indicated subtly by a box that is only slightly darker blue than the selected row background. Additionally, a table "knew" when it hadn't been given any data yet or been told to execute a query, and it would just display itself as an empty table. It would be nice to have these be your defaults, since they match expected behavior.
I don't mean to complain, it's just that unless there's a reason to depart from the expected behavior (or look) of controls, doing so actually makes it more complicated for a programmer to get things back to expected behavior. These seemed like nice touches with the version I was working on (but admittedly don't have the knowledge yet to complete), and they might be good additions (subtractions?) to your DBTable.
Again, in general this is a very good tool.
Thanks,
Jeff