When calling a jdialog
there is no problem:
//llama a consultar Perfume
JMenuItem mntmConsultarPerfumes = new JMenuItem("Consultar Perfumes");
mntmConsultarPerfumes.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
M_consultarPerfume cp=new M_consultarPerfume();
cp.setVisible(true);
}
});
But if I want to call MODAL that jdialog
I get an error in line new M_consultarPerfume(this,true);
:
//llama a consultar Perfume
JMenuItem mntmConsultarPerfumes = new JMenuItem("Consultar Perfumes");
mntmConsultarPerfumes.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
M_consultarPerfume cp=new M_consultarPerfume(this,true);
cp.setVisible(true);
}
});
Error:
The constructor M_consultPerfume (new ActionListener () {}, boolean) is undefined
Thanks for the help