怎么编写下面的程序
编写一个Applet程序:从网页转入三个数,输出其中的最大值和最小值
import javax.swing.JOptionPane; import java.awt.*; import javax.swing.*; public class MaxTest extends JApplet { JLabel A1; int shuzhu[ ]; public void init() { Container contn = getContentPane(); contn.setLayout( new FlowLayout() ); A1 = new JLabel(); String input; int num1, num2, num3; input = JOptionPane.showInputDialog(" please input num1: "); num1 = Integer.parseInt( input ); input = JOptionPane.showInputDialog(" please input num2: "); num2 = Integer.parseInt( input ); input = JOptionPane.showInputDialog(" please input num3: "); num3 = Integer.parseInt( input ); displayMax(num1, num2, num3); contn.add( A1 ); } public void displayMax( int x, int y, int z ) { int max = 0; max = x>y?x:y; max = z>max?z:max; A1.setText(""+max); } }