<?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-5394700213004786731</id><updated>2024-10-24T05:51:19.860-07:00</updated><title type='text'>:::program your life ::: twitt@yon228</title><subtitle type='html'>Este blog esta hecho para ayudarte a programa, cualquier duda puede twittearme o mandarme inbox en facebook o por email</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mrtoymo.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5394700213004786731/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://mrtoymo.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Diego Toy Ramirez</name><uri>http://www.blogger.com/profile/14143810013275057472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgglK3DoJ_IV8U2JLZb4PEXe8AXkzea6r5xB9ZuyAdn7q8u6PZhOMyts3m4kgdduol9O6hEBoUDW4Dcfra0MrccK_WOsSiZIpuFDkP8RDQHk_SQHI6egEq4Uj6Pjf2g3sg/s220/DSC01617.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5394700213004786731.post-4198048601288396244</id><published>2012-09-04T08:46:00.001-07:00</published><updated>2012-09-04T08:48:31.235-07:00</updated><title type='text'>Como hacer cajas de texto y botones en java</title><content type='html'>&lt;br /&gt;
import javax.swing.*;&lt;br /&gt;
&lt;br /&gt;
public class Datos extends JFrame&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; JLabel Lb11 = new JLabel(&quot;Numero de control &amp;nbsp; &amp;nbsp;:&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JLabel Lb12 = new JLabel(&quot;Nombre &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JLabel Lb13 = new JLabel(&quot;Carrera &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// JTextField: clase de texto Amplitud determinada&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JTextField txt1 = new JTextField(8);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JTextField txt2 = new JTextField(8);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JTextField txt3 = new JTextField(8);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //botones&lt;br /&gt;
&amp;nbsp; &amp;nbsp; JButton btn =new JButton(&quot;Aceptar&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; JButton btn1 = new JButton (&quot;Cancelar&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public Datos()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super(&quot;Interfaz con cajas de texto&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;setSize(250,350);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JPanel pnl = new JPanel();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pnl.add(Lb11);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pnl.add(txt1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pnl.add(Lb12);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pnl.add(txt2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pnl.add(Lb13);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pnl.add(txt3);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pnl.add(btn);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pnl.add(btn1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;setContentPane(pnl);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public static void main (String a[]){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JFrame frm = new Datos();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;frm.setVisible(true);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mrtoymo.blogspot.com/feeds/4198048601288396244/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://mrtoymo.blogspot.com/2012/09/como-hacer-cajas-de-texto-y-botones-en.html#comment-form' title='1 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5394700213004786731/posts/default/4198048601288396244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5394700213004786731/posts/default/4198048601288396244'/><link rel='alternate' type='text/html' href='http://mrtoymo.blogspot.com/2012/09/como-hacer-cajas-de-texto-y-botones-en.html' title='Como hacer cajas de texto y botones en java'/><author><name>Diego Toy Ramirez</name><uri>http://www.blogger.com/profile/14143810013275057472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgglK3DoJ_IV8U2JLZb4PEXe8AXkzea6r5xB9ZuyAdn7q8u6PZhOMyts3m4kgdduol9O6hEBoUDW4Dcfra0MrccK_WOsSiZIpuFDkP8RDQHk_SQHI6egEq4Uj6Pjf2g3sg/s220/DSC01617.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5394700213004786731.post-3253791315605234917</id><published>2012-09-04T08:46:00.000-07:00</published><updated>2012-09-04T08:46:38.436-07:00</updated><title type='text'>Como crear botones en Java</title><content type='html'>&lt;br /&gt;
import javax.swing.*;&lt;br /&gt;
&lt;br /&gt;
public class Boton1 extends JFrame&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;//botones classe botones Titulo&lt;br /&gt;
&amp;nbsp; JButton btn =new JButton(&quot;Aceptar&quot;);&lt;br /&gt;
&amp;nbsp; JButton btn1 = new JButton (&quot;Cancelar&quot;);&lt;br /&gt;
&amp;nbsp; JButton btn2= new JButton (&quot;Other&quot;);&lt;br /&gt;
&amp;nbsp; //Boton inicia la interfas grafica&lt;br /&gt;
&amp;nbsp; public Boton1(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //poner nombre a la ventana&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;super(&quot;interfas con botones&quot;);&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//tamaño de la ventana&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;setSize(300,300);&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//panel: area de dibujo que acepta eventos del raton&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JPanel pnl=new JPanel();&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//Se agregan los botones del panel&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pnl.add(btn);&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pnl.add(btn1);&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pnl.add(btn2);&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//el area del dibujo se completa y no hay mas objetos&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;setContentPane(pnl);&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static void main (String a[])&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Boton1 obj = new Boton1();&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;obj.show();&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
}&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mrtoymo.blogspot.com/feeds/3253791315605234917/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://mrtoymo.blogspot.com/2012/09/como-crear-botones-en-java.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5394700213004786731/posts/default/3253791315605234917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5394700213004786731/posts/default/3253791315605234917'/><link rel='alternate' type='text/html' href='http://mrtoymo.blogspot.com/2012/09/como-crear-botones-en-java.html' title='Como crear botones en Java'/><author><name>Diego Toy Ramirez</name><uri>http://www.blogger.com/profile/14143810013275057472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgglK3DoJ_IV8U2JLZb4PEXe8AXkzea6r5xB9ZuyAdn7q8u6PZhOMyts3m4kgdduol9O6hEBoUDW4Dcfra0MrccK_WOsSiZIpuFDkP8RDQHk_SQHI6egEq4Uj6Pjf2g3sg/s220/DSC01617.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5394700213004786731.post-3337739199446057796</id><published>2012-09-04T08:43:00.002-07:00</published><updated>2012-09-04T08:43:26.141-07:00</updated><title type='text'>Como crear cajas de texto para meter datos Java</title><content type='html'>&lt;br /&gt;
import javax.swing.*;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class Texto1 extends JFrame{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//Se crean tres etiquetas y tres textos&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JLabel Lb11 = new JLabel(&quot;Nombre: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JLabel Lb12 = new JLabel(&quot;Direccion: &amp;nbsp; &amp;nbsp; &quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JLabel Lb13 = new JLabel(&quot;Telefono: &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// JTextField: clase de texto Amplitud determinada&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//pone automaticamente el nombre en la caja&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JTextField txt1 = new JTextField(&quot;Diego Ramirez&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//pone un limite de 80 carcateres&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JTextField txt2 = new JTextField(80);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JTextField txt3 = new JTextField(80);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public Texto1()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;super(&quot;Interfaz con cajas de texto&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;setSize(900,900);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JPanel pnl = new JPanel();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pnl.add(Lb11);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pnl.add(txt1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pnl.add(Lb12);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pnl.add(txt2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pnl.add(Lb13);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pnl.add(txt3);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;setContentPane(pnl);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public static void main (String a[]){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JFrame frm = new Texto1();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;frm.setVisible(true);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
}&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mrtoymo.blogspot.com/feeds/3337739199446057796/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://mrtoymo.blogspot.com/2012/09/como-crear-cajas-de-texto-para-meter.html#comment-form' title='3 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5394700213004786731/posts/default/3337739199446057796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5394700213004786731/posts/default/3337739199446057796'/><link rel='alternate' type='text/html' href='http://mrtoymo.blogspot.com/2012/09/como-crear-cajas-de-texto-para-meter.html' title='Como crear cajas de texto para meter datos Java'/><author><name>Diego Toy Ramirez</name><uri>http://www.blogger.com/profile/14143810013275057472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgglK3DoJ_IV8U2JLZb4PEXe8AXkzea6r5xB9ZuyAdn7q8u6PZhOMyts3m4kgdduol9O6hEBoUDW4Dcfra0MrccK_WOsSiZIpuFDkP8RDQHk_SQHI6egEq4Uj6Pjf2g3sg/s220/DSC01617.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5394700213004786731.post-3860675701216347199</id><published>2012-01-05T22:26:00.000-08:00</published><updated>2012-01-05T22:26:36.618-08:00</updated><title type='text'>Mismo programa que el anterior pero imprime el numero Menor y Mayor pongan atencion en los cambios</title><content type='html'>import javax.swing.*;&lt;br /&gt;
&lt;br /&gt;
public class Excepciones {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public static void main (String args[]) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String cadena1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;String cadena2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;String cadena3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;try{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cadena1 = JOptionPane.showInputDialog(&quot;Ingresa el primer numero&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int x = Integer.parseInt(cadena1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cadena2 = JOptionPane.showInputDialog(&quot;Ingresa el segundo numero&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int y = Integer.parseInt(cadena2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cadena3 = JOptionPane.showInputDialog(&quot;Ingresa el tercer numero&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int z = Integer.parseInt(cadena3);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JOptionPane.showMessageDialog(null,&quot;Los datos son correctos&quot;+&quot;\n&quot;+x+&quot;\n&quot;+y+&quot;\n&quot;+z);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Minor objeto1 = new Minor (x,y,z);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}catch(NumberFormatException a){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;JOptionPane.showMessageDialog(null, &quot;Los datos son incorrectos&quot;+a);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;}&lt;br /&gt;
-----------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
import javax.swing.*;&lt;br /&gt;
&lt;br /&gt;
public class Minor {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;protected int x;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;protected int y;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;protected int z;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public Minor(int x, int y, int z) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if ((x&amp;lt;y)&amp;amp;&amp;amp;(x&amp;lt;z))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;JOptionPane.showMessageDialog(null,&quot;El dato menor es:\n&quot;+x);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;else if ((y&amp;lt;x)&amp;amp;&amp;amp;(y&amp;lt;z))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; JOptionPane.showMessageDialog(null,&quot;El dato menor es:\n&quot;+y);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;JOptionPane.showMessageDialog(null,&quot;El dato menor es:\n&quot;+z);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; if&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;((x&amp;gt;y)&amp;amp;&amp;amp;(x&amp;gt;z))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;JOptionPane.showMessageDialog(null,&quot;El dato mayor es:\n&quot;+x);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;else if ((y&amp;gt;x)&amp;amp;&amp;amp;(y&amp;gt;z))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; JOptionPane.showMessageDialog(null,&quot;El dato mayor es:\n&quot;+y);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;JOptionPane.showMessageDialog(null,&quot;El dato mayor es:\n&quot;+z);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
}</content><link rel='replies' type='application/atom+xml' href='http://mrtoymo.blogspot.com/feeds/3860675701216347199/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://mrtoymo.blogspot.com/2012/01/mismo-programa-que-el-anterior-pero.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5394700213004786731/posts/default/3860675701216347199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5394700213004786731/posts/default/3860675701216347199'/><link rel='alternate' type='text/html' href='http://mrtoymo.blogspot.com/2012/01/mismo-programa-que-el-anterior-pero.html' title='Mismo programa que el anterior pero imprime el numero Menor y Mayor pongan atencion en los cambios'/><author><name>Diego Toy Ramirez</name><uri>http://www.blogger.com/profile/14143810013275057472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgglK3DoJ_IV8U2JLZb4PEXe8AXkzea6r5xB9ZuyAdn7q8u6PZhOMyts3m4kgdduol9O6hEBoUDW4Dcfra0MrccK_WOsSiZIpuFDkP8RDQHk_SQHI6egEq4Uj6Pjf2g3sg/s220/DSC01617.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5394700213004786731.post-8597872554116129734</id><published>2012-01-03T18:20:00.000-08:00</published><updated>2012-01-03T18:20:39.615-08:00</updated><title type='text'>Ejemplo de if/else y Excepciones en JCreator con Netbeans</title><content type='html'>Un programa de excepciones que ingrese tres numeros, los imprima e imprima el numero menor con una estructura de Netbeans, les recomiendo que no copeen el codigo si no que lo lean para que puedan entender un poco mas esto si no no nos sirve de nada, cualquier duda pueden preguntar.&lt;div&gt;//clase Men donde imprime el numero menor con uso de if&lt;/div&gt;&lt;div&gt;&lt;div&gt;import javax.swing.*;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;public class Men {&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//En esta clase declare las variables para poder imprimir un numero menor declarandolas con protected.&lt;/div&gt;&lt;div&gt;protected int x;&lt;/div&gt;&lt;div&gt;protected int y;&lt;/div&gt;&lt;div&gt;protected int z;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; public Men(int x,int y, int z) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//Aqui se hace el uso del if en caso de que sea el numero menor que otro numero&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//nos arroje un mensaje diciendo cual es el numero menor&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if ((x&amp;lt;y)&amp;amp;&amp;amp;(x&amp;lt;z))&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;JOptionPane.showMessageDialog(null,&quot;El dato menor es:\n&quot;+x);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//El uso de else if se utiliza en caso de que sea necesario utilizar mas if ya si si solo ponemos multiples if&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//y solo un else, nos arrojara un error por que no se puede poner un if sin un else entonces se complementa de esta forma&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;else if ((y&amp;lt;x)&amp;amp;&amp;amp;(y&amp;lt;z))&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;JOptionPane.showMessageDialog(null,&quot;El dato menor es:\n&quot;+y);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;else&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;JOptionPane.showMessageDialog(null,&quot;El dato menor es:\n&quot;+z);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;//clase con main en donde ingresamos datos e imprime los mismos con el uso de excepciones&lt;/div&gt;&lt;div&gt;&lt;div&gt;import javax.swing.*;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;public class Ecepciones {&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; public static void main(String [] args) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//Se declaran variables.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;String cadena1;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;String cadena2;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;String cadena3;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//Aqui se comiensa con el uso de la Excepcion utilizando primero el try&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//que nos indica que el dato es correcto y no nos envie la excepcion&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;try{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cadena1 = JOptionPane.showInputDialog(&quot;Ingrese el primer dato&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int x = Integer.parseInt(cadena1);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//En el uso del JOptionPane no nos permite declarar las variables con enteros (int)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//entonces se hace una convercion de datos con Integer.parseInt donde declaramos una nueva variable&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//y le decimos que la convercion que se hace a la variable (cadena1), y asi se hace la convercion con las demas.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cadena2 = JOptionPane.showInputDialog(&quot;Ingrese el segundo dato&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int y = Integer.parseInt(cadena2);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cadena3 = JOptionPane.showInputDialog(&quot;Ingrese el tercer dato&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int z = Integer.parseInt(cadena3);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;// Aqui imprimimos los datos en caso de que sean correctos la &quot;\n&quot; significa que nos de un salto de linea&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//o sea es como si precionaramos enter o algo asi&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JOptionPane.showMessageDialog(null,&quot;Los datos ingresados son:\n&quot;+x+&quot;\n&quot;+y+&quot;\n&quot;+z);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//Aqui mandamos llamar la clase Men (asi le puse como nombre jaja) y dentro del parentecis&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//decimos que nos imprima el numero menor correspondiente a la clase.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Men objeto1 = new Men (x,y,z);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//En esta parte nos hace la excepcion en caso que el usuario ingrese un dato que no sea numero o un entero, con&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//el NumberFormatException y la declaramos como a.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}catch(NumberFormatException a){&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//Aqui imprimimos la excepcion agregando el NumberFormatExcepcion y un mensaje.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;JOptionPane.showMessageDialog(null,&quot;El dato es incorrecto:\n&quot;+a);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mrtoymo.blogspot.com/feeds/8597872554116129734/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://mrtoymo.blogspot.com/2012/01/ejemplo-de-ifelse-y-excepciones-en.html#comment-form' title='2 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5394700213004786731/posts/default/8597872554116129734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5394700213004786731/posts/default/8597872554116129734'/><link rel='alternate' type='text/html' href='http://mrtoymo.blogspot.com/2012/01/ejemplo-de-ifelse-y-excepciones-en.html' title='Ejemplo de if/else y Excepciones en JCreator con Netbeans'/><author><name>Diego Toy Ramirez</name><uri>http://www.blogger.com/profile/14143810013275057472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgglK3DoJ_IV8U2JLZb4PEXe8AXkzea6r5xB9ZuyAdn7q8u6PZhOMyts3m4kgdduol9O6hEBoUDW4Dcfra0MrccK_WOsSiZIpuFDkP8RDQHk_SQHI6egEq4Uj6Pjf2g3sg/s220/DSC01617.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5394700213004786731.post-3149606270540375965</id><published>2011-11-12T22:01:00.000-08:00</published><updated>2011-11-12T22:01:31.402-08:00</updated><title type='text'>GAME¡¡¡¡¡¡</title><content type='html'>Unity una muy buena herramienta para la creacion y programacion de juegos en 2 y 3D aqui unos liks espero les sirva =)¡¡ :&lt;br /&gt;
&lt;a href=&quot;http://soundsresource.com/&quot; rel=&quot;nofollow nofollow&quot; style=&quot;background-color: white; color: #3b5998; cursor: pointer; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; font-size: 11px; line-height: 14px; text-align: left;&quot; target=&quot;_blank&quot;&gt;http://soundsresource.com/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.aviary.com/&quot; rel=&quot;nofollow nofollow&quot; style=&quot;background-color: white; color: #3b5998; cursor: pointer; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; font-size: 11px; line-height: 14px; text-align: left; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;http://www.aviary.com/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.spriters-resource.com/ds/E.html&quot; rel=&quot;nofollow nofollow&quot; style=&quot;background-color: white; color: #3b5998; cursor: pointer; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; font-size: 11px; line-height: 14px; text-align: left;&quot; target=&quot;_blank&quot;&gt;http://www.spriters-resource.c&lt;wbr&gt;&lt;/wbr&gt;&lt;span class=&quot;word_break&quot; style=&quot;display: inline-block;&quot;&gt;&lt;/span&gt;om/ds/E.html&lt;/a&gt;&lt;br /&gt;
la mejor de todas&amp;nbsp;&lt;a href=&quot;http://itween.pixelplacement.com/&quot; rel=&quot;nofollow nofollow&quot; style=&quot;background-color: white; color: #3b5998; cursor: pointer; font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; font-size: 11px; line-height: 14px; text-align: left;&quot; target=&quot;_blank&quot;&gt;http://itween.pixelplacement.c&lt;wbr&gt;&lt;/wbr&gt;&lt;span class=&quot;word_break&quot; style=&quot;display: inline-block;&quot;&gt;&lt;/span&gt;om/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://mrtoymo.blogspot.com/feeds/3149606270540375965/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://mrtoymo.blogspot.com/2011/11/game.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5394700213004786731/posts/default/3149606270540375965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5394700213004786731/posts/default/3149606270540375965'/><link rel='alternate' type='text/html' href='http://mrtoymo.blogspot.com/2011/11/game.html' title='GAME¡¡¡¡¡¡'/><author><name>Diego Toy Ramirez</name><uri>http://www.blogger.com/profile/14143810013275057472</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgglK3DoJ_IV8U2JLZb4PEXe8AXkzea6r5xB9ZuyAdn7q8u6PZhOMyts3m4kgdduol9O6hEBoUDW4Dcfra0MrccK_WOsSiZIpuFDkP8RDQHk_SQHI6egEq4Uj6Pjf2g3sg/s220/DSC01617.JPG'/></author><thr:total>0</thr:total></entry></feed>