1 import java.awt.*;2 import java.awt.event.*;3
4 public class remote extendsFrame {5
6 /**
7 *@paramargs8 */
9 private static final long serialVersionUID = 22;10 GridLayout gl0, gl1,gl2;11 Panel p0,p1,p2;12 Button b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b_cancel,b_ok,b_turn_on,b_turn_off,b_channel_up,b_channel_down,b_volume_up,b_volume_down, b_random;13 StringBuffer str;14
15 publicremote()16 {17 gl0=new GridLayout(4,5,10,15);18 gl1=new GridLayout(3,1,0,15);19 gl2=new GridLayout(4,1,0,15);20
21 b0 = new Button("0");22 b0.setForeground(Color.blue);23 b0.addActionListener(newBt());24 b1 = new Button("1");25 b1.setForeground(Color.blue);26 b1.addActionListener(newBt());27 b2 = new Button("2");28 b2.setForeground(Color.blue);29 b2.addActionListener(newBt());30 b3 = new Button("3");31 b3.setForeground(Color.blue);32 b3.addActionListener(newBt());33 b4 = new Button("4");34 b4.setForeground(Color.blue);35 b4.addActionListener(newBt());36 b5 = new Button("5");37 b5.setForeground(Color.blue);38 b5.addActionListener(newBt());39 b6 = new Button("6");40 b6.setForeground(Color.blue);41 b6.addActionListener(newBt());42 b7 = new Button("7");43 b7.setForeground(Color.blue);44 b7.addActionListener(newBt());45 b8 = new Button("8");46 b8.setForeground(Color.blue);47 b8.addActionListener(newBt());48 b9 = new Button("9");49 b9.setForeground(Color.blue);50 b9.addActionListener(newBt());51 b_cancel= new Button("C");52 b_cancel.setFore