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

  • SEARCH
  • Home
  • 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 1019693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:03:14+00:00 2026-05-16T11:03:14+00:00

Simply put, I would like to make java do what I want but I

  • 0

Simply put, I would like to make java do what I want but I can not get my head around the layout manages for anything other that auto resizing to what it feels like doing.

All I would like is a fixed height “footer” and the top “main” area to auto resize in height to whatever the window is.

With the horizontal for both having a min size but no max size.

Is it possible (I know it is but it feels like it isn’t atm!)

Please help!

many thanks

Edit: Updated with advice from below:

    public JPanel getPanDescription()
    {
        JPanel masterPane = new JPanel();
        masterPane.setMaximumSize(new Dimension(999999,400));
        masterPane.setMinimumSize(new Dimension(100,400));
          <snip>
            return masterPane;
    }

this.panDescription = getPanDescription();

this.panPage = new JPanel(new BorderLayout());

this.panPage.add(this.searchPanel, BorderLayout.CENTER);
this.panPage.add(this.panDescription, BorderLayout.PAGE_END);

Works just fine, but depending on the content of panDescription, depends on its size.
It still just resizes to the content :S

  • 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-16T11:03:15+00:00Added an answer on May 16, 2026 at 11:03 am

    Use a BorderLayout. Add your footer to the bottom location. Set the max size of the footer to the fixed height you want and a width bigger than your window will ever be.

    JPanel mainPanel = new JPanel();
    JPanel footerPanel = new JPanel();
    
    this.setLayout(new BorderLayout());
    this.add(mainPanel);
    this.add(footerPanel, BorderLayout.SOUTH);
    
    footerPanel.setMaximumSize(new Dimension(10000, 100));
    footerPanel.setPreferredSize(new Dimension(600, 100));
    footerPanel.setMinimumSize(new Dimension(1, 100));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 499k
  • Answers 500k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is not pretty but it works: rm -R $(ls… May 16, 2026 at 12:45 pm
  • Editorial Team
    Editorial Team added an answer Yes. Override the base1 and base2 methods in Derived to… May 16, 2026 at 12:45 pm
  • Editorial Team
    Editorial Team added an answer No, you can't. Unfortunately, UIEvent doesn't expose any public way… May 16, 2026 at 12:45 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I recently came across some Java code that simply put some strings into a
My 7 year old would like to learn, how to program? (his idea not
Put simply: I want the following code to print sub: Element e = new
The problem: Maintain a bidirectional many-to-one relationship among java objects. Something like the Google/Commons
I've read around quite a bit but haven't found a definitive answer. I have
I'd like to implement a dynamic plugin feature in a Java application. Ideally: The
Hey I'm new to PHP so would really like your insight on how I'm
I'm trying to learn how to write tests. I'm also learning Java, I was
First off I'm running Ubuntu 9.10 I've edited the /etc/environment file to look like
This is almost certainly a very novice question, but being as I am a

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.