Netbeans: Add custom classes to the palette

Hi,
I have a created number of custom classes, such class add_button extends JButton, etc...
How I can add them to the palette for future visual use.
Thanks
Omer-PitouAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Omer-PitouAuthor Commented:
Thank you very much
0
CEHJCommented:
:)
0
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Omer-PitouAuthor Commented:
This helped and I managed to add it .
I have a question: I want to know what is the right way of creating custom.
1. Previously, I had one class (one .java file) as follows

public class CustomClasses {

    public static class LabelC extends JLabel {
        public LabelC() {
            setText("HelloWord");
        }
    }
    
    public static class TextFieldC extends JTextField {
        public TextFieldC() {
        
        }        
    }
    
    public static class TextFieldDisableC extends JTextField {
        public TextFieldDisableC() {
            enable(false);
        }       
    }
    
    public static class TableC extends JTable {
        public TableC() {
        
        }    
    }
}

Open in new window

With this one, From the palette, I can only see CustomClasses, NOT the individual custom classes.
2. I tried to create an individual .java file for the custom class, and I can see it in the palette.
public class CustomLabel extends JLabel {
    public CustomLabel() {
            setText("HelloWord");
        }    
}  

Open in new window


My question is: Should I create individual .java file per custom class. If I want to keep them in one .java file, how can I make them visible in the palette.

Regards.
0
CEHJCommented:
Should I create individual .java file per custom class.
Most definitely
0
Omer-PitouAuthor Commented:
Thanks for your prompt reply
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.