4. IDE Integration

This chapter shows how the JDatePicker suite components can be integrated within various IDEs. One thing that must remembered is that both jdatepicker.jar and jdatepicker-beans.jar must be registered. The purpose of every jar from the distribution is explained here.

4.1. NetBeans

This section shows how to integrate the JDatePicker suite components within NetBeans 5.0.

Create a library

  1. Select Tools|Library Manager to open the Library Manager dialog.

  2. Click the New Library... button under the left pane to open the New Library dialog:

    1. Enter a name (JDatePicker) for the new library in the Library Name field.

    2. Click OK to close the dialog.

  3. Click the Add JAR/Folder... button to open the Browse JAR/Folder dialog:

    1. Select the jdatepicker.jar and jdatepicker-beans.jar files from the directory where you keep them.

    2. Click Add JAR/Folder to close the dialog.

  4. Click OK to close the Library Manager dialog.

Register components in the palette

  1. Select Tools|Palette Manager|Swing/AWT Components to open the Palette Manager dialog.

  2. Click the New Category... button to open the New Palette Category dialog:

    1. Enter a name (JDatePicker) for the new palette category. This new category will contain the JDatePicker suite components.

    2. Click OK to close the dialog.

  3. Click the Add from Library... button to open the Install Components to Palette wizard dialog:

    1. Click the name of the library that contains the components (JDatePicker) from the list. Click Next.

    2. Select all the available components. Click Next.

    3. Click the name of the palette category (JDatePicker) where the components should be installed.

    4. Click Finish to close the dialog.

  4. Click Close to close the Palette Manager dialog.

    You should now see your category in the component palette. When you expand it, icons for the beans you've added will appear. When you are in Design mode you will be able to drop the components on the container you're using.

4.2. Borland JBuilder

The JBuilder documentation contains full information on how to use JavaBeans. This section provides an overview on how to integrate the JDatePicker suite components within JBuilder 2005.

Create a library

  1. Select Tools|Configure|Libraries.

  2. Click the New button under the left pane to open the New Library wizard.

  3. Enter a name (JDatePicker) for the new library in the Name field.

  4. Click the Add button and select the jdatepicker.jar and jdatepicker-beans.jar files from the directory where you keep them.

  5. Click OK.

  6. Click OK to close the New Library wizard.

  7. Click OK to close the Configure Libraries dialog box.

Register components in the palette

  1. Select Tools|Configure|Palette.

  2. Click the Add button under the left pane to open the Add Page dialog.

  3. Enter a name (JDatePicker) and a description for the new palette page.

  4. Click OK to close the Add Page dialog.

  5. Click on this new page name and select the Add Components tab of the Palette Properties dialog.

  6. Click the Select Library button and browse to where you installed your JDatePicker library.

  7. Click OK.

  8. Click the Add from Selected Library button to view Results dialog, which contains the list of Beans in your selected library.

  9. Click OK to close the Results dialog.

  10. Click OK to close the Palette Properties dialog.

You should now see your page name in the component palette. When you click on it, icons for the Beans you added will appear. When you are in JBuilder's Design mode you will be able to drop the components into the frame.

For more information, see the JBuilder help.

4.3. IntelliJ IDEA

The IDEA documentation gives all the details on how to integrate custom beans from third-party libraries. The documentation is really good, so there is no need to duplicate it here.