简体   繁体   English

如何用 ArrayList 中的内容填充我的对象 [关闭]

[英]How to fill my Object with something in an ArrayList [closed]

I need help.我需要帮助。

I have a Object, it's as big as my ArrayList:我有一个对象,它和我的 ArrayList 一样大:

Object[][] = new Object [ArrayList.size()] [ArrayList.size()]

Inside the first [] of the Object should be an Icon.在 Object 的第一个 [] 内应该是一个 Icon。 The number for the Icon is saved inside the ArrayList. Icon 的编号保存在 ArrayList 中。

Inside the second [] should be a String with information about the Icon displayed.在第二个 [] 内应该是一个字符串,其中包含有关显示的图标的信息。

Now I want to have all the data from my ArrayList inside the Object to display it in a JTable.现在我想将我的 ArrayList 中的所有数据放在 Object 中,以便在 JTable 中显示它。

Help is greatly appreciated.非常感谢您的帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM