JFrame Resize Issues



My java application currently checks frame resizing and if necessary
resizes the frame in order to keep an aspect ratio. Testing this on
Windows with undecorated frames works perfectly, as the user can resize
the frame to their heart's content, and then once they release the
mouse the frame will resize to an aspect ratio. However, when I set
the JFrames to "Decorated" the user has to battle their resizing with
the automatic aspect ratio resizer.

My application needs to be able to run in all sorts of window managers
and behave the same way, so I'm wondering if I'm missing something in
how to control the resizing behavior.

My code for checking resize is simply:

public void componentResized( ComponentEvent evt ) {
resizeVideo();
}

Any help you could give would be greatly appreciated, Thanks.

.



Relevant Pages

  • Re: GetClientRect() AND ShowWindow(SW_SHOWMAXIMIZED) in SDI app.
    ... But maximizing the app only maximizes the main window. ... It maximizes the view frame, ... OnSize handler to your frame and resize the dialog as well, then the code above will only ... MVP Tips:http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)
  • Re: Displaying gruff graphs
    ... The frame is a about 1/4 of what it needs to be, and so I have to resize ... Perhaps I need to make the frame where the graph is displayed a bit ... Gruff Graph constructor a size as a string. ...
    (comp.lang.ruby)
  • Re: Re-Layout
    ... Is there room for it to resize? ... you still see the frame with the "details..." ... I can only see it when manually resizing the frame by resizing ... What value have you given the XmNresizePolicy of the parent form? ...
    (comp.windows.x)
  • Re: Displaying gruff graphs
    ... WxRuby runs under MS Windows, ... Perhaps I need to make the frame where the graph is displayed a bit ... it being resized, or dynamically resize the graph image as the frame is ...
    (comp.lang.ruby)
  • Re: Displaying gruff graphs
    ... Perhaps I need to make the frame where the graph is displayed a bit larger. ... You can either constrain the frame to be a particular size, and prevent it being resized, or dynamically resize the graph image as the frame is resized by the user's use of the mouse. ... you can pass the Gruff Graph constructor a size as a string. ...
    (comp.lang.ruby)