Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Swing / AWT / SWT
Search Coderanch
Advance search
Google search
Register / Login
Forums
Register
Login
Java
»
Swing / AWT / SWT
How do I add Text fields on seperate lines
Jere Johnson
,
Greenhorn
Sep 14, 2003 19:34:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
Hello,
How do i add text fields so that they dont look so cramped?
I want them on seperate lines....
code:
public void init () { Label title1, title2, title3, title4; c = new CheckboxGroup (); title1 = new Label ("Check for option: "); add (title1); miles = new Checkbox ("Miles", c, false); add (miles); miles.addItemListener(this); kilometers = new Checkbox ("Kilometers", c, false); add (kilometers); kilometers.addItemListener(this); title2 = new Label ("Enter distance traveled: "); add (title2); distanceField = new TextField (15); add (distanceField); distanceField.addActionListener (this); title3 = new Label ("Enter the time it took: "); add (title3); hoursField = new TextField (10); add (hoursField); hoursField.addActionListener (this); minutesField = new TextField (10); add (minutesField); minutesField.addActionListener (this); secondsField = new TextField (10); add (secondsField); secondsField.addActionListener (this); calculate = new Button ("Calculate"); startOver = new Button ("Start Over"); add (calculate); add (startOver); }
Gayathri Prasad
,
Ranch Hand
Sep 15, 2003 03:57:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
Hi,
Do u know how to use lay out managers ? Use lay out managers to get the required format of UI.
Cheers,
Gaya3
Dirk Schreckmann
,
Sheriff
staff
Sep 18, 2003 04:51:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
Moving this to the Swing / JFC / AWT forum...
Paul Stevens
,
Ranch Hand
Sep 18, 2003 06:13:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
Your code doesn't show what you are adding them to. What layout etc.
Here is an
example
to look at.
Post by:
autobot
Ew. You guys are ugly with a capital UG. Here, maybe this tiny ad can help:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
This thread has been viewed 1049 times.
Similar Threads
GUI
Need HELP Temperature Conversion
Multiple controls in a panel
Security Errors
Insurance Quote Applet
More...
All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 02:34:47
.