0

combobox show only 10 elements

asked 2010-02-02 09:19:52 +0800

andij62 gravatar image andij62
315 1 7

combobox.setModel(new SimpleListModel(Array)).
If Array > 10 then the combobox just show 10 data.
Can everyone help me?

best regards

delete flag offensive retag edit

15 Replies

Sort by ยป oldest newest

answered 2010-02-10 13:18:04 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

you have confuse n4rk0 with your Array.

Not tested:

Try this as data:

List<String> myList = new ArrayList<String>();

myList.add("1");
myList.add("2");
myList.add("3");
myList.add("4");
myList.add("5");
myList.add("6");
myList.add("7");
myList.add("8");
myList.add("9");
myList.add("10");
myList.add("11");
myList.add("12");
myList.add("13");
myList.add("14");
myList.add("15");
myList.add("16");
myList.add("17");
myList.add("18");
myList.add("19");
myList.add("20");
myList.add("21");
myList.add("22");
myList.add("23");
myList.add("24");

call it like n4rk0 have written:

combobox.setModel(new myListModel(myList), 16 );	

best
Stephan

link publish delete flag offensive edit

answered 2010-02-10 14:07:12 +0800

andij62 gravatar image andij62
315 1 7

Hallo Stephan,

i am to despair! The result is the same. The content of my combobox is

[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]

best andi

link publish delete flag offensive edit

answered 2010-02-10 16:17:34 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Where is the code of your renderer?

link publish delete flag offensive edit

answered 2010-02-10 18:49:22 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

updated 2010-02-10 18:52:36 +0800

This is not correct. ZK ask for jth element and you return it the whole array.

	public Object getElementAt(int j) {
		return _data;
	}

Should be

    public Object getElementAt(int j) {
		return _data[ j ];
    }

link publish delete flag offensive edit

answered 2010-02-11 01:36:34 +0800

andij62 gravatar image andij62
315 1 7

Hallo henri,

that was the error! The Problem is solved! Thank you to all !!!

best regards

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-02-02 09:19:52 +0800

Seen: 1,178 times

Last updated: Feb 11 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More