mogers Posted May 9, 2009 at 09:35 PM Report #262747 Posted May 9, 2009 at 09:35 PM Boas, Eu encontrei uma biblioteca que me dava jeito mas só funciona com TextArea's e eu queria usar como simples caixa de texto. Existe alguma forma de limitar uma TextArea a uma linha? Ao definir uma TextArea com uma linha a única restrição é que só uma linha é visivel, mas o enter permite mudar de linha e não queria isso :/ "What we do for ourselves dies with us. What we do for others and the world, remains and is immortal.", Albert Pine Blog pessoal : contém alguns puzzles, algoritmos e problemas para se resolver com programação.
mogers Posted May 10, 2009 at 03:05 AM Author Report #262778 Posted May 10, 2009 at 03:05 AM Entretanto descobri, se der jeito a alguém no futuro, é assim: // impede o uso do enter, ficando uma TextArea de uma linha minhaTextArea.getInputMap(textArea.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"), "none"); "What we do for ourselves dies with us. What we do for others and the world, remains and is immortal.", Albert Pine Blog pessoal : contém alguns puzzles, algoritmos e problemas para se resolver com programação.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now