Home Here you can view your subscribed threads, work with private messages and edit your profile and preferences Registration is free! Frequently Asked Questions Search

HardwareDude.com Forum Index -> 3rd Party Software Disucssion

How do I gray out components, and prevent users from using t


Post new topic   Reply to topic

  Author    Thread
sri
Moderator
Moderator


Joined: 28 Jan 2006
Posts: 379
Location: Hyderabad , India


 Reply with quote  
How do I gray out components, and prevent users from using t

How do I gray out components, and prevent users from using them?
Every AWT & Swing component inherits methods that will enable and disable it, from java.awt.Component. The setEnabled(boolean) method allows a component to be disabled, and later enabled. Previously, AWT components could be enabled and disabled by calling their enable() and disable() methods. However, these methods have been deprecated, and should no longer been used.
// Disable button (b)
b.setEnabled ( false );
// Enable button (b)
b.setEnabled ( true );

- srikanth dhanwada

Post Wed Feb 08, 2006 9:47 pm 
 
  Display posts from previous:      



Post new topic   Reply to topic
Page 1 of 1



Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 



-Your Link Here-
Networking hardware and software solutions | web hosting directory
Powered by phpBB: © 2008 HardwareDude.com |Privacy | Terms of Service