Yes. Maneesh provided a link to a tutorial. So instead of reading it, you asked for code instead. How do I know you didn't read it? Because the tutorial includes code which provides examples which would be helpful to you.
Since you're new to Java,
you should know that the Oracle tutorials (like the one Maneesh linked to) are the best way to learn about particular topics in Java. So if you want to learn about JList, read the JList tutorial. Download the example code and run it, and then fiddle around with the code. Change it to do something a little different, and then change it to do something a lot different. That's the way to learn Java.