Re: How to resize the content of a frame when te frame is resized.
Tuesday, June 4, 2002 06:06 AM
I have made something similar in swing maybe you can use it.
The basic idea is to redraw the components into an appropriate size
In order to know when the frame has been resized you use the componentListener
public void componentResized(ComponentEvent ce)
WIDTH = getWidth();
HEIGHT = getHeight();
You just need to define the resizeWindow method. Note also that you may have to add the componentListener to a specific object instead of just this.
There is a Font class with which you can control the font sizes of the text in your text areas, labels and the like. Just instansiate a Font object with the parameters that you want and use that Font object in all your components. The online java documentation shows you how to do this as I don't remember... I do remember that it's no biggie though.
Hope it helps