So guys, using a JOptionPane
to ask the user if the app should update or not, and after which I get these white bars in the bottom and right sides of my canvas. Tried removing the autoupdate thing and works fine. Here's my code
GameUtils.init();
String version = AutoUpdate.checkForUpdates();
if (Double.parseDouble(version) > AutoUpdate.VERSION) {
AutoUpdate.update(version);
JFrame frame = null;
try
{
frame = new JFrame(GameUtils.data.getString("title"));
} catch (JSONException e)
{
e.printStackTrace();
}
frame.getContentPane().setPreferredSize(new Dimension(1000, 500));
frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
frame.setResizable(false);
frame.pack();
frame.setLocationRelativeTo(null);
GameUtils.instance = new Game(frame);
frame.addWindowListener(new WindowListener() {
@Override
public void windowOpened(WindowEvent e) {
}
@Override
public void windowClosing(WindowEvent e) {
GameUtils.instance.stop();
System.exit(0);
}
@Override
public void windowClosed(WindowEvent e) {
}
@Override
public void windowIconified(WindowEvent e) {
}
@Override
public void windowDeiconified(WindowEvent e) {
}
@Override
public void windowActivated(WindowEvent e) {
}
@Override
public void windowDeactivated(WindowEvent e) {
}
});
frame.setVisible(true);
GameUtils.instance.start();
}
Coordinating system works normally I want it to look this way