This is driving me crazy: I programmed a small JFrame with several JPanels inside. I have several error messages that I have created with
JOptionPane.showMessageDialog(this, "Text here");
But it always, no matter what, centers in the middle of the screen, and NOT the program-window. It worked for a long time, and suddenly, after a weekend I came back and now it wont center-align inside the window. Any ideas? anyone?
public class kontrollvindu1 extends JPanel {
public Kontrollvindu1() {
showMsg("text here");
}
public void showMsg(String text) {
JOptionPane.showMessageDialog(this, text);
}
}//END OF CLASS Kontrollvindu1