JLists - number of elements in the list

Mojo_Jojo picture Mojo_Jojo · Feb 12, 2011 · Viewed 23.3k times · Source

I need find out the number of elements are there in my Jlist. Can u show me a way to get it.

Answer

aioobe picture aioobe · Feb 12, 2011

Here's how:

myJList.getModel().getSize();