File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTextArea with varied lengths" Watch "JTextArea with varied lengths" New topic

JTextArea with varied lengths

Tariq Ahsan
Ranch Hand

Joined: Nov 03, 2003
Posts: 116

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
I agree. Here's the link:
subject: JTextArea with varied lengths
It's not a secret anymore!