title: How to make JTextField into String/Long?
body: <p>Currently Having my fields like that:</p>
  
  <pre><code> final JTextField PID = new JTextField("Product ID", 7);
   frame.getContentPane().add(PID);
  </code></pre>
  
  <p>My method:</p>
  
  <pre><code>public StockItem(Long id, String name, String desc, double price) {
      this.id = id;
      this.name = name;
      this.description = desc;
      this.price = price;
  }   
  </code></pre>
  
  <p>Trying to use this method with values from my <code>JTextField</code>s, but it does not allow to use <code>JTextField</code>s under my Long/String/double places.
  Is there any way how I could convert my <code>JTextField</code>s into the required things without editing my Method.</p>