There is a task to create an applet-keyboard.

Created a project in NetBeans IDE 8.1 like this: Create ProjectJavaJava ApplicationProject Name (AppletKeybboard)

After creating source packages in packages → otherSwing GUI formsJApplet form . Keyboard file name. The problem arose during compilation. Writes "can not find the main class."

    1 answer 1

    Applets are not a Java application, but a library. Create a Java Class Library project. The library does not require a main class.

    Do not forget about primary sources

    If there is absolutely no way without the main method, then simply add the static void main(String[] args) method to any of your classes, or create a new class

     public class MainClass { public static void main(String[] args) {} } 

    It will launch nothing, but the compilation error should remove.

    • doesn't help, right away he did - Muscled Boy
    • and the fact that the question is the second attempt (I found this method in the internet) - Muscled Boy
    • Updated the answer ... - Sergey Mitrofanov
    • Does not help. In general, it is necessary to write an applet keyboard using molds. I did similar tasks before and there were no similar problems - Muscled Boy