Skip to main content

problem with resizing of singleframeapplication

2 replies [Last post]
nobischu
Offline
Joined: 2009-12-02
Points: 0

Hello,
i went through 'Creating a Custom Java Desktop Application'.
Just after the wizard has built the application, i came upon a strange problem:
- i run the 'CustomerRecords' application, maximize the window and close it
- i run the application again. It comes up in the maximized state. I close it again without resizing.
- from now on i cannot resize the application anymore. It stays maximized.
To fix it, i did a lot of googling and finally ran across a similar problem(http://www.velocityreviews.com/forums/t595757-resize-external-frame-in-s..., thanks a lot)
I added a 'Resize' - Button to the application, and for the actionPerformed method i entered:
Frame mf = getMyFrame();
mf.setSize(new Dimension(400,400));
Once the Resize button has been pressed, Resizing functions as expected again.

This look to me like a bug, or am i missing some option?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nobischu
Offline
Joined: 2009-12-02
Points: 0

It's not a bug, just confusing (for me anyway). In the situation described, clicking on the Resize-icon doesn't change the window size. But you can move the window around in the usual way and then resize it.
Thanks.

nobischu
Offline
Joined: 2009-12-02
Points: 0

Sorry,
i forgot to show method getMyFrame:

in CustomerRecordsView i have following method:
public Frame getMyFrame(){
return this.getFrame();
}