• Post Reply Bookmark Topic Watch Topic
  • New Topic

Output in Swing  RSS feed

 
Bryan Zimmerman
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, I just started learning Java a few weeks ago and I'm working with Swing right now in NetBeans. In one of my projects, I'm transferring a program I wrote earlier to include a GUI. However, I'm not sure how to output text. The program should print multiple lines (changes everytime). Normally I would use System.out.print or System.out.format, is there a component I could use that basically acts as a blank text file, and if so, how?
 
Ganni Kal
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

JTextArea is a suitable component for your requirement.

Refer the following link to know more about this.

http://java.sun.com/docs/books/tutorial/uiswing/components/textarea.html


-Ganni
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!