Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By KevinWorkman

Thread: seting the location of a textfield

  1. #1
    Mr. Hyde's Avatar
    Mr. Hyde is offline Member
    Join Date
    Jun 2011
    Posts
    4
    Rep Power
    0

    Default seting the location of a textfield

    good afternoon,
    (this is my first post, so please I would love to hear feedback if I am somehow breaking protocol)

    I am working on creating an applet which is similar to the Oregon trail in its game play. I have created a text field however it always appears in the same spot in the applet setLocaton(int, int) & setLocation(point) have done absolutely nothing. does anyone know how I can move my text?
    this is what i have for code concerning the text field.

    Java Code:
                TextField inputLine = new TextField(30);
                inputLine.setForeground(Color.red);
                inputLine.setBackground(Color.green);
                inputLine.addActionListener(this);
                inputLine.setLocation(p);
                add(inputLine);
    thank you very much I appreciate any and all help that I can get.

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,932
    Rep Power
    8

    Default

    Mr. Hyde likes this.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Mr. Hyde's Avatar
    Mr. Hyde is offline Member
    Join Date
    Jun 2011
    Posts
    4
    Rep Power
    0

    Default

    thank you the problem hath been resolved & there was much rejoicing.

Similar Threads

  1. Won't set to textfield
    By Steffers in forum New To Java
    Replies: 7
    Last Post: 11-04-2010, 02:32 PM
  2. need to copy file from one location to another location
    By naveen.dpt2007 in forum New To Java
    Replies: 4
    Last Post: 02-28-2010, 03:53 PM
  3. location provider returns no location
    By sandeeprao.techno in forum CLDC and MIDP
    Replies: 0
    Last Post: 09-24-2009, 09:54 AM
  4. TextField Example
    By Java Tip in forum SWT
    Replies: 0
    Last Post: 07-25-2008, 02:21 PM
  5. JSP - getting value from a textfield
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-01-2007, 08:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •