Select item from JCombobox and delete the row in database

前端 未结 2 1787
南旧
南旧 2020-12-12 08:02

I am working on a project in which I have a SQLite database with a table called Table1 and values title/location without an ID as column etc...

My form has a combobo

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-12 08:20

    You need something like:

    Object item = comboBox.getSeletedItem();
    pst.setString(1, item.toString());
    

提交回复
热议问题