i have made a simple a thing like this
DefaultListModel listModel = new DefaultListModel();
Vector al = af.getAnredenAsVector();
for(int i = 0; i
We do not support this out of the box, because with a JList it's not possible to select an item that is not contained in the JList.
What you could do, is write an adapter that is somewhat a mixture of TextComponentAdaptor and ListAdaptor. This adaptor would have its own field to hold the selected value (as TextComponentAdaptor does) and therfore would be able to have an selected value that is not contained in the JList. I'd recommend that you start-off with the ListAdaptor and add the selection logic from the TextComponentAdaptor.
I hope this helps!
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.