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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:51:26+00:00 2026-05-28T04:51:26+00:00

I want to reduce the size between the components with in the Formatting group

  • 0

I want to reduce the size between the components with in the Formatting group (left side on the image). How to do this?

enter image description here

JPanel formattingGroup = createGroupWithName("Formatting");
        formattingGroup.setMinimumSize(new Dimension(250, 20));
        formattingGroup.setLayout(new GridLayout(5, 0));
        add(formattingGroup);

        final JCheckBox showSurface = new JCheckBox("Show surface");
        showSurface.setSelected(true);
        formattingGroup.add(showSurface);

        final JCheckBox showTerrain = new JCheckBox("Show terrain");
        showTerrain.setSelected(true);
        formattingGroup.add(showTerrain);

        final JCheckBox showVehicleStatus = new JCheckBox("Show vehicle status");
        showVehicleStatus.setSelected(true);
        formattingGroup.add(showVehicleStatus);

        JPanel pnl = createGroupWithName("Depth Stretch");
        formattingGroup.add(pnl);
        JSlider slider = new JSlider(0, 10);
        pnl.add(slider);
  • 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-28T04:51:27+00:00Added an answer on May 28, 2026 at 4:51 am

    When using a GridLayout all components are made the same size.

    You are adding a JPanel with a TitledBorder and a JSlider to the grid. Therefore the checkboxes will take the same vertical height as that panel.

    You need to use a different layout manager for the panel. Maybe a vertical BoxLayout.

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

Sidebar

Related Questions

I want to reduce image file size of an uploaded image before saving it
I want to reduce image size (in KB) when its size is larger than
My scenario: i want to expect reduce image size (10 KB to 3 KB)
Motivation: I want to reduce the size of the page when is accessed, so
I want reduce the size of my application as much as possible using VisualStudio
I want to reduce a picture size from 600px * 500px to 60px *
I want to reduce the size of the Rating bar, I got some style
I want to Compress an Object in dot net to reduce its size and
I want to reduce the font size of the Command text. How to achieve
I want to reduce the resolution/size of a picture I received via share intent

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.