-1

when i was compile with -Xlint: unchecked then got some warning like this

Compiling 12 source files to C:\Users\Titus\Documents\NetBeansProjects\SITA\build\classes
warning: [unchecked] unchecked call to addItem(E) as a member of the raw type JComboBox

what should i do?

4
Contributors
4
Replies
16
Views
2 Years
Discussion Span
Last Post by jwenting
Featured Replies
  • titus.k.s Stop posting the same question twice. Next time you will get an infraction, possibly leading to a complete ban. Read the DaniWeb rules carefully before you post again https://www.daniweb.com/community/rules And yes, as people have already pointed out, there's no point trying to work with GUIs and databases when you … Read More

0

if my code like this then? how to solve warning?

 private void KDM (){
         jComboBox2.addItem("-- pilih menu --");
          try {
            String sql = "select * from iomenu";
            Statement cn = con.createStatement();
            ResultSet rs = cn.executeQuery(sql);
            while (rs.next()) {
                jComboBox2.addItem(rs.getString("KodeMenu"));
            }
        } catch (Exception e) {
        }
     }
2

titus.k.s
Stop posting the same question twice. Next time you will get an infraction, possibly leading to a complete ban.
Read the DaniWeb rules carefully before you post again
https://www.daniweb.com/community/rules

And yes, as people have already pointed out, there's no point trying to work with GUIs and databases when you seem to have skipped over the basics.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.