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

The Archive Base Latest Questions

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

I have placed many widgets in the absolute panel and added the absolute panel

  • 0

I have placed many widgets in the absolute panel and added the absolute panel to the RootLayoutPanel. But on Browser resize, the contents are not resizing… am i missing something???

package panelDemo.client;

import com.google.gwt.user.client.ui.AbsolutePanel;

public class AbsolutePanelDemo extends Composite{
  public AbsolutePanelDemo() {

    AbsolutePanel absolutePanel = new AbsolutePanel();
    initWidget(absolutePanel);
    absolutePanel.setSize("1024px", "768px");

    TextBox txtbox = new TextBox();
    txtbox.setReadOnly(true);
    txtbox.setText("Enter Something");
    absolutePanel.add(txtbox);

    Label lblIsValid = new Label("Label:");
    absolutePanel.add(lblIsValid, 192, 10);

    CheckBox chckbxIsValid = new CheckBox("label");
    absolutePanel.add(chckbxIsValid, 244, 10);
    chckbxIsValid.setSize("76px", "19px");

    Label lblAssignedUser = new Label("Assigned User:");
    absolutePanel.add(lblAssignedUser, 362, 13);

    TextBox user = new TextBox();
    user.setReadOnly(true);
    user.setText("xyz");
    absolutePanel.add(user, 457, 1);

    Button btnClickMeText = new Button("Click Me Text");
    absolutePanel.add(btnClickMeText, 646, 1);
    btnClickMeText.setSize("100px", "28px");

    Label lblAlert = new Label("Alert:");
    absolutePanel.add(lblAlert, 113, 48);

    TextBox txtbxAlert = new TextBox();
    txtbxAlert.setText("Alert");
    absolutePanel.add(txtbxAlert, 161, 36);
    txtbxAlert.setSize("140px", "16px");

    Label lblExpires = new Label("Expires:");
    absolutePanel.add(lblExpires, 99, 93);

    DateBox dateBox = new DateBox();
    absolutePanel.add(dateBox, 161, 81);

    Label lblPriority = new Label("Priority:");
    absolutePanel.add(lblPriority, 99, 133);

    ListBox comboBox = new ListBox();
    absolutePanel.add(comboBox, 161, 127);
    comboBox.setSize("150px", "22px");

    Label lblGender = new Label("Gender:");
    absolutePanel.add(lblGender, 405, 48);

    RadioButton rdbtnMale = new RadioButton("new name", "Male");
    absolutePanel.add(rdbtnMale, 457, 45);

    RadioButton rdbtnFemale = new RadioButton("new name", "Female");
    absolutePanel.add(rdbtnFemale, 457, 70);

    Label lblDescription = new Label("Description:");
    absolutePanel.add(lblDescription, 386, 114);

    TextArea txtrThisIsSome = new TextArea();
    txtrThisIsSome.setText("This is some description");
    absolutePanel.add(txtrThisIsSome, 457, 118);
    txtrThisIsSome.setSize("149px", "88px");

    Label lblContact = new Label("Contact:");
    absolutePanel.add(lblContact, 95, 171);

    IntegerBox integerBox = new IntegerBox();
    integerBox.setText("91");
    integerBox.setVisibleLength(2);
    absolutePanel.add(integerBox, 161, 165);

    IntegerBox integerBox_1 = new IntegerBox();
    integerBox_1.setVisibleLength(10);
    absolutePanel.add(integerBox_1, 203, 165);

    FileUpload fileUpload = new FileUpload();
    fileUpload.setTitle("Upload Something");
    absolutePanel.add(fileUpload, 161, 194);

    Label lblUpload = new Label("Upload:");
    absolutePanel.add(lblUpload, 99, 200);

    Button btnSave = new Button("Save");
    absolutePanel.add(btnSave, 290, 255);
    btnSave.setSize("100px", "28px");

    Button btnCancel = new Button("Cancel");
    absolutePanel.add(btnCancel, 457, 255);
    btnCancel.setSize("100px", "28px");

    HTMLPanel panel = new HTMLPanel("This is just an example to show that in absolute panel resize wont work. This is evident if you resize your browser window.");
    absolutePanel.add(panel, 10, 319);
  }
}

And my onModuleLoad function looks like this

public void onModuleLoad() {

    RootLayoutPanel.get().add(new AbsolutePanelDemo());

}
  • 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:15:35+00:00Added an answer on May 28, 2026 at 4:15 am

    Not all widgets can use RootLayoutPanel’s (and the other *LayoutPanel’s) automatic resizing stuff – only widgets that implement RequiresResize will be notified when their parent has changed size, and they must update.

    CellBrowser and DataGrid are two widgets in GWT that support this, all of the containers that end in LayoutPanel support it as well. Two others are HeaderPanel and ResizeComposite. You can create your own by implementing the interface and either passing the call along to another widget that can handle a new size, or by building your own resize code for the behavior you need.

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

Sidebar

Related Questions

I have a form that is very slow because there are many controls placed
I have defined a style for Linear layout but the layout is not visible
I have read many documentation on supporting multiple screen sizes but still confused. I
I placed many textboxes on my page and all have the same class .myClass
i have a main control in wpf. and many controls placed in main control.
In many places in our code we have collections of objects, from which we
I have read in many places that network connection in a j2me app should
In many places in our application we have code like this: using(RAPI rapi =
I have code similar to the following in many places: var dbParams = db.ReadParams(memberID,
I have the code below in my test code in many places: // //

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.