Results 1 to 3 of 3
  1. #1
    fresh83 is offline Member
    Join Date
    Dec 2009
    Posts
    55
    Rep Power
    0

    Default Can you have multiple layouts using swing?

    Might be a stupid question ill keep reading but, if anyone wants to elborate some tips to learning gui and swing ,a student is listening .

    my q poped up when i came across this page.
    A Visual Guide to Layout Managers (The Java™ Tutorials > Creating a GUI With JFC/Swing > Laying Out Components Within a Container)

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,445
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by fresh83 View Post
    Might be a stupid question ill keep reading but, if anyone wants to elborate some tips to learning gui and swing ,a student is listening .

    my q poped up when i came across this page.
    A Visual Guide to Layout Managers (The Java™ Tutorials > Creating a GUI With JFC/Swing > Laying Out Components Within a Container)
    Your question is in the topic title? If so, no, a component can only have one LayoutManager at the same time; this is not really a restriction because all components are containers as well, so each component can have more than one (other) component as its children and each child can have its own LayoutManager again. A JPanel is the ideal candidate for a child component.

    Before you build up your components like this (and everybody does this) draw your design on a piece of paper and define which component carries what other components and uses which LayoutManager. It pays back if you do that before you start banging your keyboard.

    kind regards,

    Jos

  3. #3
    fresh83 is offline Member
    Join Date
    Dec 2009
    Posts
    55
    Rep Power
    0

    Default

    i have what i want to do planned out , in another thread right now "combining these 2 projects" . Right now im just playing with adding components . Im looking over the dif layouts and i like the border layout for the project im working on and but, idk if you add the tabs to the layout or the layout to the tabs .

Similar Threads

  1. map javax.swing.text.Element to javax.swing.text.View
    By elizabeth in forum New To Java
    Replies: 1
    Last Post: 07-30-2007, 07:02 PM
  2. Layouts ?
    By plodos in forum Eclipse
    Replies: 3
    Last Post: 07-30-2007, 03:03 PM
  3. Printing Swing components in multiple pages
    By Rajeswari in forum New To Java
    Replies: 1
    Last Post: 07-27-2007, 05:49 PM
  4. Printing Swing components in multiple pages
    By Rajeswari in forum AWT / Swing
    Replies: 0
    Last Post: 07-27-2007, 05:01 PM
  5. multiple databases
    By varunthecool in forum JDBC
    Replies: 2
    Last Post: 07-09-2007, 08:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •