title: JTextField input and output
body: <p>I'm trying to design a Mile to Nautical Mile calculator in Java.</p>
  
  <p>I was able to create and run it okay through the console, but i'm having trouble learning how to do it in JFrames.</p>
  
  <p>what im basically wanting to do is:</p>
  
  <p>Have two text fields and a button, one text field miles and one for nautical miles, when you enter the amount into one then press the button the result will display in the other field.</p>
  
  <p>I've pasted my code below</p>
  
  <p>Not really sure what to do next</p>
  
  <pre><code>package Mile_Conversion;
  
  import java.awt.*;
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  
  
  import javax.swing.JButton;
  import javax.swing.JFrame;
  import javax.swing.JLabel;
  import javax.swing.JPanel;
  import javax.swing.JTextField;
  import javax.swing.SwingConstants;
  
  public class OwnWindow implements ActionListener{
  
  
  
      public static void main(String[] args) {
          MyJFrame();
  
      }
  
      public static void MyJFrame() {
  
          //JLabel
          JLabel start = new JLabel("Enter the amount below to calculate");
          start.setBounds(/*x*/70, -65/*Y*/, 270, 150); // x, y, width, height    x across, y down
          JLabel milecon = new JLabel("Miles");
          milecon.setBounds(154, 55, 50, 150);
          JLabel nautcon = new JLabel("Nautical Miles");
          nautcon.setBounds(135, -15, 150, 150);
  
          //JTextField
          JTextField miles = new JTextField();
          miles.setBounds(100, 140, 150, 25);
          JTextField nautical = new JTextField();
          nautical.setBounds(100, 70, 150, 25);
  
          double mile, nautmile;
  
      /*
              mile = nautmile * 0.868;
  
              nautmile = mile * 1.150; 
      */
  
          //JButton
          JButton convert = new JButton("Convert");
          convert.setBounds(250, 200, 90, 25);
  
  
          //JFrame
          JFrame window = new JFrame("Milage Conversion");
          window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          window.setSize(400, 300);
          window.setVisible(true);
          window.setLayout(null);
          window.setResizable(false);
          window.add(start);
          window.add(miles);
          window.add(nautical);
          window.add(convert);
          window.add(milecon);
          window.add(nautcon);
  
      }
  
      @Override
      public void actionPerformed(ActionEvent e) {
  
  
      }
  }
  </code></pre>