title: How do I shrink my text field and position labels in the bottom right using BorderLayout?
body: <p>I am told to use <code>BorderLayout</code> for this project. I am unsure how to properly size my text field and I am not sure how to put the <code>JLabel</code> <code>answerCelsius</code> into the bottom right corner. </p>
  
  <p>I attempted to change the textfield with the code - <code>farenheit.setPreferredSize((new Dimension(80,20)));</code>
  This doesn't seem to do anything. </p>
  
  <p>Does using <code>BorderLayout</code> allow you to align to the <code>SouthEast</code> Grid? Or is there only 5 separate grids?</p>
  
  <pre><code>import javax.swing.*;
  import javax.swing.border.Border;
  import java.awt.*;
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  
  class JTemperature implements ActionListener {
  
      /** initialize the frame, labels, and textfield so I can use them in 
  later methods
   */
  private JTextField farenheit;
  private JLabel name, enter, degreesFarenheit, answer, answerCelsius;
  private JFrame jfrm;
  
  JTemperature() {
  
      /** Makes a Jframe and titles it Temperature Converter
       */
      jfrm = new JFrame("Temperature Converter");
  
      /**
        set my borders and layout
       */
      jfrm.getContentPane().setLayout(new BorderLayout());
  
      /** sets size of Jframe
       */
      jfrm.setSize(240, 120);
  
      /** when the jframe closes it exits by default
       */
      jfrm.setDefaultCloseOperation(jfrm.EXIT_ON_CLOSE);
  
      /** initialize the label name
       */
      name = new JLabel("(c) First name, Last", JLabel.CENTER);
  
  
      /** initialize the label enter
       */
      enter = new JLabel("Enter: ", JLabel.CENTER);
  
      /** initialize the label answerCelsius
       */
      answerCelsius = new JLabel("degrees C", JLabel.CENTER);
  
      /** initialize the label degreesFarenheit
       */
      degreesFarenheit = new JLabel("degrees F", JLabel.CENTER);
  
  
      /** initialize farenheit jtextfield for user input
       * and align it center
       */
      farenheit = new JTextField("Input");
  
  
      /** add my labels to my grid
       */
  
      jfrm.add(name, BorderLayout.NORTH);
      jfrm.add(enter, BorderLayout.WEST);
      jfrm.add(farenheit, BorderLayout.CENTER);
      jfrm.add(degreesFarenheit, BorderLayout.EAST);
      jfrm.add(answerCelsius, BorderLayout.SOUTH);
  
      /** attach the action listener to farenheit
       */
      farenheit.addActionListener(this);
  
      /** makes the frame visible
       */
      jfrm.setVisible(true);
  
  }
  
  public void actionPerformed(ActionEvent ae) {
  
      /**
       * try and catch statement error on improper input
       * math for farenheit to celsius conversion
       * formatted string to round to hundreth place
       */
      try {
  
          double userInput = Double.parseDouble(farenheit.getText());
          double celsius = (userInput - 32) * 5 / 9;
          String roundedCelsius = String.format("%,.2f ", celsius);
          answerCelsius.setText("= "+roundedCelsius+" degrees C");
  
  
  
      } catch (NumberFormatException e) {
          answerCelsius.setText("Invalid Input");
  
  
      }
  }
  
  
  public static void main (String [] args){
  
      /**
       * run program
       */
      SwingUtilities.invokeLater(new Runnable() {
          public void run() {
              new JTemperature();
  
          }
      });
  }
  }
  </code></pre>