在考生文件夹中存有文件名为 Java_3.java文件,本题功能是实现下面左边图形界面,并完成以下功能 点击中的 “New”按扭.弹出如右图所示的对话框. 由于 Java_3.java文件不完整,请在注释行“//******Found******”下一行语句的下划线地方填入正确内容,然后删除下划线,请勿删除注释行或其他己有语句内容。存盘时不得改变原有文件的文件名及存放目录。 具休程序如下: import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Java_3{ public static void main(String[] args){ MulticastFrame frame = new MulticastFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.show(); } } class MulticastFrame extends JFrame{ public MulticastFrame(){ setTitle("MulticastTest"); setSize(WIDTH, HEIGHT); MulticastPanel panel = new MulticastPanel(); Container contentPane = getContentPane(); //*********Found********** contentPane.add(_________________); } public static final int WIDTH = 300; public static final int HEIGHT = 200; } class MulticastPanel extends JPanel{ public MulticastPanel(){ JButton newButton = new JButton("New"); add(newButton); ActionListener newListener = new ActionListener(){ public void actionPerformed(ActionEvent event){ makeNewFrame(); } }; newButton.addActionListener(newListener); closeAllButton = new JButton("Close all"); add(closeAllButton); } private void makeNewFrame(){ final BlankFrame frame = new BlankFrame(); frame.show(); ActionListener closeAllListener = new ActionListener(){ public void actionPerformed(ActionEvent event){ //*********Found********** frame.___________________(); //使窗口隐藏或消除 } }; //*********Found********** closeAllButton.addActionListener(__________________________________); } private JButton closeAllButton; } class BlankFrame extends JFrame{ public BlankFrame(){ //*********Found********** ______________ ++ ; setTitle("Frame " + counter); setSize(WIDTH, HEIGHT); setLocation(SPACING * counter, SPACING * counter); } public static final int WIDTH = 200; public static final int HEIGHT = 150; public static final int SPACING = 30; private static int counter = 0; }