I have this kind of progamming task without JavaFx, instead it's Java Swing. I realized my knowledge is still limited.
I have one single JTable. But, within this JTable I need a custome Cell Renderer. The goal is to make this kind of JTable: Example image
My current solutions are: Example Image
- Create a Single JTable:
- get each Column and set its CellRenderer with a custom Renderer (below).
- Create a new Class implements TableCellRenderer:
- return different JPanel inside getTableCellRendererComponent method using switch case (as column counted).
After hours, and hours, I think my current solutions is quite daunting tasks. Thus, My question is:
What are the simplest method of creating this Custom JTable to achieve the main goal as mentioned above?