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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:22:44+00:00 2026-06-02T09:22:44+00:00

I have a GXT 2.x application with a Menubar Item that renders a separate

  • 0

I have a GXT 2.x application with a Menubar Item that renders a separate LayoutContainer.

Here’s the hierarchy
MainUI.java -> MenuBar.java -> ReservationPopUp.java

I have replaced my contents of ReservationPopUp.java with KNOWN working examples of LayoutContainer implementations and they respond to the ESC key and “X” button.

Here’s how the MenuItem renders the ReservationPopUp.java

MenuItem mntmReserve = new MenuItem("Reserve"); 
mntmReserve.addSelectionListener(new SelectionListener<MenuEvent>() {
    public void componentSelected(MenuEvent ce) {
        RootPanel.get().add(new ReservationPopUp());

}

Here’s a slimmed down version of my ReservationPopUp.java

public class ReservationPopUp extends LayoutContainer  {
public ReservationPopUp() {
}

@Override  
  protected void onRender(Element parent, int pos) {  

    super.onRender(parent, pos);
    setSize("1024", "809");
    final Window window = new Window();
    window.setDraggable(false);
    window.setSize(537, 399);  
    window.setPlain(true);  
    window.setModal(true);  
    window.setBlinkModal(true);  
    window.setHeading("Reserve A Server");
    window.setClosable(true);
    window.setOnEsc(true);
    window.setSize("465", "345");
    window.setLayout(new AbsoluteLayout());

    LabelField lblfldUsers = new LabelField("Users");
    window.add(lblfldUsers, new AbsoluteData(43, 218));
    final ComboBox<AsyncUser> userList = new ComboBox<AsyncUser>();

    window.add(userList, new AbsoluteData(81, 218));
    userList.setEmptyText("Select a User...");
    userList.setSize("347px", "24px");

    LabelField labelServers = new LabelField("Servers");
    window.add(labelServers, new AbsoluteData(32, 6));

    final DualListField<AsyncServer> serverList = new DualListField<AsyncServer>();  
        ....
    window.add(serverList, new AbsoluteData(81, 6));
    serverList.setSize("347px", "206px");

    window.addButton(new Button("Cancel", new SelectionListener<ButtonEvent>() {  
          @Override  
          public void componentSelected(ButtonEvent ce) {  
            ReservationPopUp.this.hide();  
          }  
    }));

    window.addButton(new Button("Reserve", new SelectionListener<ButtonEvent>() {  
          @Override  
          public void componentSelected(ButtonEvent ce) {
            if (serverList.getToList().getListView().getItemCount() == 0 ) {
                MessageBox.alert("Invalid Selection","No Server(s) Selected", null);
            } else if ( userList.getValue() == null) {

            } else {
                // DO some stuff
                ReservationPopUp.this.hide();  
            }
          }  
        }));

    window.addWindowListener(new WindowListener() {  
        @Override  
        public void windowHide(WindowEvent we) {
            ReservationPopUp.this.hide();
        }  
      }); 
    window.setFocusWidget(window.getButtonBar().getItem(0));
    add(window);

}

}

  • 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-06-02T09:22:46+00:00Added an answer on June 2, 2026 at 9:22 am

    Window is a popup, it doesn’t need to be (and shouldn’t be) added to anything. Extend the Window class instead of the LayoutContainer, and instead of adding the ReservationPopup to the page, just call Window.show().

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

Sidebar

Related Questions

I have an application that places several Windows within a com.extjs.gxt.desktop.client.Desktop. I need to
I have an OSX App-Bundle for a Java Application that does not use the
I have a PhoneGap application that works fine but occasionally is known to have
I have created an ArrayList in my Application class : package a.b.layout; import java.util.ArrayList;
I have been trying to create a simple application that will let the user
i make a lock screen application.. i have some service that listen to the
I am using the GXT MVC framework in my application. I have a toolbar
I have a pretty standard Java Desktop Application in NetBeans. I recently added a
I have an GWT/GXT application running on UTF-8 encoding.We would like it to support
I have a Java app that displays a list from a database. Inside the

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.