ok missing 3 classes, Info, InfoStorage, CityInfo, so I can’t test.
also what a monster class, I can dump 100 best practices on you right now but’ll start with stuff which has a direct effect.
try changing:
public void show_popup(String msg) {
pop_up = new Frame("GeoQuiz");
popup_label = new Label(msg);
b_ok = new Button("OK");
b_ok.setSize(50, 30);
b_ok.setLocation(85, 35);
pop_up.add(b_ok);
pop_up.add(popup_label);
pop_up.setSize(200, 100);
pop_up.setLocation(700, 220);
pop_up.setVisible(true);
b_ok.addActionListener(this);
pop_up.addWindowListener(this);
}
with:
http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html
//custom title, no icon
JOptionPane.showMessageDialog(frame,
“Eggs are not supposed to be green.”,
“A plain message”,
JOptionPane.PLAIN_MESSAGE);
public void show_popup(String msg) {
JOptionPane.showMessageDialog(this, msg, "Info", JOptionPane.PLAIN_MESSAGE);
}
As for the layout issue if your gonna specify sizes and places you should adleast setLayout(null);
On a other note study has shown that in general users don’t like components popping up out of no where/disappearing. Disable is preferred.