title: How to name JFrame in a constructor
body: <p>Question may be different than what you expected, but I'm creating a utility function for JFrames to make it easier for future me.</p>
  
  <pre><code>public void setJframe(String title, int w,int h, JFrame name, Boolean maximize){
      name.setSize(w, h);
      name.setTitle(title);
  
      if (maximize == true) {
          name.setExtendedState(name.getExtendedState()|JFrame.MAXIMIZED_BOTH);
      } else {
          name.setLocationRelativeTo(null);
      }
  }
  </code></pre>
  
  <p>I want the ability to name the JFrame as I type in the parameters. At the moment, when I type in a string it simply spits out an error saying I can't use a string? I want "name" to be like a string variable where I can type in a string value and have the object be named that.</p>
  
  <p><strong>Edit:</strong> Need to make the question more clear...</p>
  
  <pre><code>PackageName.setJframe("Title of the Frame", 500, 800, f, false);
  </code></pre>
  
  <p>Returns this error:</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.Error: Unresolved compilation problems: </p>
    
    <blockquote>
      <p>f cannot be resolved</p>
      
      <p>f cannot be resolved</p>
      
      <blockquote>
        <p>at gui.GuiMain.guiSet(GuiMain.java:17)</p>
        
        <p>at urAPackage.Main.main(Main.java:8)</p>
      </blockquote>
    </blockquote>
  </blockquote>
  
  <p>Eclipse says method f is not applicable to constructor</p>