Results 1 to 4 of 4
  1. #1
    globo is offline Member
    Join Date
    Sep 2010
    Posts
    61
    Rep Power
    0

    Default Set TexField to false

    I added a JTextField to the south of the window.
    Now I want to make this textField set to false.

    cp.add(BorderLayout.SOUTH, new JTextField ("Starting..."));

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

  3. #3
    globo is offline Member
    Join Date
    Sep 2010
    Posts
    61
    Rep Power
    0

    Default

    Oh ok

    I mean I would to set that textfield to be non-editable.

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

    Default

    Quote Originally Posted by globo View Post
    I added a JTextField to the south of the window.
    Now I want to make this textField set to false.

    cp.add(BorderLayout.SOUTH, new JTextField ("Starting..."));
    If you want to make the JTextField non-editable, you probably don't want to create an anonymous object as you're doing above. Create a JTextField variable, either local if you're just going to need its reference locally or a class field if you need the reference for the entire object.

Similar Threads

  1. Checking if 2 things are false
    By ile4 in forum New To Java
    Replies: 4
    Last Post: 11-16-2010, 11:40 AM
  2. .setVisible(false); not working... grr...
    By Roclemir in forum New To Java
    Replies: 8
    Last Post: 05-29-2010, 01:22 AM
  3. can't get setVisible(false) to work
    By alexander.s in forum AWT / Swing
    Replies: 0
    Last Post: 04-27-2010, 09:33 PM
  4. resultset.next() = false ;; Can't Guess why.. please help.
    By Stephen Douglas in forum New To Java
    Replies: 11
    Last Post: 04-12-2010, 11:21 AM
  5. swirling becomes false,why?
    By arefeh in forum New To Java
    Replies: 2
    Last Post: 01-18-2010, 07:12 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
  •