title: JTextArea font from JComboBox
body: <p>I made my own text editor some days ago and I am having trouble with fonts. The component that I used for making the text editor is <code>JTextArea</code> .So what I want to do is to show the user a Dialog box with 3 <code>JComboBoxes</code>which would be size, font and style (Bold, italic, underlined) and a button. After making the desired choices, the user will click on the button and the font will be applied.</p>
  
  <p>Here is my code. What is the correct way to use the <code>.setFont()</code> method?</p>
  
  <pre><code>final JTextArea area = new JTextArea(5,10);
  
  final JComboBox font = new JComboBox();
  font.addItem("Arial");
  font.addItem("Calibri");
  font.addItem("Garamond");
  font.addItem("Jokerman");
  font.addItem("MV Boli");// and many more
  
  final JComboBox size = new JComboBox();
  size.addItem("8");
  size.addItem("12");
  size.addItem("16");
  size.addItem("18");
  size.addItem("24");// and many more
  
  final JComboBox style = new JComboBox();
  font.addItem("bold);
  font.addItem("itaic");
  font.addItem("underlined");
  
  JButton button = new JButton("Done");
  button.addActionListener(new ActionListener()
  {
  public void actionPerformed(ActionEvent ae)
  {
  area.setFont(new Font(font.getSelectedItem(),style.getSelectedItem(),size.getSelectedItem()));
  }
  });
  </code></pre>