Need simple ok alert dialog
Hi all,
I need a simple alert dialog to display a message with an ok button. I wrote on but it is not always displayed properly. Some times the background color of the panel which contains the button is not shown. This is the code I used.
public Alert(String s) {
super(new Frame(),"eDrugstore.md" ,true);
add("Center", new Label(s));
Panel p = new Panel();
p.setLayout(new FlowLayout());
Button b = new Button("OK");
b.addActionListener(this);
p.add(b);
add("South", p);
setSize(300,100);
setLocation(100,200);
}
rgds
Antony Paul

