In a beginning I tested my project in a JFrame, but after I tried to emigrate it to a custom JInternalFrame from another existent project, it gives me a incompatibility error, because a JInternalFrame can not be converted to Frame.
I do the invoke with this:
MyJDialog mjd = new MyJDialog(this,false,myobject);
Constructor of my JDialog:
public MyJDialog(java.awt.Frame parent,boolean modal,Object myobject) {
super(parent,modal); /*This part it's giving me conflict due JInternalFrame can not be converted to Frame*/
//another code
}
So, wich function can I use to replace "super" or which solution can I apply.
In advance, thanks.
Thanks to MadProgrammer, the solutions it's as follow:
The invoke:
MyJDialog mjd = new MyJDialog(javax.swing.SwingUtilities.getWindowAncestor(this),myobject);
Constructor of my JDialog:
public MyJDialog(java.awt.Window parent,Object myobject) {
super(parent,"");
//another code
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.