Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Is there a way to bring a JLabel to the next line without using a grid layout?

  1. #1
    Junior Member
    Join Date
    May 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Is there a way to bring a JLabel to the next line without using a grid layout?

    Currently, I am trying to put text onto three separate lines so on my applet they show up like this:

    Total
    Tax
    Subtotal

    I am currently using a grid layout, but is there another way to put them on separate lines instead of next to each other? Thanks!


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Is there a way to bring a JLabel to the next line without using a grid layout?

    Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for new members.

    There are other layout managers. The Visual Guide to Layout Managers is a good place to start. Often, the desired answer involves a combination of the right layout managers with a number of containers rather than trying to do everything in a single container.

Similar Threads

  1. problem in Grid Layout Program
    By siddessh_java in forum What's Wrong With My Code?
    Replies: 3
    Last Post: July 8th, 2013, 08:23 AM
  2. [SOLVED] How to make a more than one line JLabel or drawString for more than one line.
    By javapenguin in forum What's Wrong With My Code?
    Replies: 9
    Last Post: June 4th, 2011, 02:16 PM
  3. Replies: 1
    Last Post: April 14th, 2011, 07:50 AM
  4. Grid bag layout inside grid bag layout
    By kiddkoder in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 29th, 2011, 08:07 AM
  5. How to align the items in a form (grid layout)?
    By onlybarca in forum AWT / Java Swing
    Replies: 4
    Last Post: November 27th, 2010, 11:38 PM