import java.awt.FlowLayout; import java.awt.Font; import java.awt.event.*;  import javax.swing.*;  public class Editor_Texto extends JFrame implements ActionListener { 	private static final long serialVersionUID = 1L; 	static JTextArea textArea1; 	 	 	 	JTextArea texto;  	JCheckBox caja1, caja2; 	class Maneja implements ActionListener { 		public void actionPerformed(ActionEvent e) { 				if (caja1.isSelected() && caja2.isSelected() ) 				    texto.setFont(new Font("Roman", Font.BOLD | Font.ITALIC, 14) ); 				if (caja1.isSelected() && !caja2.isSelected()  ) 				    texto.setFont(new Font("Roman", Font.BOLD, 14) ); 				if (caja2.isSelected() && !caja1.isSelected() ) 				    texto.setFont(new Font("Roman", Font.ITALIC, 14) ); 				if (!caja1.isSelected() && !caja2.isSelected() )  				    texto.setFont(new Font("Arial", Font.PLAIN, 14) ); 		} 	} 		 	 	Editor_Texto() { 		super("Editor de Texto Mejorado"); 		Maneja man = new Maneja(); 		texto= new JTextArea(30, 30); 		 		caja1 = new JCheckBox("Negrita"); 		caja2 = new JCheckBox("Cursiva");         caja1.addActionListener( man );         caja2.addActionListener( man ); 		 		setLayout( new FlowLayout() ); 		add(texto); 		add(caja1); 		add(caja2); 		setLocation(30, 25); 		setSize(600, 600); 		setVisible(true); 	} 	public void actionPerformed(ActionEvent arg0) { 		 	} 	public static void main(String[] args) { 		new Editor_Texto(); 	} }