Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/09/2009, 13:59
cestmoiwikies
 
Fecha de Ingreso: septiembre-2009
Mensajes: 1
Antigüedad: 15 años, 6 meses
Puntos: 0
Crear interfaz gráfica

Buenas.

He creado un código muy sencillito que genera parejas entre una lista de nombres cualquiera.

Sin embargo, ahorita únicamente se corre en forma de líneas de comando.

He intentado MUCHO pasarlo a una interfaz gráfica, pero no he podido (tengo tiempo batallando ya).

Una simple interfaz gráfica de color negro el fondo y con letras blancas sería simple y sencillamente genial. ¿Me podrían ayudar por favor?

Gracias

Adjunto el código para, si me podrían ayudar, me dijeran como reestructurarlo...

public class Equipos {
public static void main (String[] args) {
String[] listaUno = {"A", "B", "C", "D", "E"};
int oneLength2 = listaUno.length;
int rand1 = (int) (Math.random() * oneLength2);
int rand2 = (int) (Math.random() * oneLength2);
int rand3 = (int) (Math.random() * oneLength2);
int rand4 = (int) (Math.random() * oneLength2);
int rand5 = (int) (Math.random() * oneLength2);
int rand6 = (int) (Math.random() * oneLength2);
while (rand1 == rand2 || rand1 == rand3 || rand1 == rand4 || rand1 == rand5 || rand1 == rand6 || rand2 == rand3 || rand2 == rand4 || rand2 == rand5 || rand2 == rand6 || rand3 == rand4 || rand3 == rand5 || rand3 == rand6 || rand4 == rand5 || rand4 == rand6 || rand5 == rand6)
{
rand1 = (int) (Math.random() * oneLength2);
rand2 = (int) (Math.random() * oneLength2);
rand3 = (int) (Math.random() * oneLength2);
rand4 = (int) (Math.random() * oneLength2);
rand5 = (int) (Math.random() * oneLength2);
rand6 = (int) (Math.random() * oneLength2);
}
String fraseUno21 = listaUno[rand1] + " con " + listaUno[rand2];
String fraseUno22 = listaUno[rand3] + " con " + listaUno[rand4];
String fraseUno23 = listaUno[rand5] + " con " + listaUno[rand6];
System.out.print("BINAS: " + fraseUno21);
System.out.print(" , ");
System.out.print(fraseUno22);
System.out.print(" y ");
System.out.println(fraseUno23);
}
}

Simple y sencillamente quiero que lo que ahora viene en System.out.print me salga en una pantallita de color negro y con letras blancas.... por favor, ayuda, tengo mucho tiempo sin poder concretar mi proyecto =(

Gracias desde ya,