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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:33:16+00:00 2026-05-19T03:33:16+00:00

I have an application that places several Windows within a com.extjs.gxt.desktop.client.Desktop. I need to

  • 0

I have an application that places several Windows within a com.extjs.gxt.desktop.client.Desktop. I need to attach a listener which records the size of each window when it is resized. I’m seeing two issues:

  1. While Move Events are fired when the window is resized, they appear to be fired BEFORE the new size is actually applied to the window, so I cannot request the new size from the window directly.

  2. The WindowEvent I receive in my Listener contains a size of 0x0, regardless of the actual size of the window.

Is there something I’m missing here?

Here’s my attach code:

protected void addWindowListeners( Window w,
        String uid, WindowData windowData )
{
    WindowChangeListener l = new WindowChangeListener( uid, windowData );
    w.addWindowListener( l );
    // Add this again since the default WindowListener doesn't support the Move event.
    w.addListener( Events.Move, l );
}

And the listener class:

protected class WindowChangeListener 
    extends WindowListener
    implements Listener<WindowEvent>
{

    @Override
    public void windowHide( WindowEvent we )
    {
        updateWindowData( we );
    }

    @Override
    public void windowShow( WindowEvent we )
    {
        updateWindowData( we );
    }

    public void windowMove( WindowEvent we )
    {
        updateWindowData( we );
    }

    protected void updateWindowData( WindowEvent we )
    {
        // Here's the part that needs to get notified with the new size.
    }

    @Override
    public void handleEvent( WindowEvent we )
    {
        if( we.getType() == Events.Move )
            windowMove( we );
        else
            super.handleEvent( we );
    }
}

Thanks for any insight anyone has. I feel like I’ve got to be missing something simple.

  • 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-19T03:33:17+00:00Added an answer on May 19, 2026 at 3:33 am

    I actually was given the magic on the Sencha forums: http://www.sencha.com/forum/showthread.php?121249-What-s-the-right-way-to-be-notified-when-a-Window-is-resized&p=561340&posted=1#post561340

    Turns out that I can listen for a resize event on Window:

    protected void addWindowListeners( Window w,
            String uid, WindowData windowData )
    {
        w.addListener( Events.Resize, new Listener<WindowEvent>() {
    
            @Override
            public void handleEvent( WindowEvent we )
            {
                System.out.println( "Resize event: " + we );
                System.out.println( "   Size in event: " + we.getWidth() + "x" + we.getHeight() );
                System.out.println( "   Size of window: " + we.getWindow().getSize() );
            }
    
        });
    }
    
    • 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 uses AJAX liberally. I have several places where a
We have an application that uses several out of process COM objects for various
I have a small wxWidget application that uses image files at several places. I
I have an application that uses disabled JTextFields in several places which are intended
I have an application that uses MVVM. I have several items on the main
OK, I am building an application that will be using ASIHttpRequest in several places
In a typical MVC application we have validation that occurs in many different places.
I have an application that has a concept of a Venue , a place
I have application that makes different queries with different results so the caching in
I have application that is connecting to the DB and if I enter incorrect

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.