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 with はデータを として受け入れますObject[][]が、 を与えObject[]ます。
Object[][]
Object[]
テーブルに 1 つの列だけを表示するにはどうすればよいですか?
おそらく、次のことを試してください...
DefaultTableModel model = new DefaultTableModel(); model.addColumn("MyColumnHeader",dataArray); JTable table = new JTable(model);