2
I have an implementation being developed in Javafx only that I came across some situation that seem to be simple, when designating an Event the image in your Onmouseclicked from my FXML got the return of the following error:
java.lang.IllegalArgumentException: argument type mismatch
When making a test I changed the Image for the Button and applied in the Onmouseclicked also obtained the same return, only on top of what I did I changed the method call to the Onaction button and then yes I got the execution of the Event.
To apply this situation you must make a different call method?
Since Imagemview does not have the Onaction option, how can I apply the Event to it?
Follow the code of my method below:
@FXML
public void GravarTransportadora(ActionEvent event){
char fisjurpessoa = 'J';
SimpleDateFormat formatador = new SimpleDateFormat("dd/MM/yyyy");
try {
// CNPJ e IE insert
pf.inserir(txRazaoSocial.getText(),
Long.parseLong(txCnpj.getText()),
Long.parseLong(txIe.getText()),
(new java.sql.Date(((java.util.Date) formatador.parse(txDataInauguracao.getText())).getTime())),
fisjurpessoa,
txNomeFantasia.getText(),
txSite.getText());
} catch (Exception e) {
}
}
You will have no more than a method with the same name, where each of them has a different argument list?
– Zuul
@Zuul in this class I am only this method set to make sure that it would not be something that was interfering.
– DevAgil
This matter of defining a method for an Imageview I tried to do for navigation between screens but also unsuccessful.
– DevAgil