<?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-7851410221666275084</id><updated>2024-09-21T18:06:43.564-07:00</updated><category term="java"/><category term="caracteres"/><category term="limitar"/><category term="longitud"/><category term="numero"/><category term="ArrayList"/><category term="JFormattedTextField"/><category term="MySQL"/><category term="Pausar descargas rapidshare megaupload etc"/><category term="ResultSet"/><category term="ancho de banda XP"/><category term="cadena"/><category term="decimales"/><title type='text'>¡¡¡GUATE!!!</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://guate-daniel.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851410221666275084/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://guate-daniel.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></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-7851410221666275084.post-6331080964511057555</id><published>2011-04-01T14:10:00.000-07:00</published><updated>2011-04-01T14:53:38.835-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cadena"/><category scheme="http://www.blogger.com/atom/ns#" term="caracteres"/><category scheme="http://www.blogger.com/atom/ns#" term="decimales"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="limitar"/><category scheme="http://www.blogger.com/atom/ns#" term="longitud"/><category scheme="http://www.blogger.com/atom/ns#" term="numero"/><title type='text'>Otra forma de Limitar la cantidad de caracteres, números o decimales en java</title><content type='html'>Para mejorar la restricción a un JTexBox se puede usar la propiedad &quot;setDocument&quot; de los&lt;br /&gt;cuadros de texto en java, de la siguiente forma.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;JTextBox txt=&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;new &lt;/span&gt;JTextBox();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;txt.setDocument(&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;new &lt;/span&gt;LimitadorCadena(txt,&lt;span style=&quot;color: rgb(255, 204, 51);&quot;&gt;20&lt;/span&gt;));&lt;/span&gt;&lt;br /&gt;En este ejemplo podemos ver que el modo de usando el segundo parametro para indicar&lt;br /&gt;cuantos caracteres son permitidos.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;JTextBox txt=&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;new &lt;/span&gt;JTextBox();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;txt.setDocument(&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;new &lt;/span&gt;LimitadorDecimal(txt,&lt;span style=&quot;color: rgb(255, 204, 51);&quot;&gt;10&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;,&lt;span style=&quot;color: rgb(255, 204, 51);&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;color: rgb(255, 204, 51);&quot;&gt;3&lt;/span&gt;));&lt;/span&gt;&lt;br /&gt;En este otro ejemplo se muestra el uso para restringir el ingreso de números decimales.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;JTextBox txt=&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;new &lt;/span&gt;JTextBox();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;txt.setDocument(&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;new &lt;/span&gt;LimitadorEnteros(txt,&lt;span style=&quot;color: rgb(255, 204, 51);&quot;&gt;10&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;));&lt;/span&gt;&lt;br /&gt;No creo que necesite explicación.&lt;br /&gt;(claro hay que poner las clases en el mismo paquete)&lt;br /&gt;&lt;br /&gt;La magia se encuentra en las clases &quot;Limitar&quot; Decimales, Enteros y Cadena.&lt;br /&gt;(cualquier duda o mejora aquí pueden publicarla con confianza)&lt;br /&gt;&lt;br /&gt;En todas las clases el truco es sobrecargar el método &quot;insertString&quot; de PlainDocument.&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;http://www.megaupload.com/?d=JUW9KCWV&quot;&gt; Descargar &lt;/a&gt;&lt;br /&gt;Esta es una solución mejorada de la que publiqué hace algún tiempo...&lt;br /&gt;perdón por no dar mucha explicación.</content><link rel='replies' type='application/atom+xml' href='http://guate-daniel.blogspot.com/feeds/6331080964511057555/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://guate-daniel.blogspot.com/2011/04/otra-forma-de-limitar-la-cantidad-de.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851410221666275084/posts/default/6331080964511057555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851410221666275084/posts/default/6331080964511057555'/><link rel='alternate' type='text/html' href='http://guate-daniel.blogspot.com/2011/04/otra-forma-de-limitar-la-cantidad-de.html' title='Otra forma de Limitar la cantidad de caracteres, números o decimales en java'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851410221666275084.post-4361426739954471290</id><published>2011-03-04T09:04:00.001-08:00</published><updated>2012-12-15T21:00:08.014-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ArrayList"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="ResultSet"/><title type='text'>Convertir un ResultSet a un ArrayList (Java)</title><content type='html'>Saludos.&lt;br /&gt;
&lt;br /&gt;
Esta clase sirve para facilitar la interpretación entre un ResultSet a un ArrayList, además de que evitar que se tengan &quot;try&quot; por todos lados y se puedan administrar más facilmente.&lt;br /&gt;
&lt;br /&gt;
Haciendo mucho mas sencillo el manejo de las consultas dentro de la aplicación.&lt;br /&gt;
&lt;br /&gt;
Esta clase provee las siguientes funciones:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Select&lt;/li&gt;
&lt;li&gt;SelectMatch&lt;/li&gt;
&lt;li&gt;Insert&lt;/li&gt;
&lt;li&gt;(Update disponible muy pronto)&lt;/li&gt;
&lt;/ul&gt;
Al instanciar un objecto de esta clase se pueden enviar los parámetros necesarios para realizar la conexión.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Instanciación:&lt;/span&gt;&lt;br /&gt;
Query qry = new Query(&quot;com.mysql.jdbc.Driver&quot;, &quot;jdbc:mysql://localhost/temporal&quot;, &quot;root&quot;, &quot;daniel&quot;);&lt;br /&gt;
ó solo = new Query(); y enviar los parametros por medio de los seters y geters disponibles.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Ejemplo 1:&lt;/span&gt;&lt;br /&gt;
Con el siguiente fragmento de código podemos saber si existe un registro&lt;br /&gt;
ideal para cuando deseamos hacer un ingreso que debe de ser único.&lt;br /&gt;
&lt;pre class=&quot;brush: java;&quot;&gt;Query qry=&lt;span style=&quot;color: #3333ff;&quot;&gt;new &lt;/span&gt;Query();
&lt;span style=&quot;color: #3333ff;&quot;&gt;if &lt;/span&gt;(consulta.SelectMatch(&lt;span style=&quot;color: #cc9933;&quot;&gt;&quot;tableName&quot;&lt;/span&gt;,&lt;span style=&quot;color: #cc9933;&quot;&gt;&quot;ColumnName&quot;&lt;/span&gt;,&lt;span style=&quot;color: #cc9933;&quot;&gt;&quot;parametro&quot;&lt;/span&gt;) )
...
&lt;span style=&quot;color: #3333ff;&quot;&gt;else&lt;/span&gt;
...&lt;/pre&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Ejemplo 2:&lt;/span&gt;&lt;br /&gt;
Con el siguiente fragmento se hace una consulta que devuelve un resultado para mostrar en la interfáz gráfica.&lt;br /&gt;
&lt;pre class=&quot;brush: java;&quot;&gt;&lt;span style=&quot;color: #33cc00;&quot;&gt;ComboBox1&lt;/span&gt;.removeAllItems();
ArrayList&lt;string&gt; Resultado=&lt;span style=&quot;color: #3333ff;&quot;&gt;new &lt;/span&gt;ArrayList&lt;string&gt;();
Query consulta=&lt;span style=&quot;color: #3333ff;&quot;&gt;new &lt;/span&gt;Query();
Resultado=consulta.Select(&lt;span style=&quot;color: #cc9933;&quot;&gt;&quot;* FROM CHASIS&quot;&lt;/span&gt;,2);
&lt;span style=&quot;color: #3333ff;&quot;&gt;if &lt;/span&gt;(Resultado!=&lt;span style=&quot;color: #3333ff;&quot;&gt;null&lt;/span&gt;)
&lt;span style=&quot;color: #3333ff;&quot;&gt;for &lt;/span&gt;(&lt;span style=&quot;color: #3333ff;&quot;&gt;int &lt;/span&gt;x=0;x&lt;resultado .size=&quot;.size&quot; x=&quot;x&quot;&gt;&lt;span style=&quot;color: #33cc00;&quot;&gt;ComboBox1&lt;/span&gt;.addItem((Resultado.get(x))[0]+&lt;span style=&quot;color: #cc9933;&quot;&gt;&quot;) &quot;&lt;/span&gt;+(Resultado.get(x))[1]);&lt;/resultado&gt;&lt;/string&gt;&lt;/string&gt;&lt;/pre&gt;
Se puede observar que lo que hace este código es:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Borrar el contenido del ComboBox.&lt;/li&gt;
&lt;li&gt;Se crea un ArrayList de tipo arreglo de String.&lt;/li&gt;
&lt;li&gt;Se crea un objeto de tipo Query.&lt;/li&gt;
&lt;li&gt;Se ejecuta el método Query.Select, que devuelve como resultado un ArrayList, este método recibe un String y un entero. En el String va el código SQL necesario y el entero es para indicar el número de columnas que devolverá la consulta.&lt;/li&gt;
&lt;li&gt;Se verifica que la consulta haya devuelto resultados.&lt;/li&gt;
&lt;li&gt;En este punto ya es posible recorrer el ArraList para guardarlo por ejemplo en un ComboBox.&lt;/li&gt;
&lt;/ol&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Ejemplo 3:&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: java;&quot;&gt;Query consulta=&lt;span style=&quot;color: #3333ff;&quot;&gt;new &lt;/span&gt;Query();
&lt;span style=&quot;color: #3333ff;&quot;&gt;if &lt;/span&gt;(consulta.SelectMatch(&lt;span style=&quot;color: #cc9933;&quot;&gt;&quot;Tabla&quot;&lt;/span&gt;, &lt;span style=&quot;color: #cc9933;&quot;&gt;&quot;NOMBRE&quot;&lt;/span&gt;, &lt;span style=&quot;color: #33cc00;&quot;&gt;txtNombre&lt;/span&gt;.getText())==&lt;span style=&quot;color: #3333ff;&quot;&gt;false&lt;/span&gt;){
consulta=&lt;span style=&quot;color: #3333ff;&quot;&gt;new &lt;/span&gt;Query();
&lt;span style=&quot;color: #3333ff;&quot;&gt;if &lt;/span&gt;( consulta.Insert(Tabla+&lt;span style=&quot;color: #cc9933;&quot;&gt;&quot; (NOMBRE) VALUES(&#39;&quot;&lt;/span&gt;+&lt;span style=&quot;color: #33cc00;&quot;&gt;txtNombre&lt;/span&gt;.getText()+&lt;span style=&quot;color: #cc9933;&quot;&gt;&quot;&#39;)&quot;&lt;/span&gt;) ){
    ...&lt;span style=&quot;color: #999999;&quot;&gt;//Si fue insertado correctamente&lt;/span&gt;
}&lt;span style=&quot;color: #3333ff;&quot;&gt;else&lt;/span&gt;{
    ...
}
}&lt;span style=&quot;color: #3333ff;&quot;&gt;else&lt;/span&gt;{
...&lt;span style=&quot;color: #999999;&quot;&gt;//Si ya existe&lt;/span&gt;
}&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Se crea una Variable de tipo Query&lt;/li&gt;
&lt;li&gt;Se ejecuta el método Query.SelectMatch(), este método recible como parámetros el nombre de la tabla, el nombre del campo a comparar y el parametro contra el cual se debe comparar el nombre del campo.&lt;/li&gt;
&lt;li&gt;se puede observar que se compara que el valor ingresado (parametro 3) no existe en &quot;Tabla&quot;, si no existe se procede a insertar el registro en la base de datos.&lt;/li&gt;
&lt;li&gt;se reinicia la variable consulta&lt;/li&gt;
&lt;li&gt;se ejecuta el método Query.Insert(), que recibe como parámetro el código SQL para ma misma.&lt;/li&gt;
&lt;/ul&gt;
Espero les sea de utilidad.&lt;br /&gt;
&lt;br /&gt;
Definición de la clase &quot;Query&quot;.&lt;br /&gt;
&lt;pre class=&quot;brush: java;&quot;&gt;&lt;string&gt;&lt;string&gt;&lt;string&gt;&lt;numcolumnas arraylist=&quot;&quot; boolean=&quot;&quot; en=&quot;&quot; exception=&quot;&quot; from=&quot;&quot; idname=&quot;IDvalue&quot; if=&quot;&quot; public=&quot;&quot; return=&quot;&quot; select=&quot;&quot; si=&quot;&quot; string=&quot;&quot; tablename=&quot;&quot; true=&quot;&quot; where=&quot;&quot; x=&quot;x&quot;&gt;&lt;string&gt;&lt;string&gt;&lt;span style=&quot;color: #3333ff;&quot;&gt;&lt;pre style=&quot;background: #ffffff; color: black;&quot;&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt; administrador&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt; java&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;sql&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt; java&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;util&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;ArrayList&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt; javax&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;swing&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #004a43;&quot;&gt;JOptionPane&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #3f5fbf;&quot;&gt;/**&lt;/span&gt;
&lt;span style=&quot;color: #3f5fbf;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f9fbf; font-weight: bold;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #3f5fbf;&quot;&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3f5fbf;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f9fbf; font-weight: bold;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #3f5fbf;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f9fbf; font-weight: bold;&quot;&gt;@author&lt;/span&gt;&lt;span style=&quot;color: #3f5fbf;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f9fbf; font-weight: bold;&quot;&gt;Daniel&lt;/span&gt;&lt;span style=&quot;color: #3f5fbf;&quot;&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3f5fbf;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;
&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;class&lt;/span&gt; Query &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; DRIVER&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;com.mysql.jdbc.Driver&quot;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;//mySQL&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; RUTA&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;jdbc:mysql://localhost/temporal&quot;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;//Prueba&quot;;//mySQL&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; USER&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;root&quot;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; PASSWORD&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;daniel&quot;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;Connection&lt;/span&gt; CONEXION&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; Query&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; Query&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;Driver&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; Ruta&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; User&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; Password&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        DRIVER&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;Driver&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        RUTA&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;Ruta&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        USER&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;User&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        PASSWORD&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;Password&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #bb7977;&quot;&gt;boolean&lt;/span&gt; Connect&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;try&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
            &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;Class&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;forName&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;DRIVER&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            CONEXION &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;DriverManager&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;getConnection&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;RUTA&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;USER&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;PASSWORD&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;Statement&lt;/span&gt; sentencia&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            sentencia&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;CONEXION&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;createStatement&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;ClassNotFoundException&lt;/span&gt; ex&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
            JOptionPane&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;showMessageDialog&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;Driver no disponible. &quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;ex&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;Error&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;JOptionPane&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;ERROR_MESSAGE&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;SQLException&lt;/span&gt; ex&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
            JOptionPane&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;showMessageDialog&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;Conexion a la base de datos no disponible. &lt;/span&gt;&lt;span style=&quot;color: #0f69ff;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;ex&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;Error&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;JOptionPane&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;ERROR_MESSAGE&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; ArrayList&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt; Select&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; SQL&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #bb7977;&quot;&gt;int&lt;/span&gt; NumColumnas&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;Connect&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
            &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;try&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
                ArrayList&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt; matResultado&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;new&lt;/span&gt; ArrayList&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; Fila&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NumColumnas&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

                &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;Class&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;forName&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;DRIVER&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                CONEXION &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;DriverManager&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;getConnection&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;RUTA&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;USER&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;PASSWORD&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

                &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;Statement&lt;/span&gt; sentencia&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                sentencia &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CONEXION&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;createStatement&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;ResultSet&lt;/span&gt; resultado &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; sentencia&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;executeQuery&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;SELECT &quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;SQL&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;resultado&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;next&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
                &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
                    Fila&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;NumColumnas&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #bb7977;&quot;&gt;int&lt;/span&gt; x&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;x&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;NumColumnas&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;x&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
                        Fila&lt;span style=&quot;color: #808030;&quot;&gt;[&lt;/span&gt;x&lt;span style=&quot;color: #808030;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;resultado&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;getObject&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;x&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;toString&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
                    matResultado&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;add&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;Fila&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
                &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;matResultado&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;isEmpty&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
                &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; matResultado&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;Exception&lt;/span&gt; ex&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: #3f5fbf;&quot;&gt;/**&lt;/span&gt;
&lt;span style=&quot;color: #3f5fbf;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f9fbf; font-weight: bold;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #3f5fbf;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f9fbf; font-weight: bold;&quot;&gt;@return&lt;/span&gt;&lt;span style=&quot;color: #3f5fbf;&quot;&gt; &quot;true&quot; si IDname=IDvalue en tableName&lt;/span&gt;
&lt;span style=&quot;color: #3f5fbf;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f9fbf; font-weight: bold;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #3f5fbf;&quot;&gt; ejemplo&lt;/span&gt;&lt;span style=&quot;color: #7f9fbf; font-weight: bold;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #3f5fbf;&quot;&gt; SELECT IDname FROM tableName WHERE IDname=&#39;IDvalue&#39;&lt;/span&gt;&lt;span style=&quot;color: #7f9fbf; font-weight: bold;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #3f5fbf;&quot;&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3f5fbf;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #bb7977;&quot;&gt;boolean&lt;/span&gt; SelectMatch&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; tableName&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; IDname&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; IDvalue&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;Connect&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
            &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;try&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
                ArrayList&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt; matResultado&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;new&lt;/span&gt; ArrayList&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

                &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;Class&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;forName&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;DRIVER&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                CONEXION &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;DriverManager&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;getConnection&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;RUTA&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;USER&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;PASSWORD&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

                &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;Statement&lt;/span&gt; sentencia&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                sentencia &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CONEXION&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;createStatement&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;ResultSet&lt;/span&gt; resultado &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; sentencia&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;executeQuery&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;SELECT &quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;IDname&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot; FROM &quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;tableName&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot; WHERE &quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;IDname&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;=&#39;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;IDvalue&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;&#39;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;resultado&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;next&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
                &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
                    matResultado&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;add&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;resultado&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;getObject&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;toString&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
                &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;matResultado&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;isEmpty&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
                &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;Exception&lt;/span&gt; ex&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #bb7977;&quot;&gt;boolean&lt;/span&gt; Insert&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; SQL&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;Connect&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
            &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;try&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
                &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;Class&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;forName&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;DRIVER&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                CONEXION &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;DriverManager&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;getConnection&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;RUTA&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;USER&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;PASSWORD&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

                &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;Statement&lt;/span&gt; sentencia&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                sentencia &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; CONEXION&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;createStatement&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                sentencia&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;execute&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;INSERT INTO &quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;SQL&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
                &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;Exception&lt;/span&gt; ex&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #bb7977;&quot;&gt;void&lt;/span&gt; setDriver&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; Drv&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        DRIVER&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;Drv&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #bb7977;&quot;&gt;void&lt;/span&gt; setRuta&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; Rut&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        RUTA&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;Rut&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #bb7977;&quot;&gt;void&lt;/span&gt; setUser&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; Usr&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        USER&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;Usr&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #bb7977;&quot;&gt;void&lt;/span&gt; setPass&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; Pas&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        PASSWORD&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;Pas&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; getDriver&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; DRIVER&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; getRuta&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; RUTA&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; getUser&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; USER&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; getPass&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; PASSWORD&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/string&gt;&lt;/string&gt;&lt;/numcolumnas&gt;&lt;/string&gt;&lt;/string&gt;&lt;/string&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://guate-daniel.blogspot.com/feeds/4361426739954471290/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://guate-daniel.blogspot.com/2011/03/convertir-un-resultset-un-arraylist.html#comment-form' title='6 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851410221666275084/posts/default/4361426739954471290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851410221666275084/posts/default/4361426739954471290'/><link rel='alternate' type='text/html' href='http://guate-daniel.blogspot.com/2011/03/convertir-un-resultset-un-arraylist.html' title='Convertir un ResultSet a un ArrayList (Java)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851410221666275084.post-4044549194310419983</id><published>2010-09-10T13:31:00.000-07:00</published><updated>2010-10-28T08:39:00.350-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="caracteres"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="JFormattedTextField"/><category scheme="http://www.blogger.com/atom/ns#" term="limitar"/><category scheme="http://www.blogger.com/atom/ns#" term="longitud"/><category scheme="http://www.blogger.com/atom/ns#" term="numero"/><title type='text'>Limitar la cantidad de números en java</title><content type='html'>Para poder limitar el numero de caracteres en un cuadro de texto en java no es posible (de manera sencilla) con el JTextField.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;pero podemos contar con el &quot;JFormattedTextField&quot;, con el cual podemos hacer varias limitaciones.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Específicamente para limitar el numero de caracteres con este control, lo podemos hacer la siguiente manera:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;try{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;String mascara=&quot;&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;//algunas de las posibilidades pueden ser:&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;mascara=&quot;##.##&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;//mascara=&quot;##/##/####&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;//mascara=&quot;##:##:##&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;/*el problema de las mascaras anteriores es que no son flexibles es decir si no se &lt;/div&gt;&lt;div&gt;cumple exactamente la mascara automáticamente ignora lo que se le escribió.&lt;/div&gt;&lt;div&gt;por ejemplo si se necesita una casilla que acepte como máximo números de longitud 5 y se escribe &quot;25&quot; para esta mascara no será valido, sería valido si se pusiera &quot;00025&quot; cosa que no es práctica.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;para que esto sea posible podemos hacerlo de la siguiente manera:&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;mascara=&quot;*****&quot;; &lt;/span&gt;pero esta nos da una desventaja que acepta cualquier carácter (no solo números, si es lo que se desea hasta aquí sería suficiente)  pero si nos da la posibilidad de poner únicamente los caracteres necesarios, es decir nos acepta tanto &quot;k4k5j&quot; como &quot;j6&quot;.&lt;/div&gt;&lt;div&gt;*/&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;MaskFormatter mask=new MaskFormatter(mascara);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;JFormattedTextField textoLimitar=new JFormattedTextField(mask);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;//para completar la solución (limitar la cantidad de números en una casilla) se debe de&lt;/div&gt;&lt;div&gt;//escribir el siguiente código para aceptar únicamente números.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;textoLimitar.addKeyListener(this); // para agregarle eventos&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;public void KeyPressed(KeyEvent evt){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;if(evt.getSource()==textoLimitar){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;     if (!Character.isDigit(evt.getKeyChar()) &amp;amp;&amp;amp; teclas(evt.getKeyCode()) )&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;       &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;evt.consume();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;public void KeyTyped(KeyEvent evt){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;if(evt.getSource()==textoLimitar){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;     if (!Character.isDigit(evt.getKeyChar()) &amp;amp;&amp;amp; teclas(evt.getKeyCode()) )&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;    &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;evt.consume();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;public boolean teclas(int keyCode) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;if ( keyCode!=KeyEvent.VK_BACK_SPACE &amp;amp;&amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt; keyCode!=KeyEvent.VK_DELETE &amp;amp;&amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt; keyCode!=KeyEvent.VK_LEFT &amp;amp;&amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt; keyCode!=KeyEvent.VK_RIGHT &amp;amp;&amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt; keyCode!=KeyEvent.VK_HOME &amp;amp;&amp;amp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt; keyCode!=KeyEvent.VK_END&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;   )&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;return true;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;else return false;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:arial;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:Georgia,serif;&quot;&gt;Esta es la mejor solución que encontré. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://guate-daniel.blogspot.com/feeds/4044549194310419983/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://guate-daniel.blogspot.com/2010/09/limitar-numero-de-caracteres-en-java.html#comment-form' title='2 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851410221666275084/posts/default/4044549194310419983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851410221666275084/posts/default/4044549194310419983'/><link rel='alternate' type='text/html' href='http://guate-daniel.blogspot.com/2010/09/limitar-numero-de-caracteres-en-java.html' title='Limitar la cantidad de números en java'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851410221666275084.post-4431990749063129207</id><published>2009-09-10T17:14:00.000-07:00</published><updated>2010-02-01T09:40:33.889-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Pausar descargas rapidshare megaupload etc"/><title type='text'>Como pausar las descargas de Megaupload, etc.</title><content type='html'>&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;Para cuando querramos pausar/reanudar las descargas (de M,  FF, etc.)&lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;Lo único que debemos seguir son unos simples pasos:&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Requerimientos:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul  style=&quot;font-family:lucida grande;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;Mozilla Firefox (Ultima Version).&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;El link de lo que querramos descargar.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;Si por increible que parezca solo Mozilla Firefox. jejeje&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-weight: bold;font-family:lucida grande;font-size:130%;&quot;  &gt;Descripcion:&lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;    Cuando se hace una descarga con mozilla este de manera predeterminada&lt;br /&gt;permite que se puedan pausar las descargas (Esta es la funcion que no permiritá&lt;br /&gt;reanudar una descarga), para ello Mozilla crea un archivo de extension PART&lt;br /&gt;(en la ubicacion donde se ha elegido guardar nuestro archivo) y otro con&lt;br /&gt;el nombre original del archivo.&lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;Ej:&lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;     Archivo.exe            ---&gt; archivo original&lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;     Archivo.exe.PART ---&gt; archivo de soporte de Mozilla&lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;&lt;br /&gt;El archivo *.PART es el que aumentara de tamaño según el progreso de&lt;br /&gt;dicha descarga, si se nos cancela una descarga por cualquier motivo, lo&lt;br /&gt;unico que necesitamos ese archivo incompleto para continuar con la&lt;br /&gt;descarga, siguiendo los sencillos pasos que siguen:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Pasos:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;1.- Por ningún motivo borres el archivo incompleto que tienes. &lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;      Si lo has hecho ¡RECUPERALO! Que es fundamental tenerlo.&lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;2.- Crea una nueva carpeta y traslada ahí tu &lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;archivo incompleto&lt;br /&gt;(Esta nueva carpeta deberá estar en dentro &lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;      de la carpeta donde descargue firefox. En este caso el escritorio) .&lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;3.- Comienza tu descarga desde el principio…. Exactamente la misma &lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;      (Usando el mismo link de descarga de la incompleta)…&lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;4.- Pausa la descarga por medio del botón de pausar del gestor de &lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;      descargas por defecto de firefox.&lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;5.- mientras la descarga esta pausada, notarás que hay un nuevo &lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;      archivo .PART en el escritorio ( o la carpeta donde se guarda lo &lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;     que descarga firefox)Sustituye dicho archivo por tu archivo .PART &lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;     trunco ( Que en el paso 2 trasladaste a otra carpeta) . Como tiene &lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;     el mismo nombre, extensión y por obvias razones es el mismo pero &lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;     con mas avance , Windows preguntará: Deseas sustituir x archivo &lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;     por x(archivo con el mismo nombre)?.&lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;     Tu le dirás que “SI” Una vez que termine la copia pasa al ultimo paso.&lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;6.- En el gestor de firefox dale a “QUITAR PAUSA” ósea reanudar “Botón PLAY” .&lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;     Como haz cambiado el archivo Firefox lo tomará por valido &lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;     (Por ser el mismo) y ¡LISTO! Continuará la descarga desde donde &lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;     te habías quedado la primera vez.&lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;A&lt;/span&gt;&lt;span style=&quot;;font-family:lucida grande;font-size:130%;&quot;  &gt;gus&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://guate-daniel.blogspot.com/feeds/4431990749063129207/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://guate-daniel.blogspot.com/2009/09/como-pausar-las-descargas-de-rapidshare.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851410221666275084/posts/default/4431990749063129207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851410221666275084/posts/default/4431990749063129207'/><link rel='alternate' type='text/html' href='http://guate-daniel.blogspot.com/2009/09/como-pausar-las-descargas-de-rapidshare.html' title='Como pausar las descargas de Megaupload, etc.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7851410221666275084.post-2407039506726005251</id><published>2009-09-04T22:13:00.000-07:00</published><updated>2010-02-21T15:33:09.658-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ancho de banda XP"/><title type='text'>Aumentar el Ancho de Banda para XP</title><content type='html'>&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Resulta que por defecto Windows XP reserva un 20% del ancho de banda de nuestra conexión &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;(para el Windows Update y otros servicios de comunicación más).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Hay que decir que, en principio, se trata únicamente de una reserva, es decir, que si &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;no hay ningún servicio usandolo, en teoría se debería de aprovechar. Sin embargo, hay &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;gente que dice que esto no es así, y que nunca aprovechamos ese 20%. No está claro, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;aunque la postura oficial de Microsoft es que se libera lo que no se usa. Pero esto es &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;algo que podemos evitar, y poder ganar ese 20% que nos quita, y que no se utiliza la mayoría de las veces.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Sólo puede hacerse en XP Professional (para la versión Home deberia acudirse al registro).&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Para ello, vamos a Inicio / Ejecutar y ejecutamos el archivo gpedit.msc&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Allí se nos abrirá la ventana de Directivas de Grupo y varias opciones en forma de arbol. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Hacemos click en la de Configuración del equipo. Repetimoslos siguientes pasos: Doble &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;click en Plantillas administrativas, doble click en Red, doble click en Programador de paquetes QoS.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Ahora damos al botón derecho del ratón sobre Limitar ancho de banda reservado, y pulsamos sobre &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Propiedades. Ahora veremos que aparece como Deshabilitado. Sin embargo, pone textualmente: &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;&quot;De forma predeterminada, el Programador de paquetes limita el sistema al 20 por ciento del &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;ancho de banda de una conexión. Pero puede usar esta configuración para sobrescribir la predeterminada.&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Según esto, lo que podemos hacer es Habilitarlo y establecer un % bajo (por ejemplo un 1% o un 5%).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;En Windows XP Home&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;==================&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;Puedes optar por instalar el servicio QoS RSVP, o bien deshabilitarlo &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;siguiendo las siguientes instrucciones: Inicio / Ejecutar, ejecutamos msconfig, y nos &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;vamos a la pestaña Servicios. Una vez allí, buscamos el servicios llamado QoS RSVP, y &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:trebuchet ms;&quot;&gt;confirmamos que está Detenido (si no es así, podemos detenerlo).&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://guate-daniel.blogspot.com/feeds/2407039506726005251/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://guate-daniel.blogspot.com/2009/09/aumentar-el-ancho-de-banda-para-xp.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7851410221666275084/posts/default/2407039506726005251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7851410221666275084/posts/default/2407039506726005251'/><link rel='alternate' type='text/html' href='http://guate-daniel.blogspot.com/2009/09/aumentar-el-ancho-de-banda-para-xp.html' title='Aumentar el Ancho de Banda para XP'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>