JLists - the number of items in the list

I need to know the number of items in my jlist. Can you show me a way to get it.

+6
java swing jlist
source share
1 answer

Try

myJList.getModel().getSize(); 
+26
source share

All Articles