Hi.
There is a problem with some components (Component) when you want to
change it size.
You must overwrite the method getPrefferedSize, and it works.
Or before caliing show method you write the pack method.
Karthik Vishwanath wrote:
> Hi all,
> when i create an application as :
> public class Myapp extends Frame
> {
> public Myapp()
> {
> super("MyApp");
> setSize(100,100);
pack();
>
> show();
>
> }
public Dimension getPreferredSize() {
return new Dimension(100,100);
}
>
> }
>
>
> and run it, the setSize does not resize the frame.
>
> Can anyone tell me what must i do inorder to resize a frame?
>
> -Karthik.
>
> +-----------------------------------------------------------------+
> | Karthik Vishwanath, Graduate trainee, |
> | National Centre for Biological Sciences, TIFR Bangalore, India. |
> | Ph: (080)344-4062/5615/3035 | Ext:315. |
> | mail to: [EMAIL PROTECTED] |
> +-----------------------------------------------------------------+
> Microsoft isn't the answer.
> Microsoft is the question and the answer is NO.