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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:32:07+00:00 2026-05-12T14:32:07+00:00

In .net there is a control called anchoring that is used to resize controls

  • 0

In .net there is a control called anchoring that is used to resize controls dynamically with the form. When a control is anchored to a form and the form is resized, the control maintains the distance between the control and the anchor positions.

My question is that is there any controls in java that does same functionality as anchoring in .net.
As for an example i have selected a textfield and put it on the panel and resized it properly.
Now when i change the size of window(JFrame) or maximize the window the textfield will not maintain the same distance as it was previously.
I have been using netbeans and i havent found any properties in pallete manager that answers my question.
Please explain me with an example or some links.

  • 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-12T14:32:07+00:00Added an answer on May 12, 2026 at 2:32 pm

    Java Swing uses Layout Managers to manage the size and postion of visual components.
    This is the official java tutorial on how to use this Layout managers:

    http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html

    And there is a brief description of the most common layout managers

    FlowLayout (default): it disposes the components left to right and up to down.

    BorderLayout: it divides the container in NORTH, SOUTH, WEST, EAST center CENTER. Only one component by position. Components on border expands and the center component uses the space avaiable

    GridLayout: you initialice the manager indicating how many rows and cols the grid is going to have. Each cell has same size and you start adding component on the top left cell.

    GridBagLayout: the MOST fine grained layout manager, you can do anything with this, but is a bit complicated, see the java documentation for it.

    NullLayout (when you nullify the container’s layout manayer): no layout manager, components uses the location and size properties to show on components.

    And of course, containers inside in other containers can use a different layout manager than their parent. Combining layout managers is a difficult art to learn.

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

Sidebar

Related Questions

Is there a .NET Control Similar to the Access 2007 Split Form? Or has
Is there a way in .net to refer to a control generically (so that
Got some C# forms/controls that can be called up either from a C# control
ASP.NET has a reorderlist control http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/ReorderList/ReorderList.aspx Is there anything equivalent (control, source code, ...)
Is there a way to control how .Net sets the Name and ID property
Is there an Open Source Free Graph Control for Windows Forms .NET 2.0?
Is there a major difference between the Multiview control in ASP.NET 2.0 and the
Is there an easy way to add nodes to a WinForms .NET TreeView control
is there any way to get the ASP.NET validation summary control to just display
Does the asp.net ReportViewer control work with LinqDataSource? If so are there any examples

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.