Article View: es.comp.lenguajes.java
Article #877Re: Hola
From: Eduardo Yáñez Parareda
Date: Wed, 29 Nov 2006 14:49
Date: Wed, 29 Nov 2006 14:49
18 lines
1592 bytes
1592 bytes
> hola!! buen d�a! sabes que prob� con keyReleased y con keyPressed y
> no cambia =(
Viendo tu c�digo:
public void keyTyped(KeyEvent e) {
TxtNombre.getText().toUpperCase();
}
Yo veo que esta l�nea no cambia el texto que haya en el JTextField, ni a may�sculas
ni a nada.
TextNombre.setText(TxtNombre.getText().toUpperCase())
s� cambia el texto que haya en el text field....
�ves la diferencia? getText().toUpperCase() devuelve un String, no cambia el String, un
String NUNCA lo puedes modificar.
Technical Details
Message-ID:
<4t5l6qF12b1mkU1@mid.individual.net>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<1164657327.874163.214000@n67g2000cwd.googlegroups.com> <456c3f35$1_3@filemon2.isp.telecable.es> <1164726617.595188.320470@l39g2000cwd.googlegroups.com> <456c685c$1_4@filemon1.isp.telecable.es> <1164805622.883995.251040@n67g2000cwd.googlegroups.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1116f3,929f842255d4c44f X-Google-Attributes: gid1116f3,public X-Google-Language: SPANISH,ASCII Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Eduardo Yáñez Parareda <eduardo.yanezNOSPAM@NOSPAMgmail.com> Newsgroups: es.comp.lenguajes.java Subject: Re: Hola Date: Wed, 29 Nov 2006 15:49:01 +0100 Lines: 18 Message-ID: <4t5l6qF12b1mkU1@mid.individual.net> References: <1164657327.874163.214000@n67g2000cwd.googlegroups.com> <456c3f35$1_3@filemon2.isp.telecable.es> <1164726617.595188.320470@l39g2000cwd.googlegroups.com> <456c685c$1_4@filemon1.isp.telecable.es> <1164805622.883995.251040@n67g2000cwd.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net LzXJiwJm3Z1azqnL9nBSTAulo8/VNDYY3jy7M21YexNkJKWujR User-Agent: Thunderbird 1.5.0.8 (X11/20061107) In-Reply-To: <1164805622.883995.251040@n67g2000cwd.googlegroups.com>