Re: Document Filtering Question
- From: Chris <chrisliapis@xxxxxxxxx>
- Date: Wed, 28 May 2008 21:38:50 -0700 (PDT)
On May 28, 9:29 pm, Knute Johnson <nos...@xxxxxxxxxxxxxxxxxxxxxxx>
wrote:
This won't handle backspace and there are other issues but this does
what you said you wanted.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class test9 {
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JTextField tf = new JTextField(30);
tf.addKeyListener(new KeyAdapter() {
public void keyTyped(KeyEvent ke) {
System.out.print(ke.getKeyChar());
ke.consume();
}
});
f.add(tf,BorderLayout.CENTER);
f.pack();
f.setVisible(true);
}
});
}
}
What is the actual purpose of this?
--
Knute Johnson
email s/knute/nospam/
--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
Wow. Yea that does exactly what has been stumping me for a week. I
really cannot thank you enough. This is a small piece of an
application I am writing for an existing financial project Im trying
to build (not for a fee, for my business). If you wouldnt mind
answering one last question, how long have you been writing Java to
put this together so fast (and clean)?
Thank you again very much.
Chris
.
- Follow-Ups:
- Re: Document Filtering Question
- From: Knute Johnson
- Re: Document Filtering Question
- References:
- Document Filtering Question
- From: Chris
- Re: Document Filtering Question
- From: Knute Johnson
- Re: Document Filtering Question
- From: Chris
- Re: Document Filtering Question
- From: Knute Johnson
- Re: Document Filtering Question
- From: Chris
- Re: Document Filtering Question
- From: Knute Johnson
- Document Filtering Question
- Prev by Date: Re: Document Filtering Question
- Next by Date: Re: Document Filtering Question
- Previous by thread: Re: Document Filtering Question
- Next by thread: Re: Document Filtering Question
- Index(es):
Relevant Pages
|