Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 16-02-2009, 08:35 PM   #1 (permalink)
The Thread Killer >:)
 
phreak0ut's Avatar
 
Join Date: Apr 2006
Location: Bangalore
Posts: 1,185
Smile Greying out buttons in swing


How to grey out buttons after it is clicked in Swing? Like, when we click Apply, it's greyed out in most applications.
__________________
Want to make this world a better place? Then, start seeding and don't be just a leecher :)
phreak0ut is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 16-02-2009, 09:25 PM   #2 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,658
Default Re: Greying out buttons in swing

At the end of the operation performed, call buttonObject.setEnabled(false);

The question seems too trivial to ask, maybe you're looking for an automatic solution? In case of that, I do not know and I hope someone with proper Swing experience would come along and answer that.

P.s. Is there, by any chance or anything similar to, a formObject.isDirty() call? You could use that in a validator function that keeps listening.
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Old 16-02-2009, 09:36 PM   #3 (permalink)
The Thread Killer >:)
 
phreak0ut's Avatar
 
Join Date: Apr 2006
Location: Bangalore
Posts: 1,185
Default Re: Greying out buttons in swing

I'm still pretty new to Swing and don't have much idea as to what are the methods available. I'll try the one you suggested QM. It's like clicking on Apply after you chose your screensaver in Windows and the button greys out.
__________________
Want to make this world a better place? Then, start seeding and don't be just a leecher :)
phreak0ut is offline  
Old 01-03-2009, 11:17 AM   #4 (permalink)
The Thread Killer >:)
 
phreak0ut's Avatar
 
Join Date: Apr 2006
Location: Bangalore
Posts: 1,185
Default Re: Greying out buttons in swing

@QM your suggestion worked. Now, it's time to apply action listener to enable once the text boxes are filled and another button is clicked.
__________________
Want to make this world a better place? Then, start seeding and don't be just a leecher :)
phreak0ut is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java-Swing buttons - adding as array in loop problem ilugd Programming 6 14-07-2008 10:06 AM
No shutdown buttons VIRENKAY Software Q&A 5 17-07-2007 09:40 AM
Putting Buttons of Different shapes in VB karan.scorpion QnA (read only) 4 17-04-2007 05:09 PM
what are these 2 buttons on the mouse for? anubhavj1 Hardware Q&A 3 11-07-2006 07:30 PM
Learn :: USING JDBC(with ACCESS), AWT, & SWING in JAVA(JDK 1.5) imdbest Tutorials 1 11-07-2006 11:47 AM

 
Latest Threads
- by gforz
- by soumya
- by Sujeet
- by icebags
- by Charan

Advertisement




All times are GMT +5.5. The time now is 03:07 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2