Why unmark main class creation when working with screen?

2

So far, in all the tutorials I've seen, when we're going to work with a swing screen, we're asked to uncheck the main class creation.

I'd like to know the science behind this, and what happens if I do not do it in such a way.

Edit: It's in the hand, I hope it's visible.

    
asked by anonymous 14.11.2017 / 12:18

1 answer

4

I do not see any problem and doing this, there is nothing wrong. What happens is that a lot of people prefer to create the project from scratch and all control for themselves what happens in it, and if you check this option, the IDE will create a main class based on the name of the project, which is not always the case. expected, and netbeans will eventually define this class as the starting point for project execution.

Furthermore, if you need to change the main class later, you will have to tweak the project properties, which may not be as simple for the beginner.

But in summary, this is not a problem, if you already know which class will be the starting point of your application soon in the creation of the project. If you deselect this option, anyway, netbeans will prompt you to choose a main class (if you have more than one with the main method) when running the project for the first time, and you can later rename this class as well. >     

14.11.2017 / 12:37