Necesito que al precionar un boton se abra una ventana nueva.
lo que hago hasta el momento es capturar el evento del Boton,
Código:
public boolean handleEvent (Event evt2)
{
switch (evt2.id)
{
case Event.WINDOW_DESTROY:
{
System.exit(0);
return true;
}
case Event.ACTION_EVENT:
{
if (evt2.target==boton)
{
guarda();
}
if (evt2.target==botoncito)
{
System.exit(0);
return true;
}
if (evt2.target==factura)
{
//COMO ABRO UNA VENTANA AL PRESIONAR ESTE BOTON
}
}
default:
return false;
}
}
{
switch (evt2.id)
{
case Event.WINDOW_DESTROY:
{
System.exit(0);
return true;
}
case Event.ACTION_EVENT:
{
if (evt2.target==boton)
{
guarda();
}
if (evt2.target==botoncito)
{
System.exit(0);
return true;
}
if (evt2.target==factura)
{
//COMO ABRO UNA VENTANA AL PRESIONAR ESTE BOTON
}
}
default:
return false;
}
}
necesito q al presionar el boton factura se abra el archivo 'factura.java' q tiene la estructura de un panel, si no se puede hacer asi, necesito q se abra una ventana nueva.
ojala algn sepa o de pistas concretas