JList is a raw type Warning!
Post a Reply
|Oldest Newest Rating|
· March 16, 2015
I see, thanks for the reply
· March 15, 2015
Instead of posting screenshot, post code next time.
What is a "raw type"? JList is a generic class and it expects type argument to be passed upon creation of JList instance.
"Raw type" is when you instantiate JList class without providing type argument.
I.e. if you want to create JList that contains Strings, you would create it like this:
where "String" is a type argument
I recently made tutorial about JList: https://www.youtube.com/watch?v=KOI1WbkKUpQ&list=UUD9USJK11rTGIOHCVWSZNhQ
However, you problem is another thing. You are adding JScrollPane with JList on JList again. Add it to JFrame.
Also, don't set FlowLayout for JFrame in your case.
Java / Android Development
Very popular language used to create desktop applications, website applets, and Android apps.
|Bucky Roberts Administrator|