Package javax.swing.text

Examples of javax.swing.text.MaskFormatter


    JButtonMusteriGuncelle.setIcon(PSAUtil
        .getImageIconViaRelativePath("picture/kullaniciEkle.png"));
    JButtonMusteriGuncelle.setText("MÜŞTERİ BİLGİSİ GÜNCELLE");
    JButtonMusteriGuncelle.setFont(new Font("Tahoma", Font.BOLD, 15));

    MaskFormatter mf = null;
    try {
      mf = new MaskFormatter("(###) ### ## ##");
      mf.setPlaceholderCharacter('_');
    } catch (ParseException e) {
      e.printStackTrace();
    }

    cTextFieldTelNo = new CTextField(mf);
View Full Code Here


    cLabelFirmaTelNo = new JLabel();
    cLabelFirmaTelNo.setBounds(89, 160, 127, 21);
    cLabelFirmaTelNo.setText("Tel No");
    cLabelFirmaTelNo.setFont(new Font("Tahoma", Font.BOLD, 14));

    MaskFormatter mf = null;
    try {
      mf = new MaskFormatter("(###) ### ## ##");
      mf.setPlaceholderCharacter('_');
    } catch (ParseException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

    cLabelFirmaTelNo = new JLabel();
    cLabelFirmaTelNo.setBounds(89, 160, 127, 21);
    cLabelFirmaTelNo.setText("Tel No");
    cLabelFirmaTelNo.setFont(new Font("Tahoma", Font.BOLD, 14));

    MaskFormatter mf = null;
    try {
      mf = new MaskFormatter("(###) ### ## ##");
      mf.setPlaceholderCharacter('_');
    } catch (ParseException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

    JButtonMusteriEkle.setIcon(PSAUtil
        .getImageIconViaRelativePath("picture/kullaniciEkle.png"));
    JButtonMusteriEkle.setText("CARİ EKLE");
    JButtonMusteriEkle.setFont(new Font("Tahoma", Font.BOLD, 15));

    MaskFormatter mf = null;
    try {
      mf = new MaskFormatter("(###) ### ## ##");
      mf.setPlaceholderCharacter('_');
    } catch (ParseException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

    JLabel external = new JLabel("WAN IP address: " + extIP);
    JLabel internal = new JLabel("LAN IP address: " + intIP);
    JLabel portLbl = new JLabel("Enter TCP port:");
    JLabel numPlayerLbl = new JLabel("Number of Players:");
   
    MaskFormatter portFormat = new MaskFormatter("*****");
    portFormat.setValidCharacters("0123456789");
    portFormat.setPlaceholderCharacter('0');
    portFormat.setOverwriteMode(true);
    final JFormattedTextField portField = new JFormattedTextField(portFormat);
    portField.setText("07777");
   
    MaskFormatter numPlayerFormat = new MaskFormatter("*");
    numPlayerFormat.setValidCharacters("3456");
    numPlayerFormat.setOverwriteMode(true);
    final JFormattedTextField numPlayerField = new JFormattedTextField(numPlayerFormat);
    numPlayerField.setText("3");

    JButton start = new JButton("Start Server");
   
View Full Code Here

    JLabel ipLbl = new JLabel("Enter Host IP address");
    JLabel dot0 = new JLabel(".");
    JLabel dot1 = new JLabel(".");
    JLabel dot2 = new JLabel(".");
   
    MaskFormatter octetFormat = new MaskFormatter("***");
    octetFormat.setValidCharacters("0123456789");
    octetFormat.setPlaceholderCharacter('0');
    octetFormat.setOverwriteMode(true);
    final JFormattedTextField oct0 = new JFormattedTextField(octetFormat);
    final JFormattedTextField oct1 = new JFormattedTextField(octetFormat);
    final JFormattedTextField oct2 = new JFormattedTextField(octetFormat);
    final JFormattedTextField oct3 = new JFormattedTextField(octetFormat);
    oct0.setColumns(2);
    oct1.setColumns(2);   
    oct2.setColumns(2);
    oct3.setColumns(2);
   
    final JLabel portLbl = new JLabel("Enter Host TCP port");
   
    MaskFormatter portFormat = new MaskFormatter("*****");
    portFormat.setValidCharacters("0123456789");
    portFormat.setPlaceholderCharacter('0');
    portFormat.setOverwriteMode(true);
    final JFormattedTextField portField = new JFormattedTextField(portFormat);
    portField.setText("07777");
    JButton join = new JButton("Join Server");

    /**
 
View Full Code Here

        return getDateField(command);
    }
   
    public static JFormattedTextField getDateField(OutputCommand output)
    {
        MaskFormatter mask = getMaskFormatter("##/##/####");
        mask.setValueContainsLiteralCharacters(true);
        mask.setPlaceholderCharacter('_');
        DateVerifier verifier = new DateVerifier();
        JFormattedTextField field = new JFormattedTextField(mask);
        verifier.setOutput(output);
        field.setInputVerifier(verifier);
        return field;
View Full Code Here

    }
   
    public static JFormattedTextField getCPFField(OutputCommand output)
    {
       
        MaskFormatter mask = getMaskFormatter("###.###.###-##");
        mask.setValueContainsLiteralCharacters(false);
        mask.setPlaceholderCharacter('_');
        CPFVerifier verifier = new CPFVerifier();
        verifier.setOutput(output);
        JFormattedTextField field = new JFormattedTextField(mask);
        field.setFocusLostBehavior(JFormattedTextField.COMMIT);
        field.setInputVerifier(verifier);
View Full Code Here

        return getCNPJField(command);
    }
   
    public static JFormattedTextField getCNPJField(OutputCommand output)
    {
        MaskFormatter mask = getMaskFormatter("##.###.###/####-##");
        mask.setValueContainsLiteralCharacters(false);
        mask.setPlaceholderCharacter('_');
        CNPJVerifier verifier = new CNPJVerifier();
        verifier.setOutput(output);
        JFormattedTextField field = new JFormattedTextField(mask);
        field.setInputVerifier(verifier);
        return field;
View Full Code Here

        return field;
    }
   
    public static JFormattedTextField getTimeField()
    {
      MaskFormatter mask = getMaskFormatter("##:##");
      mask.setValueContainsLiteralCharacters(false);
      mask.setPlaceholderCharacter('_');
      OptionPaneOutputCommand command = new OptionPaneOutputCommand();
        command.setMessage("Hora inv�lida!");
      TimeVerifier verifier = new TimeVerifier();
      verifier.setOutput(command);
      JFormattedTextField field = new JFormattedTextField(mask);
View Full Code Here

TOP

Related Classes of javax.swing.text.MaskFormatter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.