Create dynamic table to add new entry with button

JTable is more commonly used in a way that adds rows, rather than columns. I re-factored this example to illustrate the basic idea below. Each time the button is clicked, a new row is added to the table’s model, which updates the table itself. import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.EventQueue; import java.awt.Rectangle; import java.awt.event.ActionEvent; import … Read more