Results 1 to 2 of 2
  1. #1
    Rocketz is offline Member
    Join Date
    Feb 2011
    Posts
    10
    Rep Power
    0

    Default JTextField Question

    First of all how do I get the text entered by a user from a JTextField?

    Second, if I'm adding a variable number of JTextFields to a panel in a for loop, how do I access the first one and then get the entered text, then the second, then the third for as many I make?

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,784
    Rep Power
    7

    Default

    First of all how do I get the text entered by a user from a JTextField?
    Read the Java API for the appropriate method.
    Second, if I'm adding a variable number of JTextFields to a panel in a for loop, how do I access the first one and then get the entered text, then the second, then the third for as many I make?
    Read the Java API for the appropriate method.

    Hint: they start with get.

Similar Threads

  1. JTextField Question
    By Kyle227 in forum New To Java
    Replies: 5
    Last Post: 05-09-2010, 07:44 AM
  2. JTextField
    By gancio in forum AWT / Swing
    Replies: 20
    Last Post: 08-26-2009, 03:11 PM
  3. JTextField question
    By Chasingxsuns in forum New To Java
    Replies: 5
    Last Post: 07-14-2009, 02:39 AM
  4. Replies: 1
    Last Post: 01-30-2009, 06:44 PM
  5. JtextField
    By kashifu in forum Advanced Java
    Replies: 2
    Last Post: 06-27-2008, 04:25 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
  •