i want to populate my jtable with selected items in my jcombobox below is the code i wrote to perform the action but it does not.
please am still new in java so i will appreciation the help.
if(AssetCategories.getSelectedItem() == "LAND & BUILDINGS"){
try {
String sql = "SELECT Description FROM items where Description_Code = 'LB' Order by id";
pst=conn.prepareStatement(sql);
rs=pst.executeQuery();
dep_report.setModel(DbUtils.resultSetToTableModel(rs));
} catch (SQLException ex) {
Logger.getLogger(DepreciationReport.class.getName()).log(Level.SEVERE, null, ex);
}
}