J
Jim
I'm trying to layout a series pairs of labels (JLabel) and text fields
(JTextfield) for a form.
Is there an easy way of doing this and constraining the height of the
textfield to be 1 character height?
Ideally, I could just plunk down a text field and have it be the right
height (with a border would be nice) regardless of its container and layout
style.
I've tried a 2-column grid with labels on the left and textfields on the
right and the textfield gets resized
whenever the grid is resized. Trying two side-by-side panels with vertical
box layouts doesn't work either.
Putting the textfield on its own JPanel keeps the textfield a constant size
but this seems like overkill.
Is subclassing a JTextfield (or a JPanel with JTextfield) so I don't have
set each one up individually a solution?
I'm using JBuilder Foundation IDE.
Thanks for your suggestions.
Jim Cant
(JTextfield) for a form.
Is there an easy way of doing this and constraining the height of the
textfield to be 1 character height?
Ideally, I could just plunk down a text field and have it be the right
height (with a border would be nice) regardless of its container and layout
style.
I've tried a 2-column grid with labels on the left and textfields on the
right and the textfield gets resized
whenever the grid is resized. Trying two side-by-side panels with vertical
box layouts doesn't work either.
Putting the textfield on its own JPanel keeps the textfield a constant size
but this seems like overkill.
Is subclassing a JTextfield (or a JPanel with JTextfield) so I don't have
set each one up individually a solution?
I'm using JBuilder Foundation IDE.
Thanks for your suggestions.
Jim Cant