Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Text Question?

Status
Not open for further replies.

tikoze

Programmer
Jun 6, 2005
4
0
0
US
I am writing a GUI for a simple computer game. I am using a JButton that, when clicked brings up an additional JFrame that is 400 x 700 pixels to display the Game Rules.

It seems like a simple enough concept but I have not had time to do a lot of programming until recently. The only things I can remember to do to display text are using JLabel, JTextField, or JTextArea. The problem with JLabel is that it is only a single line of text. The problem with the other two is that they can be edited.

What can I do to display multiple lines of text that the end user cannot modify?
 
Use a JTextArea and call setEditable(false) on it to make it read-only/

--------------------------------------------------
Free Database Connection Pooling Software
 
Thanks, I knew there was something simple like that that I was forgetting!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top