从文本文件中读取文本并将其存储在Jtable中 [英] Reading text from a text file and storing it in Jtable
问题描述
任何帮助将不胜感激。谢谢!
我会看看Oracle的教程:
当你从文本文件您需要将其放入2D数组中,并使用该2D数组(以及columnNames数组)来创建新的JTable对象。 (更多细节可以在JTable教程中找到)
Is there any way to read from a text file and store the contents in a Jtable? I've got a text file that contains certain information about some processes. It's like a table that has columns and respective values. Is it possible to take the contents of the .txt file and display it in the form of Jtable? I'm using Eclipse and Window Builder. Any help would be highly appreciated. Thanks!
I would look into the tutorials from Oracle:
When you get the data from the text file you would need to put it into a 2D Array and use that 2D array (along with the columnNames array) to create a new JTable Object. (more details are found in the JTable Tutorials)
这篇关于从文本文件中读取文本并将其存储在Jtable中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!