Results 1 to 2 of 2
  1. #1
    owain1221 is offline Member
    Join Date
    Nov 2009
    Posts
    3
    Rep Power
    0

    Default If Statements with Jtextfield

    Basically i want to do a certain thing when my textfield is enabled here is the code (it doesnt work, but i think it explains wot i want to do better)
    Java Code:
    if (txtFruit1.setEnabled == true)
    		{
    			Fruit1 = rnd1.nextInt(3);
    			txtFruit1.setText(Fruit1 + " ");
    		}
    this is an if statement within another that works on a push of a button. any help?


    SOVLED NM
    Last edited by owain1221; 11-26-2009 at 11:08 PM. Reason: SOVLED DELETE

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Please try to describe in greater detail the problem you're trying to solve, not how you're trying to solve it.

    Much luck!

Similar Threads

  1. age: using if statements
    By yasmin k in forum New To Java
    Replies: 2
    Last Post: 10-04-2009, 10:50 PM
  2. Help with if-else statements
    By porchrat in forum New To Java
    Replies: 4
    Last Post: 03-23-2009, 05:24 PM
  3. Replies: 1
    Last Post: 01-30-2009, 07:44 PM
  4. Need help - using algorithm statements
    By javanewbie in forum New To Java
    Replies: 2
    Last Post: 07-23-2008, 12:20 PM
  5. Help with if else statements
    By zoe in forum New To Java
    Replies: 1
    Last Post: 07-24-2007, 08:56 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
  •