This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Personnally, I read those values from the database ... This is more generic. But of course, you could also hardcode them.
Joined: Jul 31, 2002
if u get the values from the db, i guess u need to write some algorithm method to elimate the duplication of values when the combobox retrieves the them from db...am i right?
Joined: Mar 07, 2002
Yes indeed. But as I am using a HashSet as temporary structure while reading the database, this takes care of eliminating duplicates for me. And I just ahve to fill the combo with the contents of the HashSet. Stephane
ArrayList serves about the same purpose as HashSet, and sorting an ArrayList is fairly painless using java.util.Collections (hint, if you have a box for selecting flight days, you shouldn't use an alphabetic sort ) I also get my column names from the database. On the other hand, Michael Morris said he hard-coded his (in an FBNconstants class), and he made a 154 (lost a point on documentation ).
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com