简体   繁体   中英

Remove focus on editable jtable cell

When double click on editable cell of jtable it shown as here.

跟随

what i need is if user click mouse outside table of press a button before entering the value then existing value should be auto entered and output should be shown as follow.

后

Any help or suggestion would be greatly appreciated.

  1. for DefaultTableModel works by default myJTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE) ;

  2. override stopCellEditing()

    a) public boolean stopCellEditing()

    b) myJTable.getCellEditor().stopCellEditing();

    c) myJTable.getCellEditor(row, col).stopCellEditing();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM