// TextArea Text; public void init() { // Tell the applet not to use a layout manager. setSize(500, 500); setLayout(null); // initialze the button and give it a text. Rubric = new Button("Rubric Editor"); GradeSheet = new Button("Grade Sheet Editor"); TextArea text = new TextArea("Please Choose one of the following"); // now we will specify the positions of the GUI components. // this is done by specifying the x and y coordinate and // the width and height. Rubric.setBounds(100, 275, 100, 30); GradeSheet.setBounds(230, 275, 150, 30); text.setBounds(100, 225, 300, 50); text.setEditable(false); (text).getScrollbarVisibility(); // now that all is set we can add these components to the applet add(text); add(Rubric); add(GradeSheet); Rubric.addActionListener(this); GradeSheet.addActionListener(this); }
public Deta_Ventas_r() { setBackground(Color.gray); setLayout(null); setSize(400, 400); l1 = new Label(" clave "); t1 = new TextField(36); l2 = new Label("Vendedor"); t2 = new TextField(20); l3 = new Label("Cliente"); t3 = new TextField(20); l4 = new Label("Fechas"); t4 = new TextField(5); l5 = new Label("monto_final"); t5 = new TextField(5); t4.setEditable(false); t5.setEditable(false); b = new Button("Registrar"); add(l1); add(t1); add(l2); add(t2); add(l3); add(t3); add(l4); add(t4); add(l5); add(t5); add(b); l1.setBounds(24, 75, 71, 23); l2.setBounds(24, 103, 90, 23); l3.setBounds(24, 131, 90, 23); l4.setBounds(24, 159, 90, 23); l5.setBounds(24, 185, 90, 23); t1.setBounds(114, 75, 270, 23); t2.setBounds(114, 103, 270, 23); t3.setBounds(114, 131, 270, 23); t4.setBounds(114, 159, 270, 23); t5.setBounds(114, 185, 270, 23); b.setBounds(167, 215, 65, 23); b.addActionListener(this); setUndecorated(true); setLocation((Toolkit.getDefaultToolkit().getScreenSize().width / 2) - 200, 50); start(); }