Relative Content

Tag Archive for javaswingjtabletablecellrenderer

How to use a TableCellRenderer to display an object in a table in Swing

I’m making a todolist app and I’m displaying all the tasks on a JTable(which only has one row), I also added a RowFilter to the JTable inorder to sort the tasks based on different categories. I created a class implementing the TableCellRenderer to only print the task name and the days left to the tasks deadline. Here’s where the problem is, I want the user to be able to click on a task(or tasks) and then choose what to do with that task, but it seems like I can’t click on any row on the table, I don’t know what the problem is

How to use a TableCellRenderer to display an object in a table in Swing

I’m making a todolist app and I’m displaying all the tasks on a JTable(which only has one row), I also added a RowFilter to the JTable inorder to sort the tasks based on different categories. I created a class implementing the TableCellRenderer to only print the task name and the days left to the tasks deadline. Here’s where the problem is, I want the user to be able to click on a task(or tasks) and then choose what to do with that task, but it seems like I can’t click on any row on the table, I don’t know what the problem is

Java TableCellRenderer random behaviour

I want to implement a TableCellRenderer which changes the cell background color to red in case the filename this cell contains isn’t found in a specific folder.