问题 填空题

某界面有一个文本区和一个按钮。点击按钮后,将文件中的内容输入,显示在文本区。此按钮的监视器方法如下(文件通过对话框指定)。
public void actionPerformed(ActionEvent e)

if(e.getSource()==butt)

String s=null;
try

if((new FileDialog()).file!=null)

String filename=FileDialog. file. getName();
RandomAccessFile in=new______(filename,"r");
while ((s=in. readLine())!=null)
textA. append(s+"\n");
______;


catch(FileNotFoundException e1)
catch(IOException e2)

答案

参考答案:Random AccessFile
in.close()

单项选择题
填空题