Example usage for javax.swing JTextField subclass-usage

List of usage examples for javax.swing JTextField subclass-usage

Introduction

In this page you can find the example usage for javax.swing JTextField subclass-usage.

Usage

From source file MyTextField.java

class MyTextField extends JTextField {
    MyTextField(int len) {
        super(len);
        addKeyListener(new KeyAdapter() {
            public void keyPressed(KeyEvent evt) {
                int key = evt.getKeyCode();

From source file JTextFieldMaxLength.java

public class JTextFieldMaxLength extends JTextField {

    public JTextFieldMaxLength(int length) {
        this(null, length);
    }

From source file WatermarkTextField.java

public class WatermarkTextField extends JTextField {
    BufferedImage img;

    TexturePaint texture;

    public WatermarkTextField(File file) {

From source file Main.java

class MyTextField extends JTextField {
    MyTextField(int len) {
        super(len);
        addKeyListener(new KeyAdapter() {
            public void keyPressed(KeyEvent evt) {
                int key = evt.getKeyCode();

From source file Main.java

class MyComponent extends JTextField implements ItemSelectable {
    protected EventListenerList listenerList = new EventListenerList();

    public Object[] getSelectedObjects() {
        return new String[] { "a", "b", "c" };
    }

From source file PassiveTextField1.java

public class PassiveTextField1 extends JTextField {

    public static void main(String[] args) {
        JFrame f = new JFrame("Passive Text Field");
        f.getContentPane().setLayout(new BoxLayout(f.getContentPane(), BoxLayout.Y_AXIS));
        final JTextField ptf = new JTextField(32);

From source file PassiveTextField.java

public class PassiveTextField extends JTextField {
    public PassiveTextField() {
        this(null, null, 0);
    }

    public PassiveTextField(String text) {

From source file BoundedTextField.java

public class BoundedTextField extends JTextField implements BoundedPlainDocument.InsertErrorListener {
    public BoundedTextField() {
        this(null, 0, 0);
    }

    public BoundedTextField(String text, int columns, int maxLength) {

From source file Main.java

class WatermarkTextField extends JTextField {
    BufferedImage img;

    TexturePaint texture;

    public WatermarkTextField(URL file) {

From source file com.mirth.connect.client.ui.components.KeyStrokeTextField.java

public class KeyStrokeTextField extends JTextField implements KeyListener {

    private static final int[] modifierKeyCodes = new int[] { KeyEvent.VK_SHIFT, KeyEvent.VK_CONTROL,
            KeyEvent.VK_ALT, KeyEvent.VK_ALT_GRAPH, KeyEvent.VK_META };
    private static final int[] modifierMasks = new int[] { InputEvent.SHIFT_MASK, InputEvent.CTRL_MASK,
            InputEvent.ALT_MASK, InputEvent.ALT_GRAPH_MASK, InputEvent.META_MASK };