Hi,

I have problem with resizing a Frame window, please take a look on the code below (I tried to make it as simple as possible to show my concerns, it's not pretty).

public class BasicTest extends Application.Adapter {
  static Frame frame;

public void startup(Display display, Map<String, String> properties) throws Exception {
    frame = new Frame();
    frame.open(display);
  }

  public static void main(String[] args) throws Exception {
    DesktopApplicationContext.main(BasicTest.class, new String[0]);

Thread.sleep(2000); //to have a short while to take a look on the displayed window

    frame.setHeight(100);
  }
}

When application starts we can see a main window and a very small internal window (Frame) in it. After two seconds internal frame changes its height to 100, I do it using frame.setHeight(100). But when you move mouse over the main window Frame changes back it's height to the one before we changed it to 100. Can you tell me what's wrong here?

What's more interesting, when I use setPreferredHeight instead the Frame's height is not changed until mouse is moved, which is of course not good too.

Regards,
Rafal

Reply via email to