![](https://cos-cdn.shuashuati.com/pipixue-wap/2020-1230-1107-56/ti_inject-812ce.png)
请使用 NetBeans 打开考生文件夹下的项目 Java-3, 该项目中的源文件 Java-3.Java 是不完整的,请在注释行“ //**********Found********* ”下一行语句的下划线地方填入正确内容,然后删除下划线,请勿删除注释行或改动其他已有语句内容。存盘时不得改变原有文件的文件名及存放目录。 本题要求:阅读 Java-3.java 程序,该程序的功能是按下“黄色”按钮,使图形用户界面窗口的背景色变为黄色。完成运行,所得结果: import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Java_3{ public static void main(String[] args){ ButtonFrame frame = new ButtonFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.show(); } } //*********Found******** class ____________ extends JFrame{ public ButtonFrame(){ setTitle("测试按钮"); setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT); ButtonPanel panel = new ButtonPanel(); Container contentPane = getContentPane(); contentPane.add(panel); } public static final int DEFAULT_WIDTH = 200; public static final int DEFAULT_HEIGHT = 100; } class ButtonPanel extends JPanel{ public ButtonPanel(){ JButton yellowButton = new JButton("黄色"); add(yellowButton); ColorAction yellowAction = new ColorAction(Color.YELLOW); yellowButton.addActionListener(yellowAction); } //*********Found******** private class ColorAction implements ____________{ public ColorAction(Color c){ backgroundColor = c; } //*********Found******** public void ____________(ActionEvent event){ setBackground(backgroundColor); } private Color backgroundColor; } }