Package java.awt

Examples of java.awt.TextField$TextFieldKitImpl


    Panel panel = new Panel();
    panel.setLayout(new GridLayout(0, 2));

    panel.add(new Label(strings.get(Strings.NUM_COLORS)));
    numColorsField = new TextField(Integer.toString(numColors), 6);
    numColorsField.addKeyListener(this);
    panel.add(numColorsField);

    panel.add(new Label(strings.get(Strings.OUTPUT_COLOR_TYPE)));
    outputColorType = new Choice();
    outputColorType.add(strings.get(Strings.OUTPUT_COLOR_TYPE_PALETTED));
    outputColorType.add(strings.get(Strings.OUTPUT_COLOR_TYPE_RGB));
    outputColorType.select(paletted ? 0 : 1);
    panel.add(outputColorType);

    panel.add(new Label(strings.get(Strings.METHOD_REPR_COLOR)));
    reprColorMethod = new Choice();
    for (int i = 0; i < METHODS[0].length; i++)
    {
      reprColorMethod.add(strings.get(METHODS[1][i]));
      if (representativeColorMethod == METHODS[0][i])
      {
        reprColorMethod.select(i);
      }
    }
    panel.add(reprColorMethod);

    panel.add(new Label(strings.get(Strings.OUTPUT_QUALITY_IMPROVEMENT_ALGORITHM)));
    algorithms = new Choice();
    algorithms.add(strings.get(Strings.ALGORITHMS_NONE));
    algorithms.add(strings.get(Strings.ERROR_DIFFUSION));
    algorithms.add(strings.get(Strings.CONTOUR_REMOVAL));
    algorithms.select(1);
    algorithms.addItemListener(this);
    panel.add(algorithms);

    panel.add(new Label(strings.get(Strings.ERROR_DIFFUSION)));
    errorDiffusion = new Choice();
    for (int i = 0; i < ERROR_DIFFUSION_STRINGS.length; i++)
    {
      errorDiffusion.add(strings.get(ERROR_DIFFUSION_STRINGS[i]));
    }
    errorDiffusion.select(0);
    panel.add(errorDiffusion);

    panel.add(new Label(strings.get(Strings.CONTOUR_REMOVAL_NUM_PASSES)));
    numPassesField = new TextField(Integer.toString(numPasses));
    numPassesField.addKeyListener(this);
    panel.add(numPassesField);

    panel.add(new Label(strings.get(Strings.CONTOUR_REMOVAL_TAU)));
    tauField = new TextField(Double.toString(initialTau));
    tauField.addKeyListener(this);
    panel.add(tauField);

    add(panel, BorderLayout.CENTER);
View Full Code Here


    super(owner, strings.get(Strings.ADJUST_GAMMA), true);
    MAX_GAMMA = maxGamma;

    Panel panel = new Panel(new BorderLayout());
    panel.add(new Label(strings.get(Strings.ENTER_GAMMA_VALUE)), BorderLayout.CENTER);
    gammaTextField = new TextField(Double.toString(initialValue));
    gammaTextField.addKeyListener(this);
    panel.add(gammaTextField, BorderLayout.EAST);
    add(panel, BorderLayout.CENTER);

    panel = new Panel();
View Full Code Here

public class TextComponentTesterTest extends ComponentTestFixture {

    private TextComponentTester tester;
    private TextComponent tc;
    protected void setUp() {
        TextField tf = new TextField();
        tf.setColumns(10);
        tc = tf;
        tester = new TextComponentTester();
    }
View Full Code Here

    chatName.setText("Insert your chat name please: ");
    content.add(chatName, BorderLayout.NORTH);
   
    content_1 = new Panel();
    content_1.setLayout(new BorderLayout());
    tfName = new TextField(20);
    tfName.setBackground(Color.WHITE);
    tfName.setEditable(true);
    content_1.add(tfName, BorderLayout.WEST);
   
    ok = new JButton("OK");
    content_1.add(ok, BorderLayout.EAST);
    ok.addActionListener(this);
    content.add(content_1, BorderLayout.SOUTH);
    //End of chat name panel.
   
    //The chat panel.
    content2 = new Panel();
    content2.setLayout(new BorderLayout());
   
    content2_1 = new Panel();
    content2_1.setLayout(new BorderLayout());
    labelChat= new Label();
    labelChat.setText("Chat:");
    content2_1.add(labelChat, BorderLayout.NORTH);
   
    outputarea = new TextArea(30,30);
    outputarea.setEditable(false);
    content2_1.add(outputarea, BorderLayout.SOUTH);
    content2.add(content2_1, BorderLayout.NORTH);
    //End of the chat panel.
   
    //The input panel.
    content3 = new Panel();
    content3.setLayout(new BorderLayout());
   
    content3_1 = new Panel();
    content3_1.setLayout(new BorderLayout());
    labelChatInsert= new Label();
    labelChatInsert.setText("Insert your Message:");
    content3_1.add(labelChatInsert, BorderLayout.NORTH);
   
    inputfield = new TextField();
    content3_1.add(inputfield, BorderLayout.SOUTH);
    content3.add(content3_1, BorderLayout.NORTH);
    //End of the input panel.
   
    add(content, BorderLayout.NORTH);
View Full Code Here

  /**
   * startup method
   */
  public void init() {
    setLayout(new FlowLayout());
    add(in = new TextField("1+1", 16));
    add(out = new TextField("?", 16));
    add(calc = new Button("Calculate"));
    calc.addActionListener(this);

  }
View Full Code Here

                lblName.setFont(f);
                lblMemberID.setFont(f);
                lblLoyalPoint.setFont(f);

                txtMemberID = new TextField();
                txtName = new TextField();
                txtLoyalPoint = new TextField();

                Panel p = new Panel();
                p.setLayout(new GridLayout(3, 2, 0, 0));
                p.add(lblMemberID);
                p.add(txtMemberID);               
View Full Code Here

    lblPrice.setFont(f);
    lblBarCodeNo.setFont(f);
    lblReorderedQty.setFont(f);
    lblOrderedQty.setFont(f);
   
    txtProductId=new TextField();
    txtProductName=new TextField();
    txtDescription=new TextField();
    txtQtyAvailable=new TextField();
    txtPrice=new TextField();
    txtBarCodeNo=new TextField();
    txtReorderedQty=new TextField();
    txtOrderedQty=new TextField();
   
    Panel p=new Panel();
    p.setLayout(new GridLayout(8,2,10,20));
   
    p.add(lblProductId);
View Full Code Here

    lblchk.setFont(f);

    lblChkMember = new Label("Choose Member or Non-Member:");
    lblChkMember.setFont(f);

    txtMemberId = new TextField(15);
    FocusListener l = new FocusListener() {

      public void focusGained(FocusEvent e) {
        // TODO Auto-generated method stub

      }

      public void focusLost(FocusEvent e) {
        String id = txtMemberId.getText().trim();
        if (id.length() != 0) {
          try {

            member = appController.selectMember(id);
            if (member != null) {
              int point = appController.getMemberPoint(id);
              setlblDeemValue(Integer.toString(point));
            } else {
              MessageDialog m = new MessageDialog(mainForm,
                  "No Member", "This MemberID is not exist.");
              m.setResizable(false);
              m.setVisible(true);
              txtMemberId.setText("");
            }
          } catch (AppException ex) {
            MessageDialog m = new MessageDialog(mainForm,
                "Error Loading Category", ex.getMessage());
            m.setResizable(false);
            m.setVisible(true);
          }
        }
      }

    };
    txtMemberId.addFocusListener(l);

    txtBarCode = new TextField(15);
    txtQty = new TextField(3);

    txtDeemUsed = new TextField(3);
    l = new FocusListener() {

      public void focusGained(FocusEvent arg0) {
       
       
      }

      public void focusLost(FocusEvent arg0) {
        try {

          if (checkDeemPointAmt() == true)
            Calculate();
        } catch (Exception e) {
          MessageDialog m = new MessageDialog(mainForm,
              "Wrong Input Format", "Deem point must be Number.");
          m.setResizable(false);
          m.setVisible(true);
          txtDeemUsed.setText("0");
        }

      }
     
    };
    txtDeemUsed.addFocusListener(l);
   
    txtPaymentAmt = new TextField(10);
    l = new FocusListener() {

      public void focusGained(FocusEvent arg0) {
        // TODO Auto-generated method stub
       
View Full Code Here


                lblCategoryCode.setFont(f);
                lblCategoryName.setFont(f);

                txtCategoryName = new TextField();
                txtCategoryCode = new TextField();

                Panel p = new Panel();
                p.setLayout(new GridLayout(2, 2, 0, 0));
                p.add(lblCategoryCode);
                p.add(txtCategoryCode);
View Full Code Here

    lblPrice.setFont(f);
    lblBarCodeNo.setFont(f);
    lblReorderedQty.setFont(f);
    lblOrderedQty.setFont(f);
   
    txtProductId=new TextField();
    txtProductName=new TextField();
    txtDescription=new TextField();
    txtQtyAvailable=new TextField();
    txtPrice=new TextField();
    txtBarCodeNo=new TextField();
    txtReorderedQty=new TextField();
    txtOrderedQty=new TextField();
   
    Panel p=new Panel();
    p.setLayout(new GridLayout(8,2,10,20));
   
    p.add(lblProductId);
View Full Code Here

TOP

Related Classes of java.awt.TextField$TextFieldKitImpl

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.