public class TextfieldInputStream extends InputStream implements KeyListener
InputStream
from which the contents of the
specified JTextField
can be read.Constructor and Description |
---|
TextfieldInputStream(JTextField textfield)
Creates a new input stream which reads from the specified JTextField
textfield . |
Modifier and Type | Method and Description |
---|---|
void |
keyPressed(KeyEvent e) |
void |
keyReleased(KeyEvent e) |
void |
keyTyped(KeyEvent e) |
int |
read() |
available, close, mark, markSupported, read, read, reset, skip
public TextfieldInputStream(JTextField textfield)
textfield
.textfield
- the textfield from which the content is readpublic int read() throws IOException
read
in class InputStream
IOException
public void keyPressed(KeyEvent e)
keyPressed
in interface KeyListener
public void keyReleased(KeyEvent e)
keyReleased
in interface KeyListener
public void keyTyped(KeyEvent e)
keyTyped
in interface KeyListener