I have made a java project in netbeans, I have recently seen that there is a UI difference in 2 cases. 1. if i right-click and run the main project or if i press Shift</kbd> + F6</kbd>. If i do Shift</kbd> + F6</kbd>, a nice user interface (see the buttons), comes up: <img src="https://i.stack.imgur.com/hmx5g.jpg" alt="Shift+F6">
If i right click on my project and run it; the button style looks ancient: <img src="https://i.stack.imgur.com/fRa7B.jpg" alt="Right Click and Run">
My question, Why? and 2nd thing; what i want is that if i transfer my program to other systems via JAR files; the nice UI should come. How to do that?
When we run the project by clicking "Run", the project is started with the main class file, i.e., with class having main entry point. But when we press Shift</kbd> + F6</kbd>, the file currently open in the editor-window is run using its own main function. So, may be you are doing the same. Probably you have set the Look & Feel of the project in a file other than the file defining your GUI and you are just launching your GUI Frame by pressing Shift</kbd> + F6</kbd>. Thus starting the frame without L&F set.Just clean and build the project and see the output of the final .jar file.