Fly by Night Consultants<br /> <blockquote><font size="1" face="Verdana, Arial">quote:</font><hr><i>I climbed on the back of a giant albatross<br />which flew through a crack in the cloud<br />to a place where happiness reigned...<br />all year 'round<br />the music played ever so loudly!</i><p><a href="http://thomasfly.com/songs/Traffic/Hole_in_my_Shoe_qt.htm" target="_blank" rel="nofollow">Hole in My Shoe</a><hr></blockquote>
Samual Harvey<br />SCJP2<br />SCJD2
Fly by Night Consultants<br /> <blockquote><font size="1" face="Verdana, Arial">quote:</font><hr><i>I climbed on the back of a giant albatross<br />which flew through a crack in the cloud<br />to a place where happiness reigned...<br />all year 'round<br />the music played ever so loudly!</i><p><a href="http://thomasfly.com/songs/Traffic/Hole_in_my_Shoe_qt.htm" target="_blank" rel="nofollow">Hole in My Shoe</a><hr></blockquote>
If you use the unaltered database field names for the column header names in your JTable (which seems like the thing to do), then you're left either with absurdly wide columns, or columns whose headers can't display entirely ("Destination airport").
My present approach is to kill the JTable column header, and put a 2x9 grid of JLabels across the top of the JTable, so the columns only have to be wide enough to display "Destination".
I suspect that a better way to do this would be to have a custom renderer for the JTable column header, but I haven't really looked into how to do that- has anybody taken the trouble to do this?
I also set the default column formatting so that the text is centered, and I'm debating whether or not to do anything even fancier, such as a custom column renderer for things like price.
Before I start doing too much gold-plating however, I'd like some idea as to whether or not it's really necessary- and if so, what might be the best way to accomplish these goals?
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Fly by Night Consultants<br /> <blockquote><font size="1" face="Verdana, Arial">quote:</font><hr><i>I climbed on the back of a giant albatross<br />which flew through a crack in the cloud<br />to a place where happiness reigned...<br />all year 'round<br />the music played ever so loudly!</i><p><a href="http://thomasfly.com/songs/Traffic/Hole_in_my_Shoe_qt.htm" target="_blank" rel="nofollow">Hole in My Shoe</a><hr></blockquote>
... it's generally good programming practice to avoid as much hard-coding as possible, so my original concept was to allow the OCP schmuck that came up with the database schema to drive the corresponding features in the application program.
I was reading some old messages in this forum and saw where you in fact scored perfect on everything but (hehe) documentation. Congrats!
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Fly by Night Consultants<br /> <blockquote><font size="1" face="Verdana, Arial">quote:</font><hr><i>I climbed on the back of a giant albatross<br />which flew through a crack in the cloud<br />to a place where happiness reigned...<br />all year 'round<br />the music played ever so loudly!</i><p><a href="http://thomasfly.com/songs/Traffic/Hole_in_my_Shoe_qt.htm" target="_blank" rel="nofollow">Hole in My Shoe</a><hr></blockquote>
... I'd claim I missed the one point on purpose, so as not to irritate God.
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Consider Paul's rocket mass heater. |