GridBag Layouts JAVA SWING - Arranging objects in a Panel

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
42,195
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 24, 2009

This video will show you the most effective and simplest way to arrange labels and buttons (or any other object) in a panel. It discusses the gridbag layout and talks about how to place labels in the frame, the way you want.

If you have any questions about the content discussed in the video, just ask me. The previous video was about Action Listeners and the next video will be about drawing shapes and graphics in Java.

  • likes, 3 dislikes

Link to this comment:

Share to:

Top Comments

  • How do you put them at TOP LEFT corner?

  • Oracle should put that tutorial on their website.

see all

All Comments (107)

Sign In or Sign Up now to post a comment!
  • @TRana9 or frame.getContentPane().add(pai­nel, BorderLayout.BEFORE_FIRST_LINE­);

  • @TRana9 frame.getContentPane().add(pai­nel, BorderLayout.LINE_START);

  • nice nice nice :))) fanks brother

  • @BenGeocth thats not correct.

  • @TRana9 gridx = 0 gridy = 0

  • omg....that's what i need for my application...you help me alot.

    thank you....

    thank a millions!!!

  • im using Jgrasp. Copied you coding exactly and still didn't work... any advice?(copied it EXACTLY)

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more