Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

Customising Swing JTextField

Thread view: 
David - 11 Nov 2006 19:33 GMT
Hi,

Im trying to create a custom text box. What I have done is inherited
from the JTextField class, and attached key listeners. However,
obviously swing is calling my listeners then processing the JTextFields
ones. Without using the formatter etc... I want to block key events
from being processed by JTextField. Any ideas how I can achieve this?
Ive tried looking at the source, but just cant seem to find any way to
do this apart from Key-Binding every key on the keyboard, which seems
insane. Im sure theres something easy im missing.

Thanks for the help

David
Richard Wheeldon - 11 Nov 2006 21:05 GMT
> Im trying to create a custom text box. Without using the formatter etc...

Why? What's wrong with JFormattedTextField?

Richard
hiwa - 12 Nov 2006 03:25 GMT
> Hi,
>
[quoted text clipped - 10 lines]
>
> David
Yours may be DocumentFilter's job.
Kenneth P. Turvey - 12 Nov 2006 03:48 GMT
> Hi,
>
[quoted text clipped - 6 lines]
> Key-Binding every key on the keyboard, which seems insane. Im sure theres
> something easy im missing.

On a related topic, I would like to move some spell checking code from a
class I have now into a SpellCheckedTextArea, so some pointers on how best
to subclass a TextArea would also be helpful.  Pointers to good references
would work as well.

Thanks.

- --
Kenneth P. Turvey <kt-usenet@squeakydolphin.com>


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.