By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,321 Members | 1,875 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,321 IT Pros & Developers. It's quick & easy.

JComboBox Loaded with 20,000 data.

P: 17
I have a JComboBox loaded with 20,000 data, my problem is when i scroll down or scroll up, it is slower than the JComboBox with the smaller data. What can i do to make my JComboBox run faster or like the JComboBox with smaller data?

Anyone can help me please. Thanks.
Sep 26 '07 #1
Share this Question
Share on Google+
8 Replies


Expert 10K+
P: 11,448
I have a JComboBox loaded with 20,000 data, my problem is when i scroll down or scroll up, it is slower than the JComboBox with the smaller data. What can i do to make my JComboBox run faster or like the JComboBox with smaller data?

Anyone can help me please. Thanks.
Do you think users would want to scroll through 20,000 items to pick their choice?
I think you should redesign your GUI somewhat.

kind regards,

Jos
Sep 26 '07 #2

P: 17
Nope. but i have a special search method in my JComboBox to find those item.

If we say like this the user will type "category" and the JComboBox will point or select the category item in that list. And then if the user will choose other data that is below to that data in that list which is "category". When the cursor move down, it is just much slower.

Any other suggestion?
Sep 26 '07 #3

10K+
P: 13,264
Nope. but i have a special search method in my JComboBox to find those item.

If we say like this the user will type "category" and the JComboBox will point or select the category item in that list. And then if the user will choose other data that is below to that data in that list which is "category". When the cursor move down, it is just much slower.

Any other suggestion?
20 000 is just a lot. Why don't you split the data up into categories and use two combos, one for categories and one for the data and populate the data one based on the value selected on the category one.
Sep 26 '07 #4

Expert 10K+
P: 11,448
Nope. but i have a special search method in my JComboBox to find those item.

If we say like this the user will type "category" and the JComboBox will point or select the category item in that list. And then if the user will choose other data that is below to that data in that list which is "category". When the cursor move down, it is just much slower.

Any other suggestion?
Are you sure it isn't your 'special search method' that's slowing things down?

kind regards,

Jos
Sep 26 '07 #5

P: 17
Thanks for that suggestion. I'm thinking that way too.

But Is there anyway in java that we could speed that up when we used JComboBox?(just for curiousity) Or will just add more speed of the computer? Hehe... Thanks.
Sep 26 '07 #6

P: 17
Are you sure it isn't your 'special search method' that's slowing things down?

kind regards,

Jos
I think with that too, but i'm just curious if anyone encountered this problem. Thanks
Sep 26 '07 #7

Expert 10K+
P: 11,448
I think with that too, but i'm just curious if anyone encountered this problem. Thanks
What happens if you temporarily remove that 'special search function'? Does it
scroll up and down as fast as ever?

kind regards,

Jos
Sep 26 '07 #8

P: 17
What happens if you temporarily remove that 'special search function'? Does it
scroll up and down as fast as ever?

kind regards,

Jos
I just tried your suggestion now, it works fined. But not really slow than i have my 'special search funtion' but you can still spot the difference when you move your keys around the list, the difference is maybe a fraction of a second with the smaller data.

Do you think we can make a special function with that search?

Thanks.
Sep 26 '07 #9

Post your reply

Sign in to post your reply or Sign up for a free account.