title: How do you use re-size all Graphic2D
body: <p>In java how can you make a game fully realizable! But so logic and graphics can work with it? I have tried using SCALE methods. But this doesn't allow perfect full-screen for every computer. So I made this:</p>
  
  <pre><code>    public void resize(int WIDTH, int HEIGHT, boolean UNDECORATED) {
  
            frame.setPreferredSize(new Dimension(WIDTH, HEIGHT));
            frame.setMaximumSize(new Dimension(WIDTH, HEIGHT));
            frame.setMinimumSize(new Dimension(WIDTH, HEIGHT));
  
            this.WIDTH = WIDTH;
            this.HEIGHT = HEIGHT;
            frame.setUndecorated(UNDECORATED);
            frame.setSize(WIDTH, HEIGHT);
        }
  </code></pre>
  
  <p>So you can set your screen size to whatever you want! It works but the graphics will not work with it? Is there a way in Graphics2D to stretch all the graphics so it fits? For example if there was a method that existed like:</p>
  
  <pre><code>            G2D.resize(WIDTH, HEIGHT, Image.NEAREST_PARENT_RESCALE);
  </code></pre>
  
  <p>Any idea?</p>
  
  <p><strong>Things I have tried:</strong></p>
  
  <ul>
  <li>Drawing all graphics to a Buffered-image then drawing that Image onto the screen size.</li>
  <li>Just using SCALE and doing WIDTH * SCALE etc.</li>
  <li>Lots of math</li>
  </ul>
  
  <p><strong>Things I do not mind</strong></p>
  
  <ul>
  <li>If you have a WIDE-SCREEN it stretches graphic2D objects to the size.</li>
  <li>If you have a SQUARE-SCREEN it squishes graphics2D objects to the size.</li>
  </ul>
  
  <p>So how can I make a perfectly resealable game using Graphics2D, JFrame.</p>