• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Output in Swing

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic