Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-07-2007, 06:57 AM
Member
 
Join Date: Dec 2007
Posts: 1
chris12295 is on a distinguished road
New Line in FlowLayout
I have an assignment to make a form in an Applet. I have run into a seemingly minimal problem that has cost me about 2 hours. Is it possible to force a component in a FlowLayout to move to the next line down? I want 3 text fields on top, 3 in the middle, and 2 buttons on the bottom. Under the buttons, I need to output what was typed on individual lines. Is this possible?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-07-2007, 06:49 PM
Senior Member
 
Join Date: Jul 2007
Posts: 1,189
hardwired is on a distinguished road
FlowLayout was not designed for this. Instead try something like this:
Make a separate JPanel for each row of three JTextFields. Use the default FlowLayout for these panels.
You now have three panels each containing three textFields.
Make another JPanel with a GridLayout with zero rows and one column (new Gridlayout(0,1))and add the three panels to it.
Set the layout for the Applet to BorderLayout and add this panel to the center section of the BorderLayout.
You can make up the lower output component(s) and add them to the south section of the BorderLayout.
This is referred to as using nested layouts.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
New line character mew New To Java 3 12-14-2007 07:24 PM
Help Using FlowLayout Manager toad New To Java 2 12-03-2007 01:43 AM
line number kazitula New To Java 3 11-21-2007 11:27 PM
Reading in data from file line by line bluekswing New To Java 1 10-02-2007 01:19 AM
Help with Drawing a line Rgfirefly24 New To Java 1 08-06-2007 09:40 AM


All times are GMT +3. The time now is 02:49 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org