Hello after a while, I'm trying now to make Vector of Object, but i'm getting an exception i posted below.
This is a part of my code, which i think is causing this exception.
My question is how can i modify my code to work properly. I know i can do Vector of Vectors, but it's a long way, and i wondering is there any shortcut? Any suggestions are welcome.
PS. zawodnicyAtaku is an array of strings, and vectorWierszy is used in constructor of DefaultTableModel.
DefaultTableModel wants a Vector<Vector<?>> (a Vector of Vectors), not a Vector<Object> (a Vector of Object arrays). This is explained on the DefaultTableModel Javadoc page:
This is an implementation of TableModel that uses a Vector of Vectors to store the cell value objects.
It would be better if the API actually reflected that, so no raw Vector but instead Vector<? extends Vector<?>>. Note that the ? extends is required to allow Vector<Vector<Integer>> or even Vector<Vector<Object>>; with Vector<Vector<?>> the compiler allows nothing except a literal Vector<Vector<?>>.