Ayuda con intrerfaz 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,
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,
