fork download
  1. import java.awt.Dimension;
  2. import java.awt.Font;
  3.  
  4. import javax.swing.JFrame;
  5. import javax.swing.JTextArea;
  6.  
  7. public class Main {
  8.  
  9. /**
  10.   * @param args
  11.   */
  12. public static void main(String[] args) {
  13. JFrame frame = new JFrame("JTextArea Test");
  14. frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  15. String text = "押し開ける";
  16. JTextArea textArea = new JTextArea(text, 5, 10);
  17. textArea.setPreferredSize(new Dimension(100, 100));
  18. textArea.setFont(new Font(null));
  19. frame.add(textArea);
  20. frame.pack();
  21. frame.setVisible(true);
  22. }
  23.  
  24. }
  25.  
Runtime error #stdin #stdout 0.09s 381248KB
stdin
Standard input is empty
stdout
Standard output is empty