Results 1 to 6 of 6
Like Tree1Likes
  • 1 Post By DarrylBurke

Thread: Layout help

  1. #1
    L19htn1n9 is offline Member
    Join Date
    Jul 2011
    Posts
    32
    Rep Power
    0

    Exclamation Layout help

    I need help with layouts.
    I need a simple layout of some kind, which allows me to put objects at x,y place.
    Or a layout that allows me to put a gap of space between objects, that needs to be horizontolly and vertically, I tried GridConstraints and layout, I tried to to use a Separator, but nothings seems to work ok.

    I hope you guys can help me.

    Greetings,

    L19htn1n9

    PS: it needs to work on a JPanel

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,419
    Rep Power
    20

    Default

    Have you seen this tutorial? It includes a visual guide to layouts.
    Lesson: Laying Out Components Within a Container (The Java™ Tutorials > Creating a GUI With JFC/Swing)

    And trying to 'put objects at x,y place' isn't usually a good idea.

    db
    Fubarable likes this.

  3. #3
    L19htn1n9 is offline Member
    Join Date
    Jul 2011
    Posts
    32
    Rep Power
    0

    Default

    Thank you verry much for you're reply :)
    It helped me alot, and I wanted to use apsolute position, because my JFrame will not be resizable :)

    Greetings,

    L19htn1n9

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,419
    Rep Power
    20

    Default

    Your frame might not be resizable, but what about if a user of the program has set large default fonts, possibly because of a vision defect? Using layout managers properly will automatically adjust for such personal settings.

    db

  5. #5
    L19htn1n9 is offline Member
    Join Date
    Jul 2011
    Posts
    32
    Rep Power
    0

    Default

    That is verry true, but it is just that i really dont know how to work with the layout managers :/
    and i plan to use the program, that i am coding now, for only a select few people, but when i book progress in java coding, I will look into how to properly work with layout managers, its just that i need to have open spaces to make it all look better

    L19htn1n9

  6. #6
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by L19htn1n9 View Post
    That is verry true, but it is just that i really dont know how to work with the layout managers :/
    If you check out the tutorials that Darryl provided a link to in his first post, then this problem will be solved.


    and i plan to use the program, that i am coding now, for only a select few people, but when i book progress in java coding, I will look into how to properly work with layout managers, its just that i need to have open spaces to make it all look better

    L19htn1n9
    I second Darryl's recommendation to check out the layout tutorials. They really are quite helpful.

Similar Threads

  1. don't know the right layout
    By temyong in forum New To Java
    Replies: 4
    Last Post: 03-10-2011, 01:13 PM
  2. Please help me in this layout :(
    By orionorion in forum Java Applets
    Replies: 1
    Last Post: 02-09-2011, 02:47 PM
  3. looking for a layout
    By imorio in forum AWT / Swing
    Replies: 3
    Last Post: 08-13-2010, 05:02 PM
  4. Edit layout Layout please help me
    By manhtungtnk28@gmail.com in forum New To Java
    Replies: 4
    Last Post: 11-23-2009, 08:41 AM

Tags for this Thread

Posting Permissions

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