I have an ArrayList with Object[]'s and I need to convert the ArrayList into an Object[][] array in order to put the data in a JTable. How can I do this?
I have tried:
(Object[][]) arraylist.toArray();
but that gave:
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [[Ljava.lang.Object;