java – ArrayList> to String [] []

It looks like a JTable construct, like string []]... But I like to use smarter containers until I have to use something else I have been using ArrayList < ArrayList < string > >. Now I need to satisfy JTable with string []

I found a simple way to convert ArrayList < string > Use toarray() to string [], but cannot find a simple converter for multidimensional arrays

I want to start from ArrayList < ArrayList < string > > in the string [] [] with the minimum number of lines

I've been searching the library and can't seem to find this converter, and I hope someone can suggest a good solution

Thank you in advance

Solution

You may want to know how to implement your own table model:

You can create a class that extends abstracttablemodel and delegate it to list or any other suitable data structure

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>