<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7994432621199220223</id><updated>2024-10-24T04:15:11.135-07:00</updated><category term="JPComponents"/><category term="java"/><category term="swing"/><category term="JPCalendar"/><category term="JPBackgroundPanel"/><category term="JPCalendar Updates"/><category term="JPSuggestComboBox"/><category term="JPSuggestTextField"/><title type='text'>JPComponents</title><subtitle type='html'>Componentes ricos para Java/Swing, programación en java, tutoriales y más.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://pablojramirez.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7994432621199220223/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://pablojramirez.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Pablo</name><uri>http://www.blogger.com/profile/00894848529887583123</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxV7Jx3AMiFxX8fkdXjaNsRn0PInIAKmYUmWQ3KslIQDiUA1V8cySmfNj9rayscpjC4AU4NCum682qGXiiSq6zfhFQGjvVwf-aSyS_m1CzWM1XuMElbT-0lhjVFoOtYA/s220/IMG_20110119_085434.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7994432621199220223.post-4494064964539006758</id><published>2011-01-25T20:05:00.000-08:00</published><updated>2011-01-25T20:15:11.867-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JPComponents"/><category scheme="http://www.blogger.com/atom/ns#" term="JPSuggestComboBox"/><category scheme="http://www.blogger.com/atom/ns#" term="JPSuggestTextField"/><title type='text'>Dos nuevos componentes!</title><content type='html'>Bueno, siguiendo con el desarrollo de JPComponents, he creado dos nuevos componentes, ambos realizan la misma funcionalidad, es una especie de suggest, que a medida que el usuario va tipeando caracteres los componentes van sugiriendo palabras que están guardadas en el diccionario. Es un inicio, la idea es que varios componentes que permiten ingresar texto tengan esta funcionalidad.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Comenzaremos hablando del diccionario:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
La clase&amp;nbsp;&lt;b&gt; &lt;/b&gt;com.jpcomponents.base.SuggestBase sirve de diccionario para los componentes que implementan la funcionalidad suggest.&lt;br /&gt;
&lt;br /&gt;
Básicamente guarda los strings dentro de listas, clasificadas por la primera letra del string, es como un diccionario común y corriente, donde la clave es la primera letra del string.&lt;br /&gt;
&lt;br /&gt;
Por ahora no es necesario saber qué hace exactamente, ya que nos centraremos en los componentes JPSuggestComboBox y JPSuggestTextField.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Los Componentes:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Ambos componentes tienen las siguientes propiedades, accesibles mediante getters y setters:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;minLengthToSearch: &lt;/b&gt;es el tamaño mínimo del string que se ingresa para comenzar a sugerir resultados&lt;/li&gt;
&lt;li&gt;&lt;b&gt;maxSuggestLength&lt;/b&gt;: es el máximo de resultados que muestra el suggest, ignorando el resto de los resultados, aunque coincidan con el patrón, esto es útil cuando existen muchos resultados para un patrón determinado.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;suggestBase: &lt;/b&gt;obtiene o setea el diccionario sobre el cual el componente busca resultados&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Metodos:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Estos componentes tienen los siguientes métodos:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;void addString(String value):&amp;nbsp; &lt;/b&gt;&lt;/span&gt;Agrega un string al diccionario&lt;/li&gt;
&lt;li&gt;&lt;b&gt;void addString(List&amp;lt;String&amp;gt; values):&lt;/b&gt; Agrega la coleccion al diccionario&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Eventos:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Ambos componentes lanzan dos eventos, uno es lanzado cuando el diccionario no contiene la clave que se está buscando, esto es útil por ejemplo cuando se traen los datos desde la base de datos, si no existe la clave, entonces podemos ir a buscar los resultados a la base de datos y agregarlos al diccionario con los métodos que ya hemos hablado.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;El otro es lanzado cuando, a pesar de existir la clave que coincide con el patrón, no se han encontrado resultados que coincidan con el patrón, por ejemplo, tipeamos &quot;jpcomponents&quot;, el diccionario contiene la clave &quot;j&quot;, pero no contiene el valor &quot;jpcomponents&quot;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Como Usarlos?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Daré un ejemplo con el JPSugestComboBox:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Para instanciarlos,&lt;/b&gt; simplemente basta con la siguiente sentencia:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;JPSuggestComboBox jpsugg= new JPSuggestComboBox();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;si queremos agregar datos al suggest,&lt;/b&gt; suponemos que tenemos una lista de strings llamada datos, que queremos agregar al diccionario&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;jpsugg.addString(datos);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;para escuchar los eventos&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;jpsugg.addSuggestListener(new ISuggestListener() {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void onNotKeyIsFind(String key) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //hacer algo si no se encontró la clave&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void onNotDataIsFind(String query) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //hacer algo si no se encontraron resultados&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Descargas:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Puedes descargar la nueva versión desde&lt;b&gt; &lt;a href=&quot;http://code.google.com/p/jpcomponents/downloads/detail?name=JPComponents_1.0_b1.2.jar&quot;&gt;aquí&lt;/a&gt;&lt;/b&gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Bueno es un poco básico el tuto, así que les recomiendo que los prueben, y me comenten!&lt;br /&gt;
&lt;br /&gt;
Saludos</content><link rel='replies' type='application/atom+xml' href='http://pablojramirez.blogspot.com/feeds/4494064964539006758/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://pablojramirez.blogspot.com/2011/01/dos-nuevos-componentes.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7994432621199220223/posts/default/4494064964539006758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7994432621199220223/posts/default/4494064964539006758'/><link rel='alternate' type='text/html' href='http://pablojramirez.blogspot.com/2011/01/dos-nuevos-componentes.html' title='Dos nuevos componentes!'/><author><name>Pablo</name><uri>http://www.blogger.com/profile/00894848529887583123</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxV7Jx3AMiFxX8fkdXjaNsRn0PInIAKmYUmWQ3KslIQDiUA1V8cySmfNj9rayscpjC4AU4NCum682qGXiiSq6zfhFQGjvVwf-aSyS_m1CzWM1XuMElbT-0lhjVFoOtYA/s220/IMG_20110119_085434.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7994432621199220223.post-877544887835891041</id><published>2011-01-24T17:15:00.000-08:00</published><updated>2011-01-24T17:22:31.723-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JPCalendar"/><category scheme="http://www.blogger.com/atom/ns#" term="JPCalendar Updates"/><category scheme="http://www.blogger.com/atom/ns#" term="JPComponents"/><title type='text'>Cambios en JPCalendar</title><content type='html'>Bueno, ayer contaba &lt;a href=&quot;http://pablojramirez.blogspot.com/2011/01/como-usar-jpcalendar.html&quot;&gt;cómo usar JPCalendar&lt;/a&gt; , hoy he agregado algunas características nuevas:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Nuevas Propiedades&lt;/span&gt;:&lt;br /&gt;
Además de las mencionadas en el &lt;a href=&quot;http://pablojramirez.blogspot.com/2011/01/como-usar-jpcalendar.html&quot;&gt;post anterior&lt;/a&gt; se han agregado las siguientes propiedades, accesibles mediante getters y setters:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;multipleSelectionAllowed:&lt;/b&gt; indica si se pueden seleccionar más de una fecha en el calendario.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;canNull:&lt;/b&gt; indica si el calendario puede no seleccionar ninguna fecha, esto quiere decir, contener la fecha actual nula.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;selectedDates&lt;/b&gt;: obtiene o establece las fechas seleccionadas en el calendario&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Cambios En Listeners y Eventos:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;He cambiado el evento que lanza el calendario al seleccionarse una fecha o cambiar la selección, ahora existe un&amp;nbsp;&lt;/span&gt; &lt;/span&gt;JPCalendarEvent que contiene la información necesaria sobre el evento, a saber:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;type: &lt;/b&gt;es el tipo de evento com.jpcomponents.events.JPCalendarEventType, que puede ser SELECT o REMOVE.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;calendar: &lt;/b&gt;es la fecha sobre la que se provocó el evento&lt;/li&gt;
&lt;/ul&gt;Estas propiedades son accesibles mediante getters y setters.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Puedes descargar la nueva versión de &lt;a href=&quot;http://code.google.com/p/jpcomponents/downloads/detail?name=JPComponents_1.0_b1.1.jar&quot;&gt;aquí&lt;/a&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://pablojramirez.blogspot.com/feeds/877544887835891041/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://pablojramirez.blogspot.com/2011/01/cambios-en-jpcalendar.html#comment-form' title='4 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7994432621199220223/posts/default/877544887835891041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7994432621199220223/posts/default/877544887835891041'/><link rel='alternate' type='text/html' href='http://pablojramirez.blogspot.com/2011/01/cambios-en-jpcalendar.html' title='Cambios en JPCalendar'/><author><name>Pablo</name><uri>http://www.blogger.com/profile/00894848529887583123</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxV7Jx3AMiFxX8fkdXjaNsRn0PInIAKmYUmWQ3KslIQDiUA1V8cySmfNj9rayscpjC4AU4NCum682qGXiiSq6zfhFQGjvVwf-aSyS_m1CzWM1XuMElbT-0lhjVFoOtYA/s220/IMG_20110119_085434.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7994432621199220223.post-6774562680819956240</id><published>2011-01-22T22:16:00.000-08:00</published><updated>2011-01-22T22:32:54.005-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="JPBackgroundPanel"/><category scheme="http://www.blogger.com/atom/ns#" term="JPComponents"/><category scheme="http://www.blogger.com/atom/ns#" term="swing"/><title type='text'>JPBackgroundPanel</title><content type='html'>JPBackgroundPanel es un JPanel con una imágen de fondo. Tan simple como eso, pero swing no tiene un componente de estas características, por lo cual he decidido crear uno.&lt;br /&gt;
Su uso es súper fácil, funciona como un JPanel normal, añadiendo las siguientes propiedades accesibles mediante getters y setters:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;image&lt;/b&gt;: la imágen de fondo del panel, es una java.awt.Image&lt;/li&gt;
&lt;li&gt;&lt;b&gt;xLocation&lt;/b&gt;: la ubicación en x de la imagen&lt;/li&gt;
&lt;li&gt;&lt;b&gt;yLocation&lt;/b&gt;: la ubicación en y de la imagen&lt;/li&gt;
&lt;li&gt;&lt;b&gt;strech&lt;/b&gt;: indica si la imágen debe estirarse o reducirse para ocupar todo el tamaño del panel&lt;/li&gt;
&lt;/ul&gt;Eso es todo, cualquier consulta, adelante.</content><link rel='replies' type='application/atom+xml' href='http://pablojramirez.blogspot.com/feeds/6774562680819956240/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://pablojramirez.blogspot.com/2011/01/jpbackgroundpanel.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7994432621199220223/posts/default/6774562680819956240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7994432621199220223/posts/default/6774562680819956240'/><link rel='alternate' type='text/html' href='http://pablojramirez.blogspot.com/2011/01/jpbackgroundpanel.html' title='JPBackgroundPanel'/><author><name>Pablo</name><uri>http://www.blogger.com/profile/00894848529887583123</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxV7Jx3AMiFxX8fkdXjaNsRn0PInIAKmYUmWQ3KslIQDiUA1V8cySmfNj9rayscpjC4AU4NCum682qGXiiSq6zfhFQGjvVwf-aSyS_m1CzWM1XuMElbT-0lhjVFoOtYA/s220/IMG_20110119_085434.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7994432621199220223.post-3393937401942722552</id><published>2011-01-22T22:01:00.000-08:00</published><updated>2011-01-24T17:22:16.710-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="JPCalendar"/><category scheme="http://www.blogger.com/atom/ns#" term="JPComponents"/><category scheme="http://www.blogger.com/atom/ns#" term="swing"/><title type='text'>Cómo usar JPCalendar</title><content type='html'>&lt;div style=&quot;background-color: #fffec1; border: 2px solid rgb(255, 252, 0); font-family: Arial,Helvetica,sans-serif; font-size: 10px; padding: 10px;&quot;&gt;&lt;b&gt;Atención&lt;/b&gt;: luego de leer este post, por favor lee &lt;a href=&quot;http://pablojramirez.blogspot.com/2011/01/cambios-en-jpcalendar.html&quot;&gt;este otro&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Bueno, aquí dejo un tuto de cómo usar JPCalendar.&lt;br /&gt;
No hay mucho que explicar sobre qué es JPCalendar, ya que su nombre sugiere bastante, es un componente calendario para java/swing.&lt;br /&gt;
Lo primero que debes hacer para utilizar el calendario es bajarte la librería jpcomponents desde &lt;a href=&quot;https://code.google.com/p/jpcomponents/downloads/list&quot;&gt;aquí&lt;/a&gt;, daré una explicación basándome en que estás familiarizado con swing y que utilizas Netbeans para el desarrollo. Si no es así con gusto daré las explicaciones que necesites.&lt;br /&gt;
Bueno, comencemos:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Primeros pasos:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;1.&lt;/b&gt; Lo primero que debemos hacer&amp;nbsp; es crear una nueva aplicación java, y luego agregar jpcomponents a las librerías del proyecto.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;2. &lt;/b&gt;Agregamos un nuevo JFrame a nuestra aplicación.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;3. &lt;/span&gt;&lt;/b&gt; Agregaremos el calendario a nuestra barra de componentes para que sea más fácil agregarlo a nuestros formularios desde el editor de netbeans, para ello hacemos click con el botón secundario del mouse sobre la barra de componentes, damos click en palette manager y seleccionamos add from jar, vamos a la dirección donde está el jar de jpcomponents y seleccionamos jpcalendar de la lista que nos muestra el netbeans. Con eso ya debemos tener el calendario en la barra de componentes.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;4. &lt;/b&gt;Arrastramos el componente jpcalendar sobre el jframe y listo, ya tenemos nuestro calendario funcionando.&lt;br /&gt;
&lt;br /&gt;
Puedes hacer click con el botón secundario sobre&amp;nbsp; el formulario y seleccionar run file, y podrás ver el calendario en funcionamiento.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Propiedades de JPCalendar&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-size: small;&quot;&gt;El calendario tiene unas cuantas propiedades que se pueden setear para personalizarlo, como los colores de fuente, de fondo, etc, aún no están todas funcionales, porque por trabajo he tenido que postergar algunas.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Aquí una lista de las propiedades implementadas, todas son accesibles mediante getters y setters:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;b&gt;currentDate&lt;/b&gt;: esta propiedad establece u obtiene la fecha actual del calendario&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;dayColor&lt;/b&gt;: color de fuente de los días&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;daySelectedBackground&lt;/b&gt;: color de fondo del día seleccionado en el calendario&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;daySelectedColor&lt;/b&gt;: color de fuente del día seleccionado en el calendario&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;offsetDayColor&lt;/b&gt;: color de fuente de los días que no son del mes actual&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;rowBackgroundOdd&lt;/b&gt;: color de fondo para las filas impares del calendario&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;rowBackgroundPair&lt;/b&gt;: color de fondo para las filas pares del calendario&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;sundayBackground &lt;/b&gt;(aún no implementado): será el color de fondo de las celdas correspondientes al día domingo&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;sundayColor &lt;/b&gt;(aún no implementado): será el color de fuente de las celdas correspondientes al día domingo.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;todayBackground&lt;/b&gt;: color de fondo del día actual&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;todayColor&lt;/b&gt;: color de fuente del día actual&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Eventos de JPCalendar&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;JPCalendar tiene un evento que es lanzado cuando cambia la fecha seleccionada, llamado onDateChanged(Calendar date), para escuchar este evento debe agregarse un&lt;span style=&quot;font-size: large;&quot;&gt; &lt;span style=&quot;font-size: small;&quot;&gt;com.jpcomponents.events.IJPCalendarDateListener a la instancia de calendario que quiere escucharse, de la siguiente manera:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Supongamos que tenemos una instancia de JPCalendar llamada jpcal, entonces, para escuchar el evento hacemos lo siguiente:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;jpcal.addDateChangeListener(new IJPCalendarDateListener() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void onDateChanged(Calendar calendar) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; //hacer algo con la fecha&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
});&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Capturas de Pantalla&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJMiQ65k-KNGBwboFWPlK_TkAvK-A6Fldn4EG4aeSH85aL05oC36QBOPmsmt5iP7nj7pgjmVfSM2-xvoNWCRusBvqu9j8aUayyd-_t0uuZwDWBCwoOgysJaG8K30q7rNtKk2GiwG3ZDb8/s1600/jpComponents.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJMiQ65k-KNGBwboFWPlK_TkAvK-A6Fldn4EG4aeSH85aL05oC36QBOPmsmt5iP7nj7pgjmVfSM2-xvoNWCRusBvqu9j8aUayyd-_t0uuZwDWBCwoOgysJaG8K30q7rNtKk2GiwG3ZDb8/s1600/jpComponents.jpg&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;JPCalendar sobre un JPBackgroundPanel&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Bueno, esto es todo por ahora, si tienes dudas, no dudes en ponerte en contacto conmigo.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;a href=&quot;http://code.google.com/p/jpcomponents/downloads/detail?name=JPComponents_1.0_b1.1.jar&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Descargar JPComonents desde Google Code&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #fffec1; border: 2px solid rgb(255, 252, 0); font-family: Arial,Helvetica,sans-serif; font-size: 10px; padding: 10px;&quot;&gt;&lt;b&gt;Atención&lt;/b&gt;: luego de leer este post, por favor lee &lt;a href=&quot;http://pablojramirez.blogspot.com/2011/01/cambios-en-jpcalendar.html&quot;&gt;este otro&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pablojramirez.blogspot.com/feeds/3393937401942722552/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://pablojramirez.blogspot.com/2011/01/como-usar-jpcalendar.html#comment-form' title='26 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7994432621199220223/posts/default/3393937401942722552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7994432621199220223/posts/default/3393937401942722552'/><link rel='alternate' type='text/html' href='http://pablojramirez.blogspot.com/2011/01/como-usar-jpcalendar.html' title='Cómo usar JPCalendar'/><author><name>Pablo</name><uri>http://www.blogger.com/profile/00894848529887583123</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxV7Jx3AMiFxX8fkdXjaNsRn0PInIAKmYUmWQ3KslIQDiUA1V8cySmfNj9rayscpjC4AU4NCum682qGXiiSq6zfhFQGjvVwf-aSyS_m1CzWM1XuMElbT-0lhjVFoOtYA/s220/IMG_20110119_085434.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJMiQ65k-KNGBwboFWPlK_TkAvK-A6Fldn4EG4aeSH85aL05oC36QBOPmsmt5iP7nj7pgjmVfSM2-xvoNWCRusBvqu9j8aUayyd-_t0uuZwDWBCwoOgysJaG8K30q7rNtKk2GiwG3ZDb8/s72-c/jpComponents.jpg" height="72" width="72"/><thr:total>26</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7994432621199220223.post-5325437408546908033</id><published>2011-01-22T20:35:00.000-08:00</published><updated>2011-01-22T21:33:21.037-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="JPComponents"/><category scheme="http://www.blogger.com/atom/ns#" term="swing"/><title type='text'>Inicio de JPComponents</title><content type='html'>Bienvenidos!&lt;br /&gt;
Esta es la primera publicación, esperemos que sea la primera de muchas, aquí iré mostrando el avance de mi proyecto jpcomponents, una librería de componentes ricos para Java/Swing, por ahora he comenzado con un calendario, creo que todos los que programamos en java, alguna vez nos vimos en la necesidad de colocar un calendario y no encontramos ninguno que se adaptara a nuestras necesidades.&lt;br /&gt;
Existen otras alternativas, como por ejemplo &lt;a href=&quot;http://www.toedter.com/en/jcalendar/index.html&quot;&gt;jcalendar&lt;/a&gt;, pero la verdad a mí me ha parecido un tanto decepcionante.&lt;br /&gt;
Este es un proyecto abierto, y todos puede aportar ideas, he iniciado el proyecto en &lt;a href=&quot;https://code.google.com/p/jpcomponents/&quot;&gt;google code&lt;/a&gt;, pueden ir viendo su progreso, que espero sea rápido.&lt;br /&gt;
El calendario ya se puede descargar desde &lt;a href=&quot;https://code.google.com/p/jpcomponents/downloads/list&quot;&gt;aquí.&lt;/a&gt;&lt;br /&gt;
Pronto les tendré novedades, y publicaré un minitutorial de cómo usarlo.</content><link rel='replies' type='application/atom+xml' href='http://pablojramirez.blogspot.com/feeds/5325437408546908033/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://pablojramirez.blogspot.com/2011/01/bienvenidos-esta-es-la-primera.html#comment-form' title='1 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7994432621199220223/posts/default/5325437408546908033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7994432621199220223/posts/default/5325437408546908033'/><link rel='alternate' type='text/html' href='http://pablojramirez.blogspot.com/2011/01/bienvenidos-esta-es-la-primera.html' title='Inicio de JPComponents'/><author><name>Pablo</name><uri>http://www.blogger.com/profile/00894848529887583123</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxV7Jx3AMiFxX8fkdXjaNsRn0PInIAKmYUmWQ3KslIQDiUA1V8cySmfNj9rayscpjC4AU4NCum682qGXiiSq6zfhFQGjvVwf-aSyS_m1CzWM1XuMElbT-0lhjVFoOtYA/s220/IMG_20110119_085434.jpg'/></author><thr:total>1</thr:total></entry></feed>