Page 2 of 2 FirstFirst 12
Results 21 to 24 of 24
  1. #21
    Big Bundy is offline Member
    Join Date
    Mar 2011
    Posts
    42
    Rep Power
    0

  2. #22
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    Anything we say would only be re hashing what is covered in the tutorials.

  3. #23
    Big Bundy is offline Member
    Join Date
    Mar 2011
    Posts
    42
    Rep Power
    0

    Default

    Java Code:
       public static void main(String[] args){
     
    	JFrame f = new JFrame();
        f.setLayout(new BorderLayout());
     
         JTextField tf = new JTextField("You Won");
    	 f.add(tf, BorderLayout.SOUTH); //Changed
    	 f.pack();
         f.setVisible(false);
    Now since the visibility is set to false in my if statement needs to be true. How would you start the if condition. Im very new to this.

  4. #24
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    Why are you setting the value of the text field, why not set everything to be visible initially, then had a handler somewhere which decides when someone has won and sets the text fields value?

    You also may want to make the text field in editable with the setEditable(boolean) method.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Importing text data
    By gsashwin in forum New To Java
    Replies: 1
    Last Post: 06-21-2010, 07:16 PM
  2. Replies: 1
    Last Post: 04-26-2010, 01:02 PM
  3. Importing text into a word document
    By Frys82 in forum AWT / Swing
    Replies: 5
    Last Post: 08-24-2009, 08:41 PM
  4. Importing excel sheets into java application
    By blizzard in forum New To Java
    Replies: 1
    Last Post: 04-02-2009, 09:59 PM
  5. Regarding Text Field
    By adeeb in forum AWT / Swing
    Replies: 1
    Last Post: 06-05-2008, 11:01 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
  •