Este es el codigo: private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: int n,n1,n2,n3; int m1,m2,m3,m4; n=new Random().nextInt(7)+1; n1=new Random().nextInt(7)+1; n2=new Random().nextInt(7)+1; n3=new Random().nextInt(7)+1; m1=new Random().nextInt(7)+1; m2=new Random().nextInt(7)+1; m3=new Random().nextInt(7)+1; m4=new Random().nextInt(7)+1; txtpeso1.setText(Integer.toString(n)); txtpeso2.setText(Integer.toString(n1)); txtpeso3.setText(Integer.toString(n2)); txtpeso4.setText(Integer.toString(n3)); txtprecio1.setText(Integer.toString(m1)); txtprecio2.setText(Integer.toString(m2)); txtprecio3.setText(Integer.toString(m3)); txtprecio4.setText(Integer.toString(m4)); int capacidad; capacidad=Integer.parseInt(txtcapacidad.getText())+1; int []peso={n,n1,n2,n3}; int [] precio={m1,m2,m3,m4}; /* precio=new intRead more