I am trying to solve this compiler warning but can't figure out how. I think that I know why and its because the AbstractListModel that I extend can accept any type and the ListModel is of the String type. I can't develop a solution, highly confused on how to solve efficiently and need some more experienced help/teaching.
This is the JList and ListModel declaration
Also my list doesn't show on the graphical user interface because of the JList<String> declaration and if I remove it, the list shows but throws another compiler warning: raw type should be parameterized, in addition to the compilar warning above.
This is the AbstractListModel class.
I have tried doing extends AbstractListModel<String> and it removes the compiler conversion warning but it shows a compiler error for the overridden method getElementAt(int index) because it returns an Object instead of a String.