wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes JTextArea with varied lengths Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTextArea with varied lengths" Watch "JTextArea with varied lengths" New topic
Author

JTextArea with varied lengths

Tariq Ahsan
Ranch Hand

Joined: Nov 03, 2003
Posts: 116
Hi,

I am trying to create an data input form using JTabbedPane, JPanel and GridBagLayout, JLabel, JTextArea etc. I like to have multiple data input entries in the same rows with multiple rows on the panel. e.g. First row would have just the user id entry box. The second row with First Name, Middle Initial and Last Name and so on. The Problem I am having is the JTextArea of each of these to have the same length. For example I would like to have the JTextArea for the First Name and Last Name to have a length of 30 characters. But have the Middle Initial to have a length of 1.
Is there a way I can control these JTextArea to have varied lengths. Code snippets for what I am looking for would be much helpful.
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
 
Consider Paul's rocket mass heater.
 
subject: JTextArea with varied lengths