Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6094079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:38:08+00:00 2026-05-23T12:38:08+00:00

Recently, I started creating a program for the company I work for. Just as

  • 0

Recently, I started creating a program for the company I work for. Just as background info, I’m still a student and a beginner programmer, so my solution is probably not recommended and I didn’t know how to do it otherwise, but it works and I’m not going to be judged for it because it’s a student job totally unrelated to programming.

The thing about the program is, it’s going to be run on multiple different computer with different screen sizes and resolutions (800×600 and up). To make sure it takes as much of the screen as possible without losing any part of the program, I set the layout to null and hard-coded everything using relative values.

The program is kiosk-style and I first get the screen size values and go from there (for example, off the top of my head, the left-side menu takes an eighth of the screen, the top bar 2%, etc.). I also use font metrics to make sure the components are sized correctly and that everything gets displayed nicely.

My question is: why is it so frowned upon to make the layout null instead of using the layout managers? (I was told on some forums that this is a horrible way of doing things) I know how the layout manager works and know how to use the different layouts, but for the requirements of this program (multiple different resolutions, custom button shapes and placements, text changing on the components when you change language, etc.), I couldn’t see myself using the layout managers to do it all.

How do you more experienced programmers use the layout managers in a situation like this? And what do you do when you want a button to be somewhere specific and other components somewhere else specific that don’t really match any of the predefined layouts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:38:09+00:00Added an answer on May 23, 2026 at 12:38 pm

    If you layer the layout managers correctly the screen will re-flow to different sizes for you, the idea is to use a single set of layout managers on ALL screen sizes.

    If you use null you will have to do each screen size yourself. Not only that but if the app can be windowed you have to support every possible size they might scroll to.

    That’s kind of difficult to do, but the layout mangers are designed to do just that.

    There are some common tricks. BorderLayout is a great layout to start with. Sometimes you might use it at multiple levels–often with just 2 or 3 components in it. That’s because it’s really good at giving all but one area the minimum required area and giving everything else to the CENTER.

    FlowLayout can be useful but it’s tricky if your components are different sizes.

    I wouldn’t try GridBagLayout unless you are planning to write code to feed your layout manager (an excellent solution at that!).

    I also wouldn’t use GUI builders, they don’t know the overall way you want to reflow your layout.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just recently started using SQLAlchemy and am still having trouble wrapping my head
I recently started work on a personal coding project using C++ and KDevelop. Although
I recently started using Eclipse at work for my Java servlet projects. I've been
I recently started creating services layers and making declarations like: MyService myService = new
I've recently started creating my own annotations and to sport TDD/BDD, I'd want to
I have recently started creating an iPhone application using Appcelerator's Titanium. Since the application
I've recently started creating some jQuery plugins and I'm finding it difficult to document
I've recently started using Sweave * for creating reports of analyses run with R,
Iv'e recently started a new job as an ICT Technician and im creating an
I recently started creating a site where users will be able to join groups

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.