I am creating a GUI on Eclipse using Java code. Everything in my code is fine except for some reason the java swing package is not being recognized by my IDE. I have used the correct imports and I am using JDK-17 which should include the swing package by default and yet the issue persists. I get the following error when I run my code: Exception in thread "main" java.lang.Error: Unresolved compilation problem: SwingUtilities cannot be resolved. It also mentions that the package in not accessible.
I'd appreciate any kind of help with this.
Here is my code Java Code. All of the imports are not accessible for some reason.