日期:2014-05-20  浏览次数:20694 次

mynotepad.this是什么意思?

class mynotepad
{
.
.
.省略

e'lse if("打开".equals(name))
{
             if(file !=null)
             openfile.setSelectedFile(file);
                int returnVal=openfile.showOpenDialog(mynotepad.this);
                if(returnVal==JFileChooser.APPROVE_OPTION)
                {
file=openfile.getSelectedFile();
                    unfold();
                }


}       }
java mynotepad

------解决方案--------------------
只写this也行,就是代表当前对象。