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);
            }



     } 

thanks for the help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.