title: Error when using Double.parseDouble
body: <p>Im new to java and just wondering how do i get rid of this error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NumberFormatException: empty String
  at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1011)
  at java.lang.Double.parseDouble(Double.java:540)
  at fksdfs.test1.assign(test1.java:69)
  at fksdfs.test1.main(test1.java:60)
  </code></pre>
  
  <p>I'm trying to get the Value from the textfield and convert it into a double to perform calculations on but it is not working. Can anyone help me?
  Sorry for the messy coding.</p>
  
  <pre><code>public class test1 {
      private JTextField tField;
  
      public static void main(String[] args) {
          JLabel Age = new JLabel("Age");
          JTextField textField = new JTextField(10);
          JLabel Overall = new JLabel("Overall: ");
          JTextField age = new JTextField(10);
          JLabel shoot = new JLabel("Shooting: ");
          JTextField shooting = new JTextField(10);
          JLabel dribble = new JLabel("Dribbling: ");
          JTextField dribbling = new JTextField(10);
          JLabel pass = new JLabel("Passing : ");
          JTextField passing = new JTextField(10);
          JLabel defend = new JLabel("defending : ");
          JTextField defending = new JTextField(10);
          JLabel head = new JLabel("Heading : ");
          JTextField heading = new JTextField(10);
          JLabel pace = new JLabel("Pace: ");
          JTextField pacey = new JTextField(10);
  
          JPanel panel = new JPanel();
          panel.add(Age);
          panel.add(textField);
          panel.add(Overall);
          panel.add(age);
          panel.add(shoot);
          panel.add(shooting);
          panel.add(dribble);
          panel.add(dribbling);
          panel.add(pass);
          panel.add(passing);
          panel.add(defend);
          panel.add(defending);
          panel.add(head);
          panel.add(heading);
          panel.add(pace);
          panel.add(pacey);
  
          String age1 = textField.getText();
          String overall1 = age.getText();
          String shooting1 = shooting.getText();
          String dribbling1 = dribbling.getText();
          String passing1 = passing.getText();
          String heading1 = heading.getText();
          String defending1 = defending.getText();
          String pace1 = pacey.getText();
  
          JOptionPane.showMessageDialog(null, panel);
  
      }
  
      public static void assign(String s) {
          Double.parseDouble(s);
  
      }
  }
  </code></pre>