Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextArea Problems  RSS feed

 
Amy Phillips
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am having a coupld of problems with my JTextAreas. Firstly I am trying to create a form with various fields and labels. Everything is working ok but I need 3 JTextAreas one above the other and I can only seem to get 1 - prehaps the others are underneath. I can't seem to control the height of the JTextArea.
Here is the code

Secondly is it possible to prevent the user pressing the retun key to start a new line in a JTextArea, or is it possible to prvent my JTextArea from resizing if they do press it?
Thanks very much
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope this code is near to what you expect:

GridBagLayout is very tricky. Maybe this post can help to understand it.
For an introduction look at the Java Tutorial
 
Amy Phillips
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much! Its looking perfect
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!