A good answer might be:
| |
The |
public class percentFat extends Frame implements ActionListener
{
. . . . . .
public static void main ( String[] args )
{
percentFat fatApp = new percentFat() ;
WindowQuitter wquit = new WindowQuitter();
fatApp.addWindowListener( wquit );
fatApp.setSize( 280, 200 );
fatApp.setResizable( false ); // user can't resize the frame
fatApp.setVisible( true );
}
. . . . . . .
}
|
Sometimes you want the user to be able to resize the frame, but certain components must remain together. For example, labels must remain next to the component that they describe.
Wouldn't it be nice to have a LabeledButton component
that consists of a Label and a Button that are always displayed
next to each other?