Example usage for javax.swing JFormattedTextField JFormattedTextField

List of usage examples for javax.swing JFormattedTextField JFormattedTextField

Introduction

In this page you can find the example usage for javax.swing JFormattedTextField JFormattedTextField.

Prototype

public JFormattedTextField(AbstractFormatterFactory factory) 

Source Link

Document

Creates a JFormattedTextField with the specified AbstractFormatterFactory.

Usage

From source file:org.biojava.bio.view.MotifAnalyzer.java

private JTextField getNumOfMotifs() {
    if (numOfMotifs == null) {
        try {/*from   w  w w.j a va 2  s.co m*/
            numOfMotifs = new JFormattedTextField(new MaskFormatter("##"));
        } catch (ParseException e) {
            e.printStackTrace();
        }
        numOfMotifs.setText("01");
    }
    return numOfMotifs;
}

From source file:org.biojava.bio.view.MotifAnalyzer.java

private JTextField getNumOfTrials() {
    if (numOfTrials == null) {
        try {//w  w w. j a  v a 2  s . com
            numOfTrials = new JFormattedTextField(new MaskFormatter("##"));
        } catch (ParseException e) {
            e.printStackTrace();
        }
        numOfTrials.setText("01");
    }
    return numOfTrials;
}

From source file:org.biojava.bio.view.MotifAnalyzer.java

private JTextField getMotifWidth() {
    if (motifWidth == null) {
        try {//ww w  . jav  a2s . c  o  m
            motifWidth = new JFormattedTextField(new MaskFormatter("##"));
        } catch (ParseException e) {
            e.printStackTrace();
        }
        motifWidth.setText("12");
    }
    return motifWidth;
}

From source file:net.jradius.client.gui.JRadiusSimulator.java

/**
 * This method initializes radiusAuthPortTextField  
 *  /*  w  ww .  ja va  2s.  com*/
 * @return javax.swing.JTextField   
 */
private JFormattedTextField getRadiusAuthPortTextField() {
    if (radiusAuthPortTextField == null) {
        radiusAuthPortTextField = new JFormattedTextField(getNumberFormatter());
        radiusAuthPortTextField.setValue(new Integer(1812));
    }
    return radiusAuthPortTextField;
}

From source file:net.jradius.client.gui.JRadiusSimulator.java

/**
 * This method initializes radiusAcctPortTextField  
 *  // w w w  . j a v a  2 s  .  co  m
 * @return javax.swing.JTextField   
 */
private JFormattedTextField getRadiusAcctPortTextField() {
    if (radiusAcctPortTextField == null) {
        radiusAcctPortTextField = new JFormattedTextField(getNumberFormatter());
        radiusAcctPortTextField.setValue(new Integer(1813));
    }
    return radiusAcctPortTextField;
}

From source file:net.jradius.client.gui.JRadiusSimulator.java

/**
 * This method initializes radiusRetriesTextField  
 *  /*from   w w  w  . jav  a 2  s  .c o  m*/
 * @return javax.swing.JTextField   
 */
private JFormattedTextField getRadiusRetriesTextField() {
    if (radiusRetriesTextField == null) {
        radiusRetriesTextField = new JFormattedTextField(getNumberFormatter());
        radiusRetriesTextField.setValue(new Integer(0));
    }
    return radiusRetriesTextField;
}

From source file:net.jradius.client.gui.JRadiusSimulator.java

/**
 * This method initializes requestersTextField  
 *  /*from  w w  w  . j  a v  a2s .co  m*/
 * @return javax.swing.JTextField   
 */
private JFormattedTextField getRequestersTextField() {
    if (requestersTextField == null) {
        requestersTextField = new JFormattedTextField(getNumberFormatter());
        requestersTextField.setValue(new Integer(1));
    }
    return requestersTextField;
}

From source file:net.jradius.client.gui.JRadiusSimulator.java

/**
 * This method initializes radiusRetriesTextField  
 *  /*from ww w .  jav  a2 s .c om*/
 * @return javax.swing.JTextField   
 */
private JFormattedTextField getRequestsTextField() {
    if (requestsTextField == null) {
        requestsTextField = new JFormattedTextField(getNumberFormatter());
        requestsTextField.setValue(new Integer(1));
    }
    return requestsTextField;
}

From source file:net.jradius.client.gui.JRadiusSimulator.java

/**
 * This method initializes radiusRetriesTextField  
 *  //from   w ww.  j a v  a 2 s . c o  m
 * @return javax.swing.JTextField   
 */
private JFormattedTextField getRadiusTimeoutTextField() {
    if (radiusTimeoutTextField == null) {
        radiusTimeoutTextField = new JFormattedTextField(getNumberFormatter());
        radiusTimeoutTextField.setValue(new Integer(10));
    }
    return radiusTimeoutTextField;
}

From source file:net.jradius.client.gui.JRadiusSimulator.java

/**
 * This method initializes radiusInterimIntervalTextField  
 *  /*from   w  w  w . j a  va 2s .c  om*/
 * @return javax.swing.JTextField   
 */
private JFormattedTextField getRadiusInterimIntervalTextField() {
    if (radiusInterimIntervalTextField == null) {
        radiusInterimIntervalTextField = new JFormattedTextField(getNumberFormatter());
        radiusInterimIntervalTextField.setValue(new Integer(60));
    }
    return radiusInterimIntervalTextField;
}