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.
我是Java的新手,所以我的问题是。例如,如果我有一个JTable代表 Color 的 2D 数组
JTable
Color [][] array = new ...
所以当我运行JFrame它时显示
JFrame
那我怎么给它上色呢?
您可以将 cellrenderer 附加到 JTable 并使用它调整颜色:http: //docs.oracle.com/javase/tutorial/uiswing/components/table.html#renderer