How to work visually with a class that extends a Component in NetBeans?

I have a class which extends JPanel. I need a way to work with that visually just like a JPanel in NetBeans. I mean NetBeans gives me Design tab for that. What should I do?

EDIT: while you want to add new file to your project, you can see JPanel Form option, what should I do so that I have my class which extends a component(e.g. JPanel) listed there, so that I can choose that and work with that visually?


If you just want to create a standalone JPanel Form: navigate to a package in Projects Explorer, right-click it and select New > JPanel Form. If it is not present in the popup, select New > Other... and navigate to Swing GUI Forms category in the dialog that appears. It should be listed among File Types.

You cannot visually design a JPanel which was not created this way. It needs to be a JPanel Form in order for Netbeans to recognize it as an entity that can be visually designed. You can however treat it as an atomic component and add it to Netbeans by following the steps in this answer.

If you're talking about adding your new class to the NetBeans GUI builder, there is a guide on how to do this on the NetBeans wiki.

Need Your Help

Placing JavaScript functions inside of an object of a variable

javascript function variables object

I see this quite often, but I'm not sure as to the purpose of it or what the advantages would be (if any).

How do I sorting an array using this way only …?

java arrays sorting

I want to sort an (one dimension array) using the following way only.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.