Setting the font of a JTextArea

Use setFont(name, type, size):

import java.awt.event.*;
import javax.swing.*;
import java.util.*;
import java.awt.*;
 
public class Main extends JFrame
{     
   public static void main(String []args) {
      Main main = new Main();
      main.show();
   }
 
   public Main() {
      JTextArea jtextarea = new JTextArea();
      jtextarea.setFont(new Font("Tahoma", Font.ITALIC, 20));
      getContentPane().add(jtextarea);
 
      addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent e) {
            System.exit(0);
         }
      });
 
      setSize(400, 400);
   }
}