import java.awt.Color;
import java.awt.DisplayMode;
import java.awt.Font;
import javax.swing.JFrame;
class GameStation extends JFrame{
public static void main(String [] args){
DisplayMode dm=new DisplayMode(800, 600, 16, DisplayMode.REFRESH_RATE_UNKNOWN);
GameStation game=new GameStation();
game.run(dm);
}
public void run(DisplayMode dm) {
setBackground(Color.PINK);
setForeground(Color.WHITE);
setFont(new Font("Arial", Font.PLAIN, 24));
Ex7 s=new Ex7();
try{
s.setFullScreen(dm, this);
try{
Thread.sleep(5000);
}catch(Exception ez){}
}
finally{
s.restoreScreen();
}
}
}
import java.awt.DisplayMode;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Window;
import javax.swing.JFrame;
class Ex7{
private GraphicsDevice dv;
Ex7(){
GraphicsEnvironment vc=GraphicsEnvironment.getLocalGraphicsEnvironment();
dv=vc.getDefaultScreenDevice();
}
public void setFullScreen(DisplayMode dm, JFrame j){
j.setUndecorated(true);
j.setResizable(false);
dv.setFullScreenWindow(j);
if(dv!=null && dv.isFullScreenSupported()){
try{
dv.setDisplayMode(dm);
}catch(Exception ex){}
}
}
public Window getFullScreenWindow(){
return dv.getFullScreenWindow();
}
public void restoreScreen(){
Window w= dv.getFullScreenWindow();
if(w!=null){
w.dispose();
}
dv.setDisplayMode(null);
}
}
why does it tell me that there is no main?