How to create dynamically a swing list with n row where for each row I put 2 data

后端 未结 2 1355
半阙折子戏
半阙折子戏 2021-01-25 14:38

I have less experience with Java Swing and I want to create a dynamic list where for each element must be specified 2 parameters.

I have n elements, where the number n i

2条回答
  •  星月不相逢
    2021-01-25 15:18

    How about using a JTable with two columns, one for each data value?

    There's a good tutorial on using tables at: http://docs.oracle.com/javase/tutorial/uiswing/components/table.html

    JTable Example from docs.oracle.com

提交回复
热议问题