title: Java desktop application?
body: <p>I have one table in database and I start Java Desktop Application, connect and that part is working, I can see all data from database, insert, delete...
  But the problem is that I can't read code which generates NetBeans, it's confusing, and I want to put few more fields and buttons to can access database, like to put number in text field and on button click change number from the database row.
  Can anyone help with this?
  Thank you in advance.</p>
  
  <p>here some code generated from NetBeans :</p>
  
  <pre><code>@Entity
  @Table(name = "ARTIKLI", catalog = "", schema = "APP")
  
  @NamedQueries({
  @NamedQuery(name = "Artikli.findAll", query = "SELECT a FROM Artikli a"),
  
  @NamedQuery(name = "Artikli.findBySifra", query = "SELECT a FROM Artikli a WHERE     a.sifra = :sifra"),
  
  @NamedQuery(name = "Artikli.findByCenapokomadu", query = "SELECT a FROM Artikli a  WHERE a.cenapokomadu = :cenapokomadu"),
  
  @NamedQuery(name = "Artikli.findByKolicina", query = "SELECT a FROM Artikli a WHERE  a.kolicina = :kolicina")})
  </code></pre>
  
  <p>this is for example how NetBeans generate some methods:</p>
  
  <pre><code>public Artikli(Integer sifra) {
      this.sifra = sifra;
  }
  
  public Artikli(Integer sifra, String nazv) {
      this.sifra = sifra;
      this.nazv = nazv;
  }
  
  public Integer getSifra() {
      return sifra;
  }
  
  public void setSifra(Integer sifra) {
      Integer oldSifra = this.sifra;
      this.sifra = sifra;
      changeSupport.firePropertyChange("sifra", oldSifra, sifra);
  }
  
  public String getNazv() {
      return nazv;
  }
  
  public void setNazv(String nazv) {
      String oldNazv = this.nazv;
      this.nazv = nazv;
      changeSupport.firePropertyChange("nazv", oldNazv, nazv);
  }
  
  public Double getCenapokomadu() {
      return cenapokomadu;
  }
  
  public void setCenapokomadu(Double cenapokomadu) {
      Double oldCenapokomadu = this.cenapokomadu;
      this.cenapokomadu = cenapokomadu;
      changeSupport.firePropertyChange("cenapokomadu", oldCenapokomadu, cenapokomadu);
  }
  
  public Integer getKolicina() {
      return kolicina;
  }
  
  public void setKolicina(Integer kolicina) {
      Integer oldKolicina = this.kolicina;
      this.kolicina = kolicina;
      changeSupport.firePropertyChange("kolicina", oldKolicina, kolicina);
  }
  </code></pre>
  
  <p>Just what I need is that I want to put two more text fields and one button, so when user insert numbers in the first field(field for ID) and second(field for number which I want to use to do: Total number of something in row database - entered number = new value), so after that user will click button and app will filter database by entered ID and do math which I explained in brackets, that means I'll have new value in that row in database!?
  I know that that sound simple but I'm stuck because of that non understanding netbeans code.
  Thanks, Wolf.</p>