In VS Code, you only need to use a shortcut to run your code. That shortcut is Ctrl + Alt + N . There are a few more ways to run code. Pressing F1 and then choosing “Run Code” also works.
Read moreCan VS Code run Java GUI?
Working with GUI applications in VS Code. You can develop Java GUI applications in Visual Studio Code easily . To achieve that, you need to install the Extension Pack for Java, which includes all the required extensions to develop Java GUI applications.
Read more