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个错在哪里?
________________________________________
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个错在哪里?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货