Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
JTable使用填充FileReader
JTable
FileReader
但是,我查看了 Internet,但未能找到好的教程或示例。
您的基本问题是翻译问题。如何从状态 A 到状态 B。您需要将文件的内容转换为可以将其包装成某种状态的状态TableModel。
TableModel
我会从
一旦你有能力读取文件并以某种有意义的方式存储它的内容(我会创建一个很好的类,它能够处理每一行的数据并将它们全部放入类似的东西中ArrayList,但这就是我),然后我会弄清楚如何将这些数据放入表中。
ArrayList
一旦你有了某种结构的数据,进入表格就相对简单了。