阅读下列程序,请写出该程序的功能。 import java.applet.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class Test extends Applet implements ActionListener { JTextField text;int r; JPanel panel; public void paint ( Graphics g ) { Graphics gc = panel.getGraphics () ; gc.clearRect ( 0,0, panel.getWidth () , panel.getHeight ()) ; gc.setColor ( Color.red ) ; gc.fillOval ( 10, 10, r, r ) ; } public void init () { text = new JTextField ( 10 ) ; panel = new JPanel () ; setSize ( 200, 100 ) ; setLayout ( new GridLayout ( 2,1 )) ; add ( text ) ; add ( panel ) ; text.addActionListener ( this ) ; } public void actionPerformed ( ActionEvent e ) { if ( e.getSource () == text ) { r = Integer.parseInt ( text.getText ()) ; repaint () ; } } }