Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Logging Tab

 
Patrick Brahami
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alright I have finally finished my application business logic and GUI(Swing if it matters).
(a lot thanks to you Java Ranch community!!)

I want to create a new tab that only I (the program) will be able to write to, and it will be just a white text field with messages. And I'll even let the user ability to save it as text file.

Again, I've got naive solutions in my head. But I prefer to advice before
starting so the idea is - how is it done?
Should I work with a label? a big text box?
How can I write line at a time? and is there a limit on the size of lines that can be written to a textbox?

Thanks in advance.
[ October 19, 2008: Message edited by: Patrick Brahami ]
 
Pavan Kumar Srinivasan
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For multiple lines use a JTextArea and set editable to false for other users.
 
Patrick Brahami
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see. Fits nice.
How can I append text in different color/font size?
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic