|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package testinviofile;
import javax.swing.JOptionPane;
/**
*
* @author Administrator
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main (String[] args ) {
Object[] options = {"Server", "Client"};
int scelta = JOptionPane. showOptionDialog(null, "Cosa sei Client o Server?", "Giocare",
null, options, options[1]);
switch(scelta){
case 0:{
Server.server();
break;
}
case 1:{
Client.client();
break;
}
case -1:{
System. out. println("Programma Chiuso senza aver effettuato nessuna operazione!");
break;
}
}
}
}
|
|