Results 1 to 3 of 3
- 07-31-2011, 12:41 PM #1
Member
- Join Date
- Jul 2011
- Posts
- 1
- Rep Power
- 0
Return multiple values from array lookup?
Hi,
I have a small array (effectively 25 rows by about 6 columns), and I want to use a lookup function to return a subset of the array. (This is on a website).
I have so far managed to return single entries from the array by entering a value for one of the 'column variables', but am stuck on progressing to the next step.
Ideally I would have 6 drop down boxes, one for each of the columns, whereby a user could enter values into a couple of the boxes and return elements from the array which match the entered ranges.
Is this fairly straightforward? If so could anyone give a skeleton of code?
Thanks
- 07-31-2011, 12:53 PM #2
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
You could just allocate an array, fill it, and then return the array.
- 07-31-2011, 03:56 PM #3
It does rather look like you're using arrays to perform the task of a ListSelectionModel (yes I know that's a Swing class, but that's no reason it can't be used anywhere that values in a list need to be selected/unselected). And since you're talking about columns, maybe a RowSorter (yes, it also takes care of filtering) would provide desired functionality.
db
Similar Threads
-
trying to create an array with multiple values per instance
By aconti in forum New To JavaReplies: 14Last Post: 06-29-2011, 03:49 PM -
return multiple values from class methods
By exdox77 in forum New To JavaReplies: 0Last Post: 01-29-2011, 08:08 PM -
java method with multiple return values
By Ms.Ranjan in forum New To JavaReplies: 1Last Post: 06-18-2009, 06:08 PM -
[SOLVED] Multiple return values
By Manfizy in forum New To JavaReplies: 17Last Post: 05-25-2009, 12:07 PM -
Using functions that return values?
By Megapixelz in forum New To JavaReplies: 1Last Post: 04-30-2008, 04:07 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks