java - How to access a particular element in JLIST? -


i trying push selected value @ index 'a' index 'a+1'.

but if index 'a+1' not empty, have swap 2 values. this, not know how obtain value @ index 'a+1'. not selected. jlist api not support random access.

how implement ?

thanks.

to access elements in jlist need hold of listmodel.

the model has getelementat(int) method.

item = myjlist.getmodel().getelementat(a+1); 

Comments

Popular posts from this blog

php - mysql multiple keyword search in any order -

routing - AngularJS State management ->load multiple states in one page -

unity3d - Problems porting a GLSL shadertoy shader to unity -