在我的私有void jButtonOKActionPerformed(java.awt.event.ActionEvent evt)我有错误信息:
我的第一个字段(IdentCat)通常是Int.但是我不知道如何在INT中这样做?
ap.setIdentCat(jTextIdent.getText().toUpperCase());
Run Code Online (Sandbox Code Playgroud)
更多代码
private void jButtonOKActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Categorie ap = new Categorie();
ap.setIdentCat(jTextIdent.getText().toUpperCase());
ap.setDenomCat(jTextDescr.getText());
boolean ok = daoCat.insertCategorie(ap);
if (!ok)
JOptionPane.showMessageDialog(null,"Insertion impossible !","Avertissement",JOptionPane.ERROR_MESSAGE);
this.dispose();
}
Run Code Online (Sandbox Code Playgroud)