0

Cannot load component class

Cannot load component class scroll.ScrollPane from project C:\Users\USER\Document\NetBeansProjects\Coba1-Tubes-Algo2 The Class could not be found. Note the class must be compiled and must be part of the source or dependencies of the project where the target GUI form belongs to. Here is the ScrollPane code https://code.sololearn.com/cWnfWmeLgn2a/?ref=app Here is my jframe https://code.sololearn.com/cXm48W9RM8CB/?ref=app

17th Jun 2023, 3:05 AM
Nasywa
3 ответов
+ 1
This may be a Netbeans bug. Try searching Google for the error message. Obviously we cannot reproduce your issue here on Sololearn even if you share your complete project (which you didn't). Are you using the latest version of Netbeans? Did you change your Java version during the project? You should look around online for some more tips. https://stackoverflow.com/questions/16202054/netbeans-cannot-add-custom-jpanel-in-swing-editor https://www.techyv.com/questions/error-loading-component-jframe-panel-java-netbeans/ https://bz.apache.org/netbeans/show_bug.cgi?id=201747
17th Jun 2023, 4:46 AM
Tibor Santa
Tibor Santa - avatar
+ 1
Tibor Santa But, I tried to click build project, then tried again and it worked It seems the problem is that I didn't build the project first? Do you have to build the project first before making a design? I don't understand
18th Jun 2023, 12:08 AM
Nasywa
+ 1
Nasywa I am not familiar with the intricacies of Netbeans. No matter how it tries to hide the complexity of the development tools from you, you should still be aware what happens behind the scenes. Java is a compiled language. Compilation means that the JDK transforms your Java code to JVM bytecode, which can then be executed by the runtime, the Java Virtual Machine. Your program can have many parts and dependencies on other libraries, and during compilation all these links and related code are explored and added to the bytecode. This is what "Build Project" does, I suppose.
18th Jun 2023, 5:16 AM
Tibor Santa
Tibor Santa - avatar