I am building a simple application. When I click on the button, dialog shows up, I fill up information and It converts into JTable. That is pretty much the whole program. When I try to put the info into the table, the exception pops out. Data seem to be with the correct data type as in the constructor.
BUTTON LISTENER
ActionListener al = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==b_pridej){
dialog = new MistoDialog();
dialog.setVisible(true);
mista.pridejMisto(dialog.getNoveMisto());
}
}
};
THE METHOD WHICH FILLS THE CONSTRUCTOR WITH DATA FROM THE DIALOG
public Misto getNoveMisto(){
Misto misto = new Misto( new Integer(souradnice.getText()), nazev.getText(), poznamka.getText(),new Integer(hodnoceni.getText()),datum.getText());
return misto;
}
CONSTRUCTOR
public Misto(int souradnice, String nazev, String poznamka, int hodnoceni,String date) {
this.souradnice = souradnice;
this.nazev = nazev;
this.poznamka = poznamka;
this.hodnoceni = hodnoceni;
this.date = date;
}