Re: Document Filtering Question
- From: Chris <chrisliapis@xxxxxxxxx>
- Date: Wed, 28 May 2008 21:51:43 -0700 (PDT)
On May 28, 9:48 pm, Knute Johnson <nos...@xxxxxxxxxxxxxxxxxxxxxxx>
wrote:
Chris wrote:
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
Off and on since 1.0, a long time. I do a fair amount of GUI
programming as well as some graphic/animation work. I've used it long
enough though that I can usually slap something together if I know what
I want to have when I'm done :-). Hence the probing question.
--
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- Hide quoted text -
- Show quoted text -
Yea, definately seems so! Hey, thank you again...
.
- 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
- 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: JFrame resizing
- Previous by thread: Re: Document Filtering Question
- Index(es):
Relevant Pages
|