How do I color individual cells of a JTable based on the value in the cell?

前端 未结 2 1010
借酒劲吻你
借酒劲吻你 2020-12-12 07:06

I am attempting to make a Tetris clone. The game uses a JTable as a representation of the board. The board is a 2D integer array.

I am trying to make i

2条回答
  •  北荒
    北荒 (楼主)
    2020-12-12 08:02

    You need to create a custom table cell renderer. Here's a good place to start

提交回复
热议问题