Eclipse : how exit full screen

I was running this code ( 3D from scratch youtube tutorial) ):


import java.awt.Toolkit;

import javax.swing.JFrame;

public class DDDTutorial extends JFrame
{
	static JFrame F = new DDDTutorial();

	public DDDTutorial()
	{
		setUndecorated(true);
		setSize(Toolkit.getDefaultToolkit().getScreenSize());
		setVisible(true);

	}

	public static void main(String[] args)
	{

	}

}


and i don’t know how to exit the full screen.
ctrl + esc lets me close the window ( i’m on windows7) but eclipse says that
the application is still running.
Googling here and there i didn’t find a “solution”.
Thx !!!

Sincerely your :
a dumb guy

In the console there is a red terminate button.

Why ctrl+esc? Never heard of alt+f4? :smiley:

And you can terminate with red button above the console
and the task manager.

This code has a couple things wrong with it. Why isn’t there any code in the main method? Why are you extending JFrame instead of using the JFrame F (which should start with a lowercase name, by the way)?

You also might consider calling the setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) function of whichever JFrame you actually show.

thx a lot !
(now i feel even dumber : some pity for me , thx ) :slight_smile:

To KevinWorkman :
like i wrote , the code isn’t mine , it’s from a youtube tutorial :

I don’t have the skills to judge if it’s a good one or not …

Fair enough. I will say that if that’s the code from the tutorial, you might want to consider using a different tutorial.

Judging by that code and the episode names, I’m gonna say it’s bad.
Most youtube tutorials are bad.

He also has the code on github but uses folders instead commits/tags to actually do the versioning…

Watching videos about how to code is as pointless as reading about how to dance.

[quote]Watching videos about how to code is as pointless as reading about how to dance.
[/quote]
This made my day haha :’)

But it is good to watch videos how to code to compare with your own.