Jump to content

  • Log In with Google      Sign In   
  • Create Account


[java] limiting mouse and textfield stuff... read for info..


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 HearYouMe   Members   -  Reputation: 122

Like
Likes
Like

Posted 26 May 2001 - 06:06 AM

first thanks to everyone who posted in my other threads. anyway TextFields: is there a way to limit what people can type in them? like only numbers? or is there a way to set a max length allowed to be typed in? Mouse Stuff: Say that you move the mouse onto the applet... is there a way once its on there to limit like where the mouse can move? like only in a small box?

Sponsor:

#2 jwalker   Members   -  Reputation: 122

Like
Likes
Like

Posted 30 May 2001 - 11:53 AM

textfield :
not sure, try setColumns(int)

limits mouse:
dont think so.. since the mouse doesnt belong to the java system.

{ Stating the obvious never helped any situation !! }

#3 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 30 May 2001 - 04:33 PM

yes there is a way to control what they can put in a text field. I''ve never done it myself though, but I think I got the idea. It involves subclassing the component and intercepting messages. You''ll have to override some methods, I think they are the various process methods. (in newer versions, they have different names and parameters in the old versions) So you get the event and if it isn''t something you want them to type you just ignore it, otherwise you call super.methodInQuestion




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS