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 4 of 4

Thread: What layout to use for a desktop application?

  1. #1
    Junior Member
    Join Date
    Jul 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default What layout to use for a desktop application?

    Hi, good day, would just like to ask if what do you usually use as a layout for creating desktop applications... i tried the default grid layout for a while but i found it very limitting in terms of positioning components and sizes.. so i've shifted to using a null layout and just assigning the x y coordinates and the size... but the code is really messy this way but it works.. what do people usually use.. iv seen a combination of layouts combined together with jpanels grouping each part of the interface... i was hoping to find a better way as i write desktop applications fairly frequently and was hoping use a more organized version than a null layout (setlayout(null))... i'm looking forward to make applications with nice designs too mostly like the mobile apps with flat ui designs and would also like to ask what would be the best direction to designing layouts with graphics buttons, animations on moise overs, animated backgrounds, maybe background music, pretty much graphic intensive but very streamlined look... thank u...


  2. #2
    Senior Member
    Join Date
    Jul 2013
    Location
    Europe
    Posts
    666
    Thanks
    0
    Thanked 121 Times in 105 Posts

    Default Re: What layout to use for a desktop application?

    You usually use a multitude of layouts and several panels all of which can have different layouts again.

    The most common is probably the BorderLayout because it is kind of a standard for most GUI's nowadays. The most flexible I would say is the MigLayout. Its (rather) easy to use and the results almost always look acceptable.
    It is strongly discouraged to use a null layout. Its always a sign of bad design and never translates well with dynamic resizing of the window.

  3. The Following User Says Thank You to Cornix For This Useful Post:

    GregBrannon (August 31st, 2014)

  4. #3

    Default Re: What layout to use for a desktop application?

    The desktop structure contains a permanent app bar with a floating action button. The app bar absorbs elements from the tablet and mobile bottom bars. Where possible, the window controls are absorbed into the app bar.

    Side navigation menus can take up the full height of the screen size (including under the app bar) and be accessed temporarily or pinned for permanent display. Side nav menus, as well as the content canvas, can have their own secondary toolbars for tabs, palettes, or secondary actions.

  5. #4
    Member
    Join Date
    Apr 2014
    Posts
    92
    Thanks
    3
    Thanked 7 Times in 7 Posts

    Default Re: What layout to use for a desktop application?

    In my 12 years of professional Swing GUI development, I've been able to get the layout I want 99% of the time just using GridBagLayout and a well-designed nesting of sub panels. Definitely try to avoid absolute positioning. It's almost always best to work with the layout managers instead of against them, even though it's strange and frustrating at first.

Similar Threads

  1. Replies: 1
    Last Post: August 23rd, 2013, 06:33 AM
  2. Remote Desktop Application
    By Drango in forum Java ME (Mobile Edition)
    Replies: 3
    Last Post: January 24th, 2011, 08:01 AM
  3. Replies: 0
    Last Post: December 3rd, 2009, 04:43 PM
  4. SQLite and Desktop Application
    By urosz in forum JDBC & Databases
    Replies: 12
    Last Post: November 2nd, 2009, 03:50 AM
  5. Desktop Database Application
    By TCoomer in forum JDBC & Databases
    Replies: 2
    Last Post: June 4th, 2009, 03:51 PM