这段程序我怎么调不出来,总包错
cl007 2004-11-15 05:00:01 程序如下:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class FullScreenTest
{
public static void main(String[] args)
{
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gd = ge.getDefaultScreenDevice();
FullScreenWindow myWindow = new FullScreenWindow();
if ( gd.isFullScreenSupported() )
gd.setFullScreenWindow(myWindow);
else
System.out.println("Unsupported full screen.");
}
}
class FullScreenWindow extends JWindow
{
public FullScreenWindow()
{
this.addMouseListener(new MouseAdapter()
{
public void mousePressed(MouseEvent evt)
{
quit();
}
});
}
public void quit()
{
this.dispose();
}
public void paint(Graphics g)
{
g.setFont(new Font("Arial",Font.BOLD,30));
g.setColor(Color.RED);
g.drawString("这是全屏幕模式",100,100);
}
}
错误如下:
ava.lang.Error: Unresolved compilation problems:
Syntax error, insert ")" to complete VariableInitializer
Syntax error, insert ";" to complete BlockStatements
Syntax error on token "Invalid Character", ; expected
at MyXMLReader.main(MyXMLReader.java:16)
Exception in thread "main"
请帮助!