Re: Document Filtering Question



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
.



Relevant Pages

  • Re: Umm odd behaviour !!
    ... Can someone explain how the call rw.gocan invoke void go, ... public void go{ ... Posted via NewsDemon.com - Premium Uncensored Newsgroup Service ... Unlimited Access, Anonymous Accounts, Uncensored Broadband Access ...
    (comp.lang.java.programmer)
  • Re: to get values passed to a method as its arguments - how?
    ... void myMethod(int a, int b) ... Posted via NewsDemon.com - Premium Uncensored Newsgroup Service ... Unlimited Access, Anonymous Accounts, Uncensored Broadband Access ...
    (comp.lang.java.programmer)
  • Re: Aqualunging?
    ... Posted via NewsDemon.com - Premium Uncensored Newsgroup Service ... Unlimited Access, Anonymous Accounts, Uncensored Broadband Access ... Country, I suppose. ... Actually I play in a few different venues. ...
    (rec.boats)
  • Re: Ill Stick to Boating, Thank-you...
    ... Posted via NewsDemon.com - Premium Uncensored Newsgroup Service ... Unlimited Access, Anonymous Accounts, Uncensored Broadband Access ...
    (rec.boats)
  • Re: Ill Stick to Boating, Thank-you...
    ... Posted via NewsDemon.com - Premium Uncensored Newsgroup Service ... Unlimited Access, Anonymous Accounts, Uncensored Broadband Access ...
    (rec.boats)