Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: How do I gray out components, and prevent users from using them?

  1. #1
    Member
    Join Date
    Mar 2011
    Posts
    32
    My Mood
    Worried
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How do I gray out components, and prevent users from using them?

    Dear all

    hii please help me for that How do I gray out components, and prevent users from using them?


    thanks
    Diya


  2. #2
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: How do I gray out components, and prevent users from using them?

    Quote Originally Posted by diyaots View Post
    Dear all

    hii please help me for that How do I gray out components, and prevent users from using them?


    thanks
    Diya
    Explain "gray out components"

  3. #3
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: How do I gray out components, and prevent users from using them?

    Also, if you mean unable to perform any action by saying "gray out", you can use the methods inherited by java.awt.Component to enable or disable the components.

  4. #4
    Junior Member
    Join Date
    Dec 2011
    Location
    Land of Nords! (Norway)
    Posts
    6
    My Mood
    Mellow
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How do I gray out components, and prevent users from using them?

    button.setEnabled(false);

Similar Threads

  1. Java applet on web showing gray box
    By MyName in forum Java Applets
    Replies: 6
    Last Post: December 2nd, 2011, 03:53 PM
  2. Generate users id
    By sante in forum Algorithms & Recursion
    Replies: 5
    Last Post: October 6th, 2011, 12:29 PM
  3. java and blind users
    By micam001 in forum Member Introductions
    Replies: 1
    Last Post: June 27th, 2011, 04:27 AM
  4. How to Get users home directory
    By JavaPF in forum Java Code Snippets and Tutorials
    Replies: 0
    Last Post: September 2nd, 2010, 11:37 AM
  5. How to know number of user downloading an application?
    By jazz2k8 in forum Java Theory & Questions
    Replies: 2
    Last Post: July 3rd, 2008, 05:34 AM