Como se puede cerrar frame
Publicado por Candres (1 intervención) el 27/05/2006 22:53:41
Hola a todos, tengo una ventana(frame) pero al intentar cerrarla no se cierra, este es el codigo de el frame espero me puedan ayudar gracias de ante mano.
public int Juego()
{
Frame frame=new Frame("Reglas");// nuevo frame
frame.setDefaultCloseOperation(Frame.EXIT_ON_CLOSE);
frame.setLayout(new FlowLayout());
frame.resize(500,500);
frame.setBackground(Color.gray);
Point dim=location();
frame.move(dim.x+50,dim.y+50);
frame.setResizable(false);
frame.show();
return 0;
}
PD: estoy usando la libreria AWT
public int Juego()
{
Frame frame=new Frame("Reglas");// nuevo frame
frame.setDefaultCloseOperation(Frame.EXIT_ON_CLOSE);
frame.setLayout(new FlowLayout());
frame.resize(500,500);
frame.setBackground(Color.gray);
Point dim=location();
frame.move(dim.x+50,dim.y+50);
frame.setResizable(false);
frame.show();
return 0;
}
PD: estoy usando la libreria AWT
Valora esta pregunta


0