area.append(choice.getSelectedItem() + \ + \ \ text.setText(null);
}
if (e.getSource() == Quit || e.getSource() == quit) {// quit键 System.exit(0); }
if (e.getSource() == about) { JOptionPane.showMessageDialog(File, \ \TION_MESSAGE); }
if (e.getSource() == copy) { area.copy(); text.copy(); }
if (e.getSource() == cut) { area.cut(); text.cut(); }
if (e.getSource() == paste) { area.paste(); text.paste(); }
}
public static void main(String[] args) { CHatromm chatroom = new CHatromm(); }
@Override
public void itemStateChanged(ItemEvent e) {// 设置显示字体 // TODO Auto-generated method stub String name = (String) list.getSelectedItem(); Font f = new Font(name, Font.BOLD, 20); area.setFont(f); }
}
6