![]()
   注意:请勿改动main()主方法和其他已有语句内容,仅在横线处填入适当语句。   import javA、awt.*;   import javA、awt.event.*;   import javA、io.*;   import javax.swing.*;   public classExample2_9   {   public static void main(String[]  args)   {   JFrame frame = new FileNameFrame("读取图像");   frame.setDefaultCloseOperation(JFrame.EXIT ONCLOSE、;   frame.setSize(300, 100);   frame.show();   }   }   class FileNameFrame extends JFram implementsActionListener   {   JLabel inputLabel;   JTextField fileNameText;   JButton containtButton;   public FileNameFrame(String titleText)   {   super(titleText);   inputLabel = new Jnabel("请输入图像文件的名称");   fileNameText = new JTextField(10);   containtButton = new JButton("浏览图片");   fileNameText.addActionListener(this);   containtButton.addActionListener(this);   JPanel panel = new JPanel();   panel.add(fileNameText);   panel.add(containtButton);Container containt = getContentPane();   containt.setLayout(newBorderLayout(3,3));   containt.add(inputLabel,BorderLayout.NORTH);   containt.add(panel,BorderLayout.CENTER);   }public void actionPerformedActionEvent e)   {   String fileName = fileNameText.getText();   ImageIcon image = ______;   ImageDialog dlg = new ImageDialog(this);   dlg.setImage(image);   dlg.setTitle(fileName);   dlg.show();   }   class ImageDialog extends JDialog   {   JLabel imageLabel;   public ImageDialog(JFrame frame)   {   super(frame);   imageLabel = new JLabel();   getContentPane().add(imageLabel);   this.addWindowListener(new WindowAdapter() {   public void windowClosing(WindowEvent e){  hide ();   }   });   this.setSize(200, 200);   }   public void setImage(ImageIcon icon)   {   imageLabel. ______(icon);   }   }   }
        
参考答案: 
正在加载...
答案解析
正在加载...
根据网考网移动考试中心的统计,该试题:
0%的考友选择了A选项
0%的考友选择了B选项
0%的考友选择了C选项
0%的考友选择了D选项