Hello to all!
I am very glad I've found this forum, because I really want to learn to program in Java. For now, I have this problem with the project I'm working on for my University.
I have main JFrame (let's call it "Main"), from which I've opened one JDialog ("Dialog1"). Now I want to open another JDialog ("Dialog2") from Dialog1, but I keep getting an error.
First one (Dialog1) I've opened this way:
Dialog1 d = new Dialog1(Main.this);
d.setVisible(true);
The second one (Dialog2), I've tried to open the same way, but the error says that the constructor of Dialog2 is undefined for this code:
Dialog2 d = new Dialog2(Dialog1.this);
d.setVisible(true);
Now, my question is, why can't I open Dialog2 from Dialog1 the same way I've opened Dialog1 from Main?
P.S. English is not my main language (I'm from Serbia), so I'm sorry if I've made some mistakes.


LinkBack URL
About LinkBacks

Reply With Quote