the constructor....is undefined错误怎么解决? 30
publicclassmytry2d2extendsJFrame{publicmytry2d2(){.....}publicvoidshowSatBrowserInter...
public class mytry2d2 extends JFrame{
public mytry2d2() {
.....
}
public void showSatBrowserInternalFrame(){
JInternalFrame iframe = new JSatBrowserInternalFrame(this, this);//这个有错误,显示The constructor JSatBrowserInternalFrame(mytry2d2, mytry2d2) is undefined
iframe.setSize(261,450);
iframe.setLocation(5,5);
iframe.addInternalFrameListener(this);//这显示的错误是The method addInternalFrameListener(InternalFrameListener) in the type JInternalFrame is not applicable for the arguments (mytry2d2)
iframe.setVisible(true);
mainDesktopPane.add(iframe);
try
{
iframe.setSelected(true);
}
catch (java.beans.PropertyVetoException e)
{}
}
}
问题是方法public JSatBrowserInternalFrame(java.awt.Frame parent, JSatTrak app){
........
}
已经在另一个JSatBrowserInternalFrame类里面定义好了,为什么不能直接在这个类里用呢? 展开
public mytry2d2() {
.....
}
public void showSatBrowserInternalFrame(){
JInternalFrame iframe = new JSatBrowserInternalFrame(this, this);//这个有错误,显示The constructor JSatBrowserInternalFrame(mytry2d2, mytry2d2) is undefined
iframe.setSize(261,450);
iframe.setLocation(5,5);
iframe.addInternalFrameListener(this);//这显示的错误是The method addInternalFrameListener(InternalFrameListener) in the type JInternalFrame is not applicable for the arguments (mytry2d2)
iframe.setVisible(true);
mainDesktopPane.add(iframe);
try
{
iframe.setSelected(true);
}
catch (java.beans.PropertyVetoException e)
{}
}
}
问题是方法public JSatBrowserInternalFrame(java.awt.Frame parent, JSatTrak app){
........
}
已经在另一个JSatBrowserInternalFrame类里面定义好了,为什么不能直接在这个类里用呢? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询