apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.62k stars 840 forks source link

Invalid Component #7612

Closed xPamii closed 1 month ago

xPamii commented 1 month ago

Apache NetBeans version

Apache NetBeans 22

What happened

Screenshot 2024-07-25 225018

Language / Project Type / NetBeans Component

Java ant project using Swing Components

How to reproduce

Screenshot 2024-07-25 003435

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows

JDK

11

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

No

matthiasblaesing commented 1 month ago

The error message tells you, that might be the reason why the class for the component can't be loaded, your log screenshot shows, that you have errors in your code.

xPamii commented 1 month ago

The error message tells you that that might be the reason why the class for the component can't be loaded; your log screenshot shows that you have errors in your code.

How can I solve this error? I have tried many times to fix this.I removed the invalid component, added new components to this, and tried again.But it still didn't work out.

These are the custom components that I have created. Screenshot 2024-07-28 135943 Screenshot 2024-07-28 135919

matthiasblaesing commented 1 month ago

You need to add the dependencies, that provide the classes you reference to your project. How that is done depends on you project type (ant, maven, gradle) and the dependency.

This place is not a programming forum. It is the issue tracker of the NetBeans project, i.e. issues in the NetBeans IDE, Platform or Code. Your question is a general java programming question and does not belong here. You can try if anyone will help in the discuss forum or for example stack overflow.

In general for these kind of questions: Prepare a minimal runnable sample, that can be run by people trying to help you. In many cases the process creating the that sample is enough to show where the core problem lies.

xPamii commented 1 month ago

@matthiasblaesing Okay, thank you so much.