How to install a custom Swing component in NetBeans palette

Con el mazo dando

In the previous post I told you about how to code and build a Swing component for Java. Today I’m going to tell you how to install a custom Swing Component in the NetBeans Palette.

2

Creating a BeanInfo class

Now it’s time to prepare the component to be added in NetBeans Palette. First of all you need to prepare 4 images in order to locate your component in NetBeans Palette.

  • As NetBeans recommend they should be in a format with transparent background, either GIF or PNG.
  • Two of them with a 16×16 pixels size and the others 32×32 pixels size.
  • One 16×16 image and other 32×32 image must be in black and white. The others in color.

1

Next, create a new package in the project called

org.japo.java.resources.images

Right click on project name and select New Package.

1

Drag and drop earlier…

Ver la entrada original 847 palabras más

Anuncios

Un pensamiento en “How to install a custom Swing component in NetBeans palette”

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s