title: Why is my look and feel look very weird when I launch my program?
body: <p>I have two classes, <code>Game.java</code> and <code>GameOver.java</code>.</p>
  
  <p><a href="https://pastebin.com/7iDhVq0q" rel="nofollow noreferrer">Game.java</a>
  <br><a href="https://pastebin.com/5DdBMhAg" rel="nofollow noreferrer">GameOver.java</a></p>
  
  <p>This part of the code won't work when I launch the program:</p>
  
  <pre><code>try {
          UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
      } catch (Throwable e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>The Look and Feel won't set the first time, although when the <code>GameOver</code> class is run and you press retry, the Look and Feel does set. I have tried to track down this issue, but I do not know what is causing it. What is wrong with my code and how do I fix it?</p>