I am designing a psychology experiment with java applets. I have to make my java applets full screen. What is the best way of doing this and how can I do this.
Since I
Why not just open a new Frame from the applet (either from the "start()" method or, preferably, after the user presses an "open" button) and set it to be maximized?
JFrame frame = new JFrame();
//more initialization code here
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
frame.setSize(dim.width, dim.height);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
Don't forget: The JFrame should be created and opened from the EDT. Applet start() is not guaranteed to be called on that thread, so use SwingUtilities.invokeLater(). Of course, if you opt for the button route, button listener is called on the EDT, so you should be safe.