Package org.newdawn.slick.gui

Examples of org.newdawn.slick.gui.TextField


  public void init(GameContainer container) throws SlickException {
    state = new SavedState("testdata");
    nameValue = state.getString("name","DefaultName");
    ageValue = (int) state.getNumber("age",64);
   
    name = new TextField(container,container.getDefaultFont(),100,100,300,20,this);
    age = new TextField(container,container.getDefaultFont(),100,150,201,20,this);
  }
View Full Code Here


      app = (AppGameContainer) container;
      app.setIcon("testdata/icon.tga");
    }
   
    font = new AngelCodeFont("testdata/demo2.fnt","testdata/demo2_00.tga");
    field = new TextField(container, font, 150,20,500,35, new ComponentListener() {
      public void componentActivated(AbstractComponent source) {
        message = "Entered1: "+field.getText();
        field2.setFocus(true);
      }
    });
    field2 = new TextField(container, font, 150,70,500,35,new ComponentListener() {
      public void componentActivated(AbstractComponent source) {
        message = "Entered2: "+field2.getText();
        field.setFocus(true);
      }
    });
View Full Code Here

TOP

Related Classes of org.newdawn.slick.gui.TextField

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.