import java.awt.*;
public class labels extends Frame
{
labels()
{
setTitle("Bonjour");
resize(300,300);
add ("North",new Label(" North "));
add ("West",new Label(" West "));
add ("East",new Label(" East "));
add ("South",new Label(" South "));
add ("Center",new Label(" Center "));
}
public boolean handleEvent(Event e)
{
if (e.id == Event.WINDOW_DESTROY)
{
dispose();
System.exit(0);
}
return (super.handleEvent(e));
}
public static void main(String[] arg)
{
labels f = new labels();
f.show();
}
}
Retour