인터넷으로 찾아본후 아래처럼 하면 된다고 하더군여
제가 넣은 코드입니다.
죽어라 해도 안됩니다. 아무것도 추가안됩니다.
table_detail 이라고 id있구요. setContentView 아래에 넣은 코드 맞습니다.
돌겠네요. 아무리 해도 안됩니다.

 TableLayout tl = (TableLayout)findViewById(R.id.table_detail);
    
    TableRow test_row = new TableRow(this);
    test_row.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
    Button b = new Button(this);
    b.setId(100);
    b.setText("Dynamic Button");
    b.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
    test_row.addView(b);
    tl.addView(test_row, new TableLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));