import java.applet.*; import java.awt.*; /** * The HelloWorld class implements an applet that * simply displays "Hello World!". */ public class Ahoj extends Applet { // Button [][]tlacitka; Button tl1; public void init() { int i,j; resize(200,200); // setBackground(Color.blue); setLayout( new GridLayout(1,1)); // tlacitka=new Button[4][6]; tl1=new Button("Nazdar"); /* for (i=0;i<4;i++) { //tlacitko[i] =new Button[4]; for (j=0;j<6;j++) tlacitka[i][j]= new Button("A"); } /*tlacitka[0][0].setLabel("MC"); tlacitka[0][1].setLabel("7"); tlacitka[0][2].setLabel("8"); tlacitka[0][3].setLabel("9"); tlacitka[0][4].setLabel("/"); tlacitka[0][5].setLabel("sqrt"); tlacitka[1][0].setLabel("MR"); tlacitka[1][1].setLabel("4"); tlacitka[1][2].setLabel("5"); tlacitka[1][3].setLabel("6"); tlacitka[1][4].setLabel("*"); tlacitka[1][5].setLabel("%"); tlacitka[2][0].setLabel("MS"); tlacitka[2][1].setLabel("1"); tlacitka[2][2].setLabel("2"); tlacitka[2][3].setLabel("3"); tlacitka[2][4].setLabel("-"); tlacitka[2][5].setLabel("1/x"); tlacitka[3][0].setLabel("M+"); tlacitka[3][1].setLabel("0"); tlacitka[3][2].setLabel("+/-"); tlacitka[3][3].setLabel(","); tlacitka[3][4].setLabel("+"); tlacitka[3][5].setLabel("=");*/ /* for (i=0;i<4;i++) for (j=0;j<6;j++) add(tlacitka[i][j]); */ add(tl1); } /* public void paint (Graphics g) { g.drawString ("Hello world!", 50, 25); // Display "Hello world!" g.drawLine(10,10,300,300); Random r=new Random(); for (int i=0;i<40;i++) g.drawLine(r.nextInt(300),r.nextInt(400),r.nextInt(300),r.nextInt(300)); } */ }