0

It seems that iam trying for 1 Week to get a Button in my JTable row but nothing helps. Can someone help?

public void buildTable() {
    try {
        rsmt = rs.getMetaData();
        int c = rsmt.getColumnCount();
        column = new Vector(c);
        for (int i = 1; i <= c; i++) {
            column.add(rsmt.getColumnName(i));
        }
        column.add("Delete");
        data = new Vector();
        row = new Vector();
        while (rs.next()) {
            row = new Vector(c);
            for (int i = 1; i <= c; i++) {
                // I also want to generate a Button here...
                row.add(rs.getString(i));

            }

            data.add(row);
        }
    } catch (Exception e) {

    }
}
  • Welcome to Stack Overflow, please take the [tour], then learn [ask] a good question and post a [mcve] in this page as you did; on the MCVE don't forget to remove unnecessary code such as DB Connections and instead place hardcoded values, if the question isn't related to it, or colors, etc, make it **minimal** – Frakcool Sep 12 '16 at 18:39
  • 3
    Also, possibly [related](http://stackoverflow.com/questions/1475543/how-to-add-button-in-a-row-of-jtable-in-swing-java) – Frakcool Sep 12 '16 at 18:41

0 Answers0