LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 06-02-2006, 06:43 AM   #1
MRMadhav
Member
 
Registered: Nov 2005
Location: Mauritius
Distribution: PCQLinux, SUSE Linux,Fedora Core 5, Fedora Core 6, Knoppix Live, Kubuntu Edgy, PCLinuxOS
Posts: 167

Rep: Reputation: 30
Talking Making input - masked JTextField


Hi, I wanted to have a JTextField(or anything similar) to control the way the user inputs. For example i want to have a JTextField for entering date to display with the slashes and when the user types he cannot remove the slash but can freely modify the contents entered. I have seen somnething like this called Input-Masks in Access or VB6, am not sure which one, but the functionality that this provides will be very helpful! Any help will be greatly appreciated!
 
Old 06-02-2006, 07:29 AM   #2
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 50
To control the input format you can use JFormattedTextField which support the date format. You can extend it to suit your needs :
http://java.sun.com/j2se/1.4.2/docs/...TextField.html
 
Old 06-02-2006, 07:49 AM   #3
MRMadhav
Member
 
Registered: Nov 2005
Location: Mauritius
Distribution: PCQLinux, SUSE Linux,Fedora Core 5, Fedora Core 6, Knoppix Live, Kubuntu Edgy, PCLinuxOS
Posts: 167

Original Poster
Rep: Reputation: 30
Thanks mrcheeks, i will look into that one, actually i did not know that component existed! Am getting lazy these days! lolz
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gentoo (masked by: missing keyword) Jonatoon Linux - Software 7 01-07-2009 03:47 AM
why dont I get a new line with JTextField linuxmandrake Programming 6 04-10-2006 04:04 PM
Tooltip and JTextField MRMadhav Programming 3 02-23-2006 06:07 AM
SIGPROF is masked by select() .(in c) xiangbing Programming 2 01-08-2006 07:41 PM
....So im making my own input device.... poiuytrewq Linux - General 1 03-31-2005 04:32 AM


All times are GMT -5. The time now is 11:27 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration