Implemented logic of buttons in jtable