问答题
本程序中,主窗口中有两个下拉菜单,一个控制所绘制图形的颜色,一个控制所绘制的图形,在画板中单击鼠标,则以单击的位置为左上角,以选定的颜色绘制选定的图形,如图所示。
【正确答案】
【答案解析】
第1处:addMouseListener(new MouseEventListener())
第2处:g.setColor(colorValues[chColor.getSelectedIndex()])
第3处:class MouseEventListener extends MouseAdapter
提交答案
关闭