In your case, I suggested you create a custom table that extends JTable, and then add a ProgressBar as a child of the custom component.
Very crude implementation:
public class TableProgress extends JTable { public TableProgress() { JProgressBar comp = new JProgressBar(); add(comp); comp.setLocation(100, 100); comp.setSize(100, 100); } public static void main(String[] args) { JFrame jFrame = new JFrame(); jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jFrame.setLayout(new BorderLayout()); jFrame.setPreferredSize(new Dimension(500, 500)); TableProgress comp = new TableProgress(); jFrame.getContentPane().add(comp, BorderLayout.CENTER); jFrame.pack(); jFrame.setVisible(true); } }
source share