Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , ,

Sponsored Links



How Can i achieve the functionality of TextListener for JTextField

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 25-10-2008
Member
 
Join Date: Oct 2008
Posts: 35
How Can i achieve the functionality of TextListener for JTextField

How can i achieve the functionality of the TextListener for JTextField.
Here TextListener is only applicable for TextField. Its not applicable for JtextFiled.

I need the same functionlity of textalueChaned() for JTextField.
Reply With Quote
  #2  
Old 25-10-2008
kelfro's Avatar
Member
 
Join Date: Apr 2008
Posts: 1,976
Re: How Can i achieve the functionality of TextListener for JTextField

Refer this:
http://www.iam.ubc.ca/guides/javatut...#texteventdemo
Reply With Quote
  #3  
Old 25-10-2008
Zecho's Avatar
Member
 
Join Date: May 2008
Posts: 2,267
Re: How Can i achieve the functionality of TextListener for JTextField

Compare the sample code at
http://mindprod.com/jgloss/textfield.html
with
http://mindprod.com/jgloss/jtextfield.html
Reply With Quote
  #4  
Old 25-10-2008
Member
 
Join Date: Oct 2008
Posts: 35
Re: How Can i achieve the functionality of TextListener for JTextField

Hi..
Thanks 4 ur reply.
Here i have to set the JtextField as setEditable(false) on which i am going to apply the functioality like TextListener. For this i want the Same funtionality.
Reply With Quote
  #5  
Old 25-10-2008
Member
 
Join Date: May 2008
Posts: 1,990
Re: How Can i achieve the functionality of TextListener for JTextField

I achieved the TextListener functionality by using myJTextField.addFocusListener( new MyFocusListener(this) );

...
class MyFocusListener implements FocusListener{...

The
public void focusLost( FocusEvent e )

method has similar functionality as the

void textValueChanged(TextEvent e)
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How Can i achieve the functionality of TextListener for JTextField"
Thread Thread Starter Forum Replies Last Post
Custom Background Icon for JTextField? melston Software Development 3 22-08-2010 01:02 PM
How to restore full functionality to a reduced functionality version of windows vista Jonstek117 Operating Systems 1 27-04-2010 11:26 AM
Display JtextField in Jpanel New ID Software Development 5 04-03-2010 12:01 PM
How to write a wrapper around the JTextField class? MAHAH Software Development 4 12-02-2010 07:01 PM
Get Date by JTextField Ash maker Software Development 5 12-02-2010 05:11 AM


All times are GMT +5.5. The time now is 12:02 PM.