Primero
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.event.ActionEvent.*;
public class Malonsito extends Frame implements ActionListener {TextField Nvendedor, Avendedor, IDvendedor, TVenta, VVenta, Total, C1, C2;
Button Calcular, Comision1, Comision2;
Label LNvendedor, LAvendedor, LIDvendedor, LTVenta,LVVenta, LTotal, LC1, LC2;
Double total=0.0, com1=0.0, com2=0.0;
boolean inAnApplet = true;
public static void main(String[] args) {
Malonsito frame = newMalonsito();
//frame.inAnApplet = false;
frame.setTitle ("Almacenes Maloncito");
frame.setVisible(true);
frame.setLocationRelativeTo(null);
}public Malonsito()
{
LNvendedor = new Label("Nombre Vendedor");
Nvendedor = new TextField("", 15);
LAvendedor = new Label("Apellido Vendedor");Avendedor = new TextField("", 15);
LIDvendedor = new Label("ID Vendedor");
IDvendedor = new TextField("", 15);
LTVenta = new Label("Total Venta");TVenta = new TextField("", 30);
LVVenta = new Label("Valor x Venta");
VVenta = new TextField("", 30);
LTotal = new Label("Valor Total Venta");
Total = newTextField("", 50);
LC1 = new Label("Comision 1");
LC2 = new Label("Comision 2");
C1 = new TextField("", 70);
C2 = new TextField("", 70);
Calcular = newButton("Calcular");
Comision1 = new Button("Comision 1");
Comision2 = new Button("Comision 2");
setSize (640,480);
setLayout(new FlowLayout());
add(LNvendedor);
add("North", Nvendedor);
add(LAvendedor);
add("Center",Avendedor);
add(LIDvendedor);
add("Sourth",IDvendedor);
add(LTVenta);...
Regístrate para leer el documento completo.