<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
>
	<channel>
		<title>Dudas de Programacion &#187; Tag: netbeans - Recent Posts</title>
		<link>http://www.dudasprogramacion.com/tags/netbeans</link>
		<description>Dudas sobre lenguajes y apis de programación</description>
		<language>en-US</language>
		<pubDate>Tue, 07 Feb 2012 21:50:47 +0000</pubDate>
		<generator>bbpress 1.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.dudasprogramacion.com/search.php</link>
		</textInput>
		<atom:link href="http://www.dudasprogramacion.com/rss/tags/netbeans" rel="self" type="application/rss+xml" />

		<item>
			<title>waralb on "Duda con imagenes java"</title>
			<link>http://www.dudasprogramacion.com/topic/duda-con-imagenes-java#post-813</link>
			<pubDate>Tue, 30 Nov 2010 06:34:22 +0000</pubDate>
			<dc:creator>waralb</dc:creator>
			<guid isPermaLink="false">813@http://www.dudasprogramacion.com/</guid>
			<description><p>Hola que tal, lo que pasa es que quiero cargar imagenes en un proyecto de java en netbeans, baje un codigo que encontre por internet, pero usa BufferedImage, y no le entiendo, ojala alguien sepa sobre BufferedImage y me pueda explicar. Pongo mi mail por si me pueden hechar la mano y para pasar todo el proyecto, y aqui dejo el codigo donde me parece cargan las imagenes. <a href="mailto:spams0@hotmail.com">spams0@hotmail.com</a></p>
<pre class="java" style="font-family:monospace;"> <span style="color: #000000; font-weight: bold;">private</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Abufferedimage+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">BufferedImage</span></a> imagen, imgFondo<span style="color: #339933;">;</span>
 <span style="color: #000000; font-weight: bold;">public</span> Carta<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> numero, <span style="color: #000066; font-weight: bold;">int</span> palo<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    	<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">numero</span> <span style="color: #339933;">=</span> numero<span style="color: #339933;">;</span>
    	<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">palo</span> <span style="color: #339933;">=</span> palo<span style="color: #339933;">;</span>
    	esComodin <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    	imagen  <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
        imgFondo <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
        seleccionada <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
        tapada <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
        setSize<span style="color: #009900;">&#40;</span>ANCHO, ALTO<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">try</span><span style="color: #009900;">&#123;</span>
        	hold <span style="color: #339933;">=</span> ImageIO.<span style="color: #006633;">read</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> java.<span style="color: #006633;">io</span>.<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Afile+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">File</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Mazo/hold.gif&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span>java.<span style="color: #006633;">io</span>.<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aioexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">IOException</span></a> e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
 <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> pintar<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Agraphics+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Graphics</span></a> g<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    	<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>imagen <span style="color: #339933;">==</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">38</span><span style="color: #339933;">;&amp;</span>#<span style="color: #cc66cc;">38</span><span style="color: #339933;">;</span> imgFondo<span style="color: #339933;">==</span><span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">return</span><span style="color: #339933;">;</span>
&nbsp;
    	<span style="color: #666666; font-style: italic;">//sombra</span>
    	g.<span style="color: #006633;">setColor</span><span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Acolor+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Color</span></a>.<span style="color: #006633;">BLACK</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    	g.<span style="color: #006633;">fillRoundRect</span><span style="color: #009900;">&#40;</span>x<span style="color: #339933;">+</span><span style="color: #cc66cc;">10</span>, y<span style="color: #339933;">+</span><span style="color: #cc66cc;">10</span>, ANCHO<span style="color: #339933;">+</span><span style="color: #cc66cc;">5</span>, ALTO<span style="color: #339933;">+</span><span style="color: #cc66cc;">5</span>, <span style="color: #cc66cc;">10</span>, <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    	<span style="color: #666666; font-style: italic;">//imagen</span>
    	<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>tapada<span style="color: #009900;">&#41;</span>
            g.<span style="color: #006633;">drawImage</span><span style="color: #009900;">&#40;</span>imagen, x, y, ANCHO,ALTO,<span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">else</span>
            g.<span style="color: #006633;">drawImage</span><span style="color: #009900;">&#40;</span>imgFondo, x, y, ANCHO,ALTO,<span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    	<span style="color: #666666; font-style: italic;">//seleccion</span>
    	<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>seleccionada<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            g.<span style="color: #006633;">setColor</span><span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Acolor+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Color</span></a>.<span style="color: #006633;">YELLOW</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            g.<span style="color: #006633;">drawRoundRect</span><span style="color: #009900;">&#40;</span>x<span style="color: #339933;">-</span><span style="color: #cc66cc;">3</span>, y<span style="color: #339933;">-</span><span style="color: #cc66cc;">3</span>, ANCHO<span style="color: #339933;">+</span><span style="color: #cc66cc;">6</span>, ALTO<span style="color: #339933;">+</span><span style="color: #cc66cc;">6</span>, <span style="color: #cc66cc;">10</span>, <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            g.<span style="color: #006633;">drawImage</span><span style="color: #009900;">&#40;</span>hold,x<span style="color: #339933;">+</span><span style="color: #cc66cc;">2</span>,y<span style="color: #339933;">+</span>ALTO<span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">20</span>,hold.<span style="color: #006633;">getWidth</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span>,hold.<span style="color: #006633;">getHeight</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span>,<span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span></pre>
<p>No puse todo el codigo por que es bastante grande, pero puse lo que creo es ams importante para lo de las imagenes, ojala alguien pueda ayudarme, la verdad me urge, de antemano gracias. Saludos.
</p></description>
		</item>
		<item>
			<title>yasmils on "Como hacer la numeración de factura???"</title>
			<link>http://www.dudasprogramacion.com/topic/como-hacer-la-numeracion-de-factura#post-775</link>
			<pubDate>Mon, 22 Nov 2010 19:02:19 +0000</pubDate>
			<dc:creator>yasmils</dc:creator>
			<guid isPermaLink="false">775@http://www.dudasprogramacion.com/</guid>
			<description><p>Graciaaas!.... :)   me servirá de mucho
</p></description>
		</item>
		<item>
			<title>Torres on "Como hacer la numeración de factura???"</title>
			<link>http://www.dudasprogramacion.com/topic/como-hacer-la-numeracion-de-factura#post-771</link>
			<pubDate>Mon, 22 Nov 2010 07:26:38 +0000</pubDate>
			<dc:creator>Torres</dc:creator>
			<guid isPermaLink="false">771@http://www.dudasprogramacion.com/</guid>
			<description><p>Buenas,</p>
<p>Para el formato con 0´s a la izquierda, tienes varias opciones, pero las mas "elegantes", si usas Java 1.5 o superior:</p>
<pre class="java" style="font-family:monospace;">&nbsp;
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">format</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;%05d%n&quot;</span>, <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;</pre>
<p>o con DecimalFormat</p>
<pre class="java" style="font-family:monospace;">&nbsp;
   <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> customFormat<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> pattern, <span style="color: #000066; font-weight: bold;">double</span> value <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adecimalformat+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">DecimalFormat</span></a> myFormatter <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adecimalformat+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">DecimalFormat</span></a><span style="color: #009900;">&#40;</span>pattern<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> output <span style="color: #339933;">=</span> myFormatter.<span style="color: #006633;">format</span><span style="color: #009900;">&#40;</span>value<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>value <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;  &quot;</span> <span style="color: #339933;">+</span> pattern <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;  &quot;</span> <span style="color: #339933;">+</span> output<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      customFormat<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;00000&quot;</span>, <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;</pre></description>
		</item>
		<item>
			<title>earias22 on "Como hacer la numeración de factura???"</title>
			<link>http://www.dudasprogramacion.com/topic/como-hacer-la-numeracion-de-factura#post-768</link>
			<pubDate>Sun, 21 Nov 2010 12:00:31 +0000</pubDate>
			<dc:creator>earias22</dc:creator>
			<guid isPermaLink="false">768@http://www.dudasprogramacion.com/</guid>
			<description><p>Mira si estas en una BD, para sacar el siguiente dato es mejor utilisar secuencias o tipos seriales, asi sacar el siguiente codigo para tu boleta sea facil solo tendras que realizar la consulta: SELECT nextVal('codigoFactura')<br />
esta consulta siempre te devolvera el siguiente valor al actual.<br />
finalmente si quieres manejar con ceros es simple, te creas en java un pequeño metodo:<br />
//este metodo es para la forma XXXX,0XXX,00XX,000X</p>
<pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> numConCeros<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> numeroOrig<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
   <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> res <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
   <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>numeroOrig<span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">62</span><span style="color: #339933;">;=</span><span style="color: #cc66cc;">1000</span><span style="color: #009900;">&#41;</span>
      res <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #339933;">+</span> numeroOrig<span style="color: #339933;">;</span>
   <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>numeroOrig<span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">62</span><span style="color: #339933;">;=</span><span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span>
      res <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;0&quot;</span> <span style="color: #339933;">+</span> numeroOrig<span style="color: #339933;">;</span>
   <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>numeroOrig<span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">62</span><span style="color: #339933;">;=</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span>
      res <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;00&quot;</span> <span style="color: #339933;">+</span> numeroOrig<span style="color: #339933;">;</span>
   <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>numeroOrig<span style="color: #339933;">&amp;</span>#<span style="color: #cc66cc;">62</span><span style="color: #339933;">;=</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span>
      res <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;000&quot;</span> <span style="color: #339933;">+</span> numeroOrig<span style="color: #339933;">;</span>
   <span style="color: #000000; font-weight: bold;">return</span> res<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre>
<p>OJO: este metodo es solo para que puedas idearte de como poner los ceros a la izquierda, tu puedes mejorararlo, pues lo hice de esta manera para que entiendas cual es la idea, finalmente para generar lo que quieres, primero consultas a la BD con nextVal y luego el numero que te devuelve lo envias a este metodo, el cual te lo formateara, Nota el codigo generado por Ceros a la izquierda debera ser una cadena.<br />
espero no haberte ayudado tarde.
</p></description>
		</item>
		<item>
			<title>yasmils on "Como hacer la numeración de factura???"</title>
			<link>http://www.dudasprogramacion.com/topic/como-hacer-la-numeracion-de-factura#post-767</link>
			<pubDate>Sat, 20 Nov 2010 00:05:20 +0000</pubDate>
			<dc:creator>yasmils</dc:creator>
			<guid isPermaLink="false">767@http://www.dudasprogramacion.com/</guid>
			<description><p>si es de una base de datos, el problema es que en la tabla no me genera los números a la izquierda...para colocar 0001, por ejemplo y lo que quisera saber es esa rutina para tomar de la base de datos la última numeración y sumerle uno pero con los ceros a la izquierda...</p>
<p>   y otra cosa que quisiera que me dijeran es como llamar otras pantallas en netbeans.. </p>
<p>  gracias  :)
</p></description>
		</item>
		<item>
			<title>Torres on "Como hacer la numeración de factura???"</title>
			<link>http://www.dudasprogramacion.com/topic/como-hacer-la-numeracion-de-factura#post-763</link>
			<pubDate>Fri, 19 Nov 2010 07:38:43 +0000</pubDate>
			<dc:creator>Torres</dc:creator>
			<guid isPermaLink="false">763@http://www.dudasprogramacion.com/</guid>
			<description><p>Buenas,</p>
<p>Donde se guardan esas facturas? en BD o en Disco?</p>
<p>En cualquier caso, el paso a dar, aunque parezca obvio, es recuperar la última factura y generar un nuevo ID a partir del suyo.</p>
<p>Un saludo
</p></description>
		</item>
		<item>
			<title>yasmils on "Como hacer la numeración de factura???"</title>
			<link>http://www.dudasprogramacion.com/topic/como-hacer-la-numeracion-de-factura#post-762</link>
			<pubDate>Thu, 18 Nov 2010 16:55:02 +0000</pubDate>
			<dc:creator>yasmils</dc:creator>
			<guid isPermaLink="false">762@http://www.dudasprogramacion.com/</guid>
			<description><p>Buen día... quisiera saber como genereo en java (netbeans) la codificación de factura<br />
por ejemplo para estos números 0001  0002  0003 ....00100   etc...</p>
<p>   para cuando se abra la ventana de factura, me coloque en un campo de texto esta numeración chequeando cual fue la última, para incrementarla  </p>
<p>    gracias....
</p></description>
		</item>
		<item>
			<title>Torres on "Ayuda para insertar datos a mysql."</title>
			<link>http://www.dudasprogramacion.com/topic/ayuda-para-insertar-datos-a-mysql#post-645</link>
			<pubDate>Tue, 26 Oct 2010 06:53:22 +0000</pubDate>
			<dc:creator>Torres</dc:creator>
			<guid isPermaLink="false">645@http://www.dudasprogramacion.com/</guid>
			<description><p>Buenas,</p>
<p>Comprueba que los nombres de las columnas de tu tabla coincidan con los que tienes en el código.</p>
<p>Echale un vistazo a este tutorial, puede servirte de ayuda.</p>
<p><a href="http://www.chuidiang.com/java/mysql/mysql-java-basico.php" rel="nofollow">http://www.chuidiang.com/java/mysql/mysql-java-basico.php</a></p>
<p>Un saludo
</p></description>
		</item>
		<item>
			<title>Jendry on "Ayuda para insertar datos a mysql."</title>
			<link>http://www.dudasprogramacion.com/topic/ayuda-para-insertar-datos-a-mysql#post-644</link>
			<pubDate>Mon, 25 Oct 2010 16:56:25 +0000</pubDate>
			<dc:creator>Jendry</dc:creator>
			<guid isPermaLink="false">644@http://www.dudasprogramacion.com/</guid>
			<description><p>Saludos. Estoy realizando un pequeño proyecto con Netbeans y Mysql, se trata de un sistema de consultas para pacientes requerido por la institucion educativa. Tengo algunas fases de sesion q e logrado conseguir y estoy trancado en la parte de insersion de datos para la base q deseo manejar. El sistema posee una BD con el q inicio sesion y hasta ahi trabaja bien. El problema es q quiero insertar nuevos datos y cuando los ingreso no sucede nada, lanza errores..</p>
<p>Codigo..</p>
<pre class="java" style="font-family:monospace;">  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">void</span> guardarActionPerformed<span style="color: #009900;">&#40;</span>java.<span style="color: #006633;">awt</span>.<span style="color: #006633;">event</span>.<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aactionevent+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">ActionEvent</span></a> evt<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">int</span> resp<span style="color: #339933;">;</span>
        resp<span style="color: #339933;">=</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajoptionpane+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">JOptionPane</span></a>.<span style="color: #006633;">showConfirmDialog</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #0000ff;">&quot;¿Desea grabar el registro?&quot;</span>, <span style="color: #0000ff;">&quot;Pregunta&quot;</span>,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>resp<span style="color: #339933;">==</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
          <span style="color: #009900;">&#123;</span>
&nbsp;
         conexion conectar <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> conexion<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astatement+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Statement</span></a> st <span style="color: #339933;">=</span>conectar.<span style="color: #006633;">conectar</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #000000; font-weight: bold;">try</span>
            <span style="color: #009900;">&#123;</span>
&nbsp;
         <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> usuario, contra, comando<span style="color: #339933;">;</span>
         usuario<span style="color: #339933;">=</span>tnombre.<span style="color: #006633;">getText</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         contra<span style="color: #339933;">=</span>tpass.<span style="color: #006633;">getText</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         comando<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;INSERT INTO registros (usuarios, contraseña) VALUES ('','')&quot;</span><span style="color: #339933;">;</span>
         comando<span style="color: #339933;">=</span>comando<span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;('&quot;</span><span style="color: #339933;">+</span>tnombre.<span style="color: #006633;">getText</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;', '&quot;</span><span style="color: #339933;">+</span>tpass.<span style="color: #006633;">getText</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;',1)&quot;</span><span style="color: #339933;">;</span>
         st.<span style="color: #006633;">executeUpdate</span><span style="color: #009900;">&#40;</span>comando<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         conexion.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #009900;">&#125;</span>
            <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asqlexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">SQLException</span></a> e<span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#123;</span>
                <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajoptionpane+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">JOptionPane</span></a>.<span style="color: #006633;">showConfirmDialog</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #0000ff;">&quot;ERROR &quot;</span><span style="color: #339933;">+</span>e.<span style="color: #006633;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span></pre>
<p>Y este es otro codigo q tambien e tratado..</p>
<pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">void</span> guardarActionPerformed<span style="color: #009900;">&#40;</span>java.<span style="color: #006633;">awt</span>.<span style="color: #006633;">event</span>.<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aactionevent+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">ActionEvent</span></a> evt<span style="color: #009900;">&#41;</span>
<span style="color: #000066; font-weight: bold;">int</span> resp<span style="color: #339933;">;</span>
        resp<span style="color: #339933;">=</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajoptionpane+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">JOptionPane</span></a>.<span style="color: #006633;">showConfirmDialog</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #0000ff;">&quot;¿Desea grabar el registro?&quot;</span>, <span style="color: #0000ff;">&quot;Pregunta&quot;</span>,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>resp<span style="color: #339933;">==</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
          <span style="color: #009900;">&#123;</span>
&nbsp;
         conexion conectar <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> conexion<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astatement+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Statement</span></a> st <span style="color: #339933;">=</span>conectar.<span style="color: #006633;">conectar</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
         <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
             <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> usuario, contra<span style="color: #339933;">;</span>
             usuario<span style="color: #339933;">=</span>tnombre.<span style="color: #006633;">getText</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
             contra<span style="color: #339933;">=</span>tpass.<span style="color: #006633;">getText</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            st.<span style="color: #006633;">executeUpdate</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;INSERT INTO registros (usuarios, contraseña) VALUES ('&quot;</span> <span style="color: #339933;">+</span> usuario.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;nombre&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;','&quot;</span> <span style="color: #339933;">+</span> contra.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;contraseña&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;')&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asqlexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">SQLException</span></a> ex<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>ex<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span> </pre>
<p>Me da estos errores:<br />
&#62;&#62;hemos conectado con  jdbc:mysql://localhost/java ... Ok<br />
Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Uncompilable source code..........................</p>
<p>&#62;&#62;Column count doesn´t match valúe count at row 1</p>
<p>La cuenta de columna no empareja la cuenta de valor en la fila 1</p>
<p>El asunto es q no puedo ingresar los datos extraidos de un form, osea necesito ingresar 2 campos para luego iniciar una sesion con ellos. Tengo una clase llamada conexion y un BD con dos tablas hasta ahora. Si tienen un codigo lo agradeceria. Necesito mucha ayuda, soy nuevo con java y netbeans. Mil gracias...
</p></description>
		</item>
		<item>
			<title>fiurer87 on "manual de JAVA"</title>
			<link>http://www.dudasprogramacion.com/topic/manual-de-java#post-538</link>
			<pubDate>Thu, 01 Jul 2010 15:18:00 +0000</pubDate>
			<dc:creator>fiurer87</dc:creator>
			<guid isPermaLink="false">538@http://www.dudasprogramacion.com/</guid>
			<description><p>Buen libro:<br />
  - Como Programar en JAVA. Deitel &#38; Deitel.</p>
<p>JAVA:<br />
  - Usar el JDK en su ultima version, puedes descargar de la web de JAVA.</p>
<p>IDEs de desarrollo:<br />
  - BlueJ. Muy bueno para comenzar.<br />
  - Eclipse. Un entorno amigable..<br />
  - NetBeans. Un entorno serio y muy potente.
</p></description>
		</item>
		<item>
			<title>jeremias10 on "manual de JAVA"</title>
			<link>http://www.dudasprogramacion.com/topic/manual-de-java#post-537</link>
			<pubDate>Tue, 29 Jun 2010 17:58:08 +0000</pubDate>
			<dc:creator>jeremias10</dc:creator>
			<guid isPermaLink="false">537@http://www.dudasprogramacion.com/</guid>
			<description><p>SALU2 a todos los lectores, bueno la verdad es que ya termino el semestre en la universidad, y gane el curso de programacion en C++.<br />
ahora me toca el curso de JAVA, y la verdad quisiera saber todo lo de java, y me gustaria si pudieran darme un manual en español de JAVA, y si no es mucho pedir el software mas usado de JAVA, les agradezco sus ayuda gracias,
</p></description>
		</item>
		<item>
			<title>Torres on "como lograr isertar datos desde una pagina jsp"</title>
			<link>http://www.dudasprogramacion.com/topic/como-lograr-isertar-datos-desde-una-pagina-jsp#post-294</link>
			<pubDate>Mon, 11 Jan 2010 12:33:49 +0000</pubDate>
			<dc:creator>Torres</dc:creator>
			<guid isPermaLink="false">294@http://www.dudasprogramacion.com/</guid>
			<description><p>Buenas, </p>
<p>Si consigues recuperar los datos y mostrarlos en un jsp es que la conexión con BD funciona correctamente.</p>
<p>El problema debe de estar en la manera de hacer la inserción en BD, puede que te esté dando algún error, comprueba los logs y busca el error que se está produciendo.</p>
<p>Si no encuentras nada podrías pegar el código de la clase que utilizas para insertar para ver si está todo correcto.</p>
<p>Usas Java? algún framework de desarrollo? Struts? JSF?</p>
<p>Un saludo.
</p></description>
		</item>
		<item>
			<title>rodrigo alejandro campos ramos on "como lograr isertar datos desde una pagina jsp"</title>
			<link>http://www.dudasprogramacion.com/topic/como-lograr-isertar-datos-desde-una-pagina-jsp#post-290</link>
			<pubDate>Sun, 03 Jan 2010 02:14:37 +0000</pubDate>
			<dc:creator>rodrigo alejandro campos ramos</dc:creator>
			<guid isPermaLink="false">290@http://www.dudasprogramacion.com/</guid>
			<description><p>hola, mi problema como aparece en el titulo es como lograr poder insertar datos a una bd (mysql) desde una pagina jsp utilizando netbeans (toplink), para este trabajo utilizo a demas una clase pojo que trabaja con la unidad de persistencia  y creo que el metodo es el correcto, en la pagina jsp tambien creo tambien que es correcta no tengo errores he hecho todo lo que sale en internet  hacer las conexiones y utilizar los metodos correspondientes, en servicios(service) no se si tengo que hacer algo mas , por que lo mas bien que puedo rescatar datos y mostrarlos.<br />
espero que me explicacion sea lo mas entendible posible y los mas senior en esto me puedan ayudar.</p>
<p>          Atte Rodrigo Campos Ramos
</p></description>
		</item>
		<item>
			<title>nae_2210 on "como hago que el usuario suba una imagen al programa"</title>
			<link>http://www.dudasprogramacion.com/topic/como-hago-que-el-usuario-suba-una-imagen-al-programa#post-127</link>
			<pubDate>Thu, 04 Jun 2009 14:44:15 +0000</pubDate>
			<dc:creator>nae_2210</dc:creator>
			<guid isPermaLink="false">127@http://www.dudasprogramacion.com/</guid>
			<description><p>Estoy haciendo un pequeño programa para votaciones es un proyecto de la U y quiero que al inscribir un candidato me pida ingresar un nombre y subir una imagen y que luego esta se muestre en la label que le corresponde.....<br />
Como hago?....<br />
Me pueden ayudar porfa...<br />
yo creo que debe haber alguna forma para subile a la carpeta source del codigo fuente y luego recuperarle de ahi.... Si es asi indiquemen porfa como hacerlo y si no tambien gracias bye......<br />
estoy trabajando en netbeans 6.5
</p></description>
		</item>

	</channel>
</rss>

