1.)
________________________________________
import java.awt.*;
import java.awt.event.*;class xxt extends Frame
{
xxt()
{
setBackground(Color.pink);
setVisible(true);
pack();
}

public Dimension getPreferredSize()
{
return new Dimension(100,200); } public static void main(String in[])
{
xxt xx=new xxt();
}

}
________________________________________2.)
________________________________________import java.awt.*;
import java.awt.event.*;

public class xt
{
public static void main(String in[])
{
ff f=new ff();
}
}
class ff extends Frame
{
ff()
{
setBackground(Color.pink);
setVisible(true);
pack();
} public Dimension getPerferredSize()
{
return new Dimension(100,200);

}
}________________________________________
第2个错在哪里?