java - Removing displayed data from JTable -
This is the 'new' button in my login form; Additionally, I want to remove all the displayed data. How can I do this?
saved = false; txt_ipath.setText (zero); txt_md_by_p.setText (zero); txt_model_p.setText (zero); txt_p_date.setText (sdf.format (date)); txt_p_price.setText (zero); txt_p_qty.setText (zero); txt_s_price_p.setText (zero); Txt_vouchdate_p.setText (sdf.format (date)); txt_vouchno_p.setText (zero); Assuming that you are using a DefaultTableModel for your JTable You can use:
models. Settrov calculation (0); Or, if you are extracting a line of data then you can use it:
model.removeRow (...); Any changes to the data should be made through the model.
Comments
Post a Comment