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 6469993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:03:29+00:00 2026-05-25T06:03:29+00:00

I am using netbeans 7.0.1 to build a simple JFrame application I am putting

  • 0

I am using netbeans 7.0.1 to build a simple JFrame application

I am putting a textarea and a couple of buttons on using the gui builder

the buttons are on the same vertical level and the right hand button shifts right on resize of the window – that is fine but I would like the text area to do the same – i.e. resize to fit the relevant width of the window.

For the life of me I cannot see how this is done – I have looked around and I can find code for a hand coded app but not for netbeans gui builder

  • 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-25T06:03:29+00:00Added an answer on May 25, 2026 at 6:03 am

    It’s all about the layout you’re using. I would personally use GridBagLayout, probably because I am accustomed to it. Basically, you should follow these steps:

    1. Change the layout of the container which owns the textarea to GridBagLayout. You can do that by right-clicking on the container(being it the JFrame, a panel, whatever) and there you will see the Layout menu. It contains a GridBagLayout option.
    2. In the component inspector select the JScrollPane that owns the JTextArea. Check out the “Layout” section in the properties tab. It contains the GridBagConstraints which command the layout behaviour of the JScrollPane and thus commands the JTextArea.
    3. Play with the layout properties :). Basically you should set the X and Y weight to 1, and the Fill to “Both”. This will tell the JScrollPane to fill any vertical and horizontal space there is on the Frame, and the X and Y weight will pull any other components as far as possible.

    You can read more about GridBagLayout here: http://netbeans.org/kb/docs/java/gbcustomizer-basic.html

    Learning GridBagLayout could take a couple of hours, getting used to it could take a couple of days, but it’s worth learning. Just my 2 cents.

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

Sidebar

Related Questions

I'm using NetBeans IDE 6.9 (Build 201006101454), and wrote this simple Java class (that
I have a simple application using netbeans for developing and maven for building et
All, I am (trying to) using Netbeans to build a simple Qt app (from
Till now, I had been using Netbeans Swing GUI generation feature to build GUI
I'm using NetBeans to develop some simple applications to solve puzzles . Upon launching
I'm trying to build an application in PHP using my Ubuntu laptop. I'm having
I've recently started using NetBeans, coming from Eclipse. I have a simple implementation of
I am trying to run(emulate) a simple midp2 j2me application in netbeans(6.8) in ubuntu
is it possible using swing, to build a GUI whose elements, when the GUI
I am beginning a new Java web application using Netbeans, and I would like

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.