Creating a class in conjunction with exceptions
<p>I set up the structure for my entire program but am having trouble creating two classes, TooColdException and TooHotException, they are to have a contractor that takes a String parameter and passes it to the Exception class constructor, I semi created the classes but am not sure how to finish, my code is below and each secimport java.awt.<em>;
import java.awt.event.</em>;
import javax.swing.*;</p>

<pre><code>public class HotCoffeePanel extends JPanel implements ActionListener
{
  private JLabel     label;
  private JTextField temperature;
  private JButton    check_temp;

  public HotCoffeePanel()
  {
    label       = new JLabel("Water temperature  in \u00b0F:");
    temperature = new JTextField(4);
    check_temp  = new JButton("Check Temperature");

    add(label);
    add(temperature);
    add(check_temp);
    check_temp.addActionListener(this);

    setPreferredSize(new Dimension(300, 75));
    setBackground(Color.yellow);
  }

  // -----------------------------------------------------
  // Listen for the Check Temperature button and determine
  // if water is the correct temperature to brew coffee
  // -----------------------------------------------------
  public void actionPerformed(ActionEvent event)
  {
    if (Integer.parseInt(temperature.getText()) &lt; 190)
      try
      {
        throwTooColdException();
      }
      catch(TooColdException tce)
      {
        JOptionPane.showMessageDialog(null, tce.getMessage());
      }
    else if (Integer.parseInt(temperature.getText()) &gt; 200)
      try
      {
        throwTooHotException();
      }
      catch(TooHotException the)
      {
        JOptionPane.showMessageDialog(null, the.getMessage());
      }
    else
      JOptionPane.showMessageDialog(null, "Water temperature is fine for brewing coffee.");
  }

  //------------------------
  //  TooColdException class
  //------------------------

  public class TooColdException
  }
    public TooColdException(String  )

  }

  //------------------------
  //  TooHotException class
  //------------------------

  public class TooHotException
  }
    public TooColdException(String  )

  }



  // -------------------------------------
  // Exception thrown if water is too cold
  // -------------------------------------
  private void throwTooColdException() throws TooColdException
  {
    throw new TooColdException("Temperature is too cold to brew coffee.");
  }

  // ------------------------------------
  // Exception thrown if water is too hot
  // ------------------------------------
  private void throwTooHotException() throws TooHotException
  {
    throw new TooHotException("Temperature is too hot to brew coffee.");
  }
}  // End of HotCoffeePanel class definition
</code></pre>