Adding component to palette on NetBeans IDE

Blueberry picture Blueberry · Jun 26, 2012 · Viewed 18.9k times · Source

I am looking at the NetBeans Platform using NetBeans IDE to create a Swing UI application.

I am trying to get a jCalendar component into the palette and onto my window. The problem is that if I attempt to drag it onto the form I get an error saying it is not included as a dependency on my module.

enter image description here

So I thought no problem, I will add it, however, even though it is in the palette and getting it there involves creating it as a library, when I attempt to go to Add Dependency under project properties / Libraries, it is not in the list of Libraries to choose from!

enter image description here

The project is a NetBeans Module, and when I create this in a regular java project, I can find it in the list. I can also see it in the Library Manager, but not in the properties of a NetBeans Module.

enter image description here

Any ideas why I can not get this library added here?

P.S. I was trying to use this tutorial to get this picker onto my palette. I assume the difference is, his project isn't a NetBeans Platform one? http://greenxgene.blogspot.co.uk/2012/04/how-to-use-jcalendar-date-picker-in.html

Answer

Tim Sparg picture Tim Sparg · Jun 26, 2012

I think the root of the problem is that you need to create a "Library Wrapper Module"

This wraps your jCalendar jar and creates a NetBeans module out of it.

New Project Dialog

After that you should be able to add the item to your form.