Disabled JButtons without grayed-out images

Hello,
I have a disabled button, and when I put an image in it, the image is grayed out. Is there anyway I can have the image remain as normal instead of becoming grayed-out?
Thanks in advance.
Troy

Just use the setDisabledIcon(Icon) method:
import javax.swing.*;
public class JButtonTest extends JFrame {
     private Icon icon = new ImageIcon("img.gif");
     private JButton button = new JButton(icon);
     public JButtonTest() {
          this.getContentPane().add(this.button);
          this.button.setDisabledIcon(this.icon);
          this.button.setEnabled(false);
          this.setSize(600, 400);
          this.setVisible(true);
          this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
public static void main(String[] args) {
          new JButtonTest();
}

Similar Messages

  • Disable button intermittently has blank image, instead of grayed out

    Every so often, we get a blank box the size of the gif image we use in a button when the button is disabled. If the button is then enabled, the gif image draws correctly, but then if it is disabled again, it goes back to a grayed out box instead of just a grayed out picture of an arrow in this case.
    The gif is a transparent gif and it seems that java when it disables it, just sets the whole image blank instead of just the non-transparent part. Anyone ever see something like this before?
    Peter Hayes

    What about AbstractButton.setDisabledIcon() ?

  • Library folders are Grayed out but images are there !?

    I have several interanl HDs.
    On one of them the images are divided into 2 folders
    1 personal
    2 work
    both have many sub folders
    I had just moved one folder from one sub folder to another using LR
    After which in the library module
    the work folder and all it's sub folders are grayed out and have no image totals
    however the images are viewable and load and can be worked on in Dev module.
    The image folders do not have question marks as they would if they could not be found.
    The images are where they should be when I look for them in the finder.
    The personal folder is functioning the same as the other
    but all it's subfolders are grayed and without totals
    The parent folder does have a total !
    I optimized the Catalog.
    I sync'ed  folders
    I shut down and restarted
    Nothing has changed
    I have no idea what to do.
    any thoughts ?
    D
    MacPro 3.0 ghz/ 10Gb ram/ OS 6.8/ LR3

    However I have a couple of grayed out folders with a question mark and "inval..." that are non-functional and nothing happens when I choose "remove".
    Try rebooting your computer.  In previous instances, that sometimes caused these phantom folders to disappear from Lightroom's folder pane.

  • Disable/Gray Out Delete Button in SRM

    Hi All,
    In the menu Shopping cart Status, I could able to see all the shopping cart.
    Now the requierment is , DELETE button should be disable/gray out  if there is any corresponding PO for that SC.
    Please let me know how to do this. I tried with BADI BBP_UI_CONTROL_BADI. But this will hide alll the SC's irrespective of PO's.
    Please let me know any other way to do this?
    I am working on SRM 5
    Regards,
    Nikhil V.Kumar

    Hi,
    Please try this
    <<Link farm removed>>
    Thank You,
    Thanks,
    AMS
    Edited by: kishan P on Aug 30, 2010 5:38 PM

  • How do I backup my MacBook Pro when the disk image is grayed out?

    I have a MacBook Pro (15 inc. four years old) running OSX 10.6.8 and last night I got the color pinwheel of death.  I could not force quit anything and had to manually power down.
    When I powered back up I got the folder with the question mark.  I ran Disk Utility and tried to Repair Disk, but I got:
    Disk Utility stopped repairing "diskOs2"
    ...Back up as many of your files as possible
    Details: Invalid B-tree node size
    The volume could not be verified completely
    Volume repair complete
    Error: Disk Utility can't repair this disk, Back up... at the disk, and restore your backed-up files
    I hooked up an external hard drive and tried to make a copy of the disk image, but it is grayed out.  I also tried to partition the main Hitachi drive and make a "New Image" but I got: "Unable to create backup (input/output error)
    So I now have a Genius Bar appointment for tomorrow, but I can't even back up my computer before going.  I can have them tell me what to do, but then I'll have to go home and do it, and then make a second appointment.
    Any suggestions?  Oh, and I backed up this computer about six weeks ago on Time Machine, but I'd love to make a copy of all new files I've created since then.
    Thanks!

    You have two options. Purchase Disk Warrior or erase the drive. The former would require your ability to install a download of DW on a bootable disk so you could repair your hard drive. And, DW costs $99.00. The latter requires a Snow Leopard installer DVD from which you can boot, erase the hard drive, then reinstall Snow Leopard. Then download and install Mac OS X 10.6.8 Update Combo v1.1. You can then restore from your Time Machine backup. There is no way now for you to backup files unless you can access the drive. Open Disk Utility, select the entry for your disk volume then click on the Mount icon in the toolbar. If your volume mounts on the Desktop then you may be able to copy files to an external drive or even run a Time Machine backup.

  • Wifi grayed out after update. Restored phone as new. How do I get data from iCloud without wifi?

    My wifi was grayed out and my battery drains drastically after updating to 6.1.3.
    I have tried all possible solutions to get my wifi back. However, nothing seems to work. I am now trying to (at least) get my battery back to normal. I read in other posts that restoring the iPhone as a new phone > drain battery > full charge might help.
    I did the restore as new phone and do not want to restore from back up. I just like to manually back up some (not all) data I've lost and keep my phone like this, like new. How do i back up my messages and photos from iCloud if my phone wont connect to wifi?
    Any ideas?
    Is there another way to get my photos and messages back aside from doing an iCloud backup?

    You can't view or extract backed up data at iCloud.com. AFAIK, without a WiFi connection, there is no way to retrieve your data. You'd need another iPhone to restore your iCloud backup to in order to retrieve it. Of couse this would require either doing an out of warranty replacement for your existing phone, ot borrowing a phone from someone, erasing it, then setting it up using your Apple ID.
    You could make an appointment at an Apple store to see what the genius bar can offer you.

  • After editing an image in Photoshop it appears grayed out inside the media browser

    After editing an image in Photoshop it appears grayed out inside the media browser when I try to import into Facebook (ie.).
    What has to be done in order for me to be able to select my edited images from Photoshop whithin any media browser?

    function(){return A.apply(null,[this].concat($A(arguments)))}
    LarryM01 wrote:
    ...save it as sRGB?
    Would you care to comment on why there is an advantage to do this little extra job?
    Perhaps you don't want to hear from me, I don't know.
    I'll answer just this one little question.  Try to get your mind around what color management does, I promise it does make sense (outside of unexplained problems on particular computers).
    You want to save your web image with the sRGB profile embedded because some Internet browsers are color managed, and with an embedded profile it's more likely someone will see your image colors just as you intended.
    The assumption is that a lowly windows user with a cheap monitor and Internet Explorer will be seeing any image you save as "roughly" sRGB anyway.  Tagging the image with sRGB only affects those with color-managed browsers.
    You're looking for the most possible consistency for the viewing audience.
    -Noel

  • Group image and text in pages grayed out

    group image and text in pages grayed out... any help please?

    They both have to be free floating objects ie an image/shape/table/chart/textbox not inserted in the text.
    Peter

  • Using photoshop elements 13 but the option to crop a single image is grayed out and also the option to crop a scanned image into individual pictures is grayed out - any ideas?

    The option to crop an image is always grayed out or unavailable - both for single images and when I want to crop scanned images into individual pictures. Any idea what I may be doing wrong?

    Did you try using the crop tool to see if it is working?  See the tool I am talking about.
    I suspect you are in Guided Mode rather than in Quick Mode or Expert Mode.

  • I've been using LR with my Nikon D3200 for a year or so. Shooting in RAW/NEF no issues with import etc until I updated LR and now I can't get LR to allow me to select when I try to import. It does show the images but they're grayed out and not able to be

    I've been using LR with my Nikon D3200 for a year or so. Shooting in RAW/NEF no issues with import etc until I updated LR and now I can't get LR to allow me to select when I try to import. It does show the images but they're grayed out and not able to be selected. Any thoughts? TIA

    Greyed imaged in the Import dialog box mean you have already imported the photos into Lightroom, so there is no need and no benefit to importing them a second time.
    Just go to the Library module, search for the desired photos, and resume working on these photos.

  • Why is the preview or scan images as separate files grayed out? When it was working just fine before

    I have windows 8...I have been using this scanner for about a month. My scan/fax/printer is a Brother MFC-8910DW. This is what brothers website says regarding this make and model. "Scan multi-page documents using the 50-page capacity auto document
    feeder or use the legal-size document glass for bound materials." For the Full month it has been scanning multiple pages using Microsoft scan a document or picture. I tried to scan this morning and it will now only let me scan ONE page at a time.(( I
    have to scan over 800 pages!!) On the lower left corner there is a box I was able to click previously it says preview or scan images as separate files. It is now grayed out and I am unable to select it. I know for a fact it has nothing to do with my printer
    because I use it for a month and it worked beautifully. Please could someone help with this issue?

    Hi,
    For this issue, I would suggest you update to the latest printer driver, if you have any other related printer\scanner programs installed, please make sure that you have the latest version or reinstall as a test.
    It's recommended to contact the manufacture for members there are more familiar with this product
    Brother Support
    http://www.brother-usa.com/askus/#.VA_jdFscSM8
    NOTE
    This
    response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you.
    Microsoft
    does not control these sites and has not tested any software or information found on these sites.
    Yolanda Zhu
    TechNet Community Support

  • Import of "image sequence" grays out when you select multiple jpg in Premier CC

    It worked jus fine untill a few days ago after the CC update. I even reset the number sequencing on my camera to try a test set of picture.  no matter what I do the "image sequence" check box grays out as soon as i click on multiple jpgs.
    any one ever have this occur?

    As joe bloe says, select only a single image file to enable the Image Sequence checkbox. Once you select multiple files, then the importer is set to import as multiple single still images. FYI, you can also select any file (other than the frst), if you wish to import a shorter range of files (eg: select 0040 to import an image sequence of frame 40 and on)

  • Using Cap6, need to create menu screen that allows user to click a button, branch to other screens, and return to main menu. When returning to the main screen the button that was clicked will be grayed out or inactive.  How do I do this?  I created image

    I am trying to emulate a piece of equipment.  I need the user to be able to click on specific buttons that will take the user to another screen(s).  After viewing those screens the user will be directed back to the main screen where the user would know which buttons had been pressed and which still needed to be pressed.  I create image buttons with the 3 states - that worked except when the user returns the slide is reset and so the user does not see the 3rd state of the button.  How can I get that 3rd state to stay after user returns to the main screen? 

    Hi Elizabeth,
    Since I just did this morning what you are currently attempting to do, I thought I'd share my method.  I must provide a disclaimer and tell you that I am not an expert in Captivate advanced actions--like you, I am still figuring them out.  However, I am happy to share here anything I have learned thus far.
    First, here is what my initial slide looks like (see interaction slide below).  I created all of the icons (including the 'grayed out' icon on the second screenshot) in a few minutes using Adobe Illustrator. The icons have been imported as custom multi-state buttons so that I could have the desired effect when the user hovers over the image--the yellow 'explore' flag appears only when the mouse is over the icon. When the learner click either image, they are sent to the corresponding slide.  Once both slides are viewed, a 'continue' button will appear at the base of the screen (something I've not figured out--I sent an email to Lieve begging for some guidance). 
    The initial slide (interaction slide):
    Second, here is a depiction of what happens when the learner returns to the interactive slide from the content slide (see image below):  Once the learner visits the 'Battery Content' slide and then returns to the interaction slide, the images have changed.  The multi-state button is hidden (through the advanced action), the replacement image (the image with the completed banner over it) is shown, and a hidden click box to allow the user to return to the previously visited page (just in case they desire to do that) is "shown" to allow navigation since the button is no longer there (because it is magically hidden).
    Content Slide 1:
    Remember, there may be an easier way to do this in Captivate.  I am using Cp6 for this module.
    1. I created two user variables as follows
    Name: v_batteryExplore
    Value: 0
    Name: v_fuelExplore
    Value: 0
    2. I created an advanced action for each as shown below (showing only one--duplicate the first and change the names to match the content):
    Credit: I learned these steps from @Lilibiri and Dr. Pooja Jaisingh!
    I have also noticed that it matters where the buttons are located on the timeline.  It seems best to have buttons above all other content.  Not sure why, but I have had images not appear when I have not done this.
    And the last step you do not want to forget; you need to remember to tell Captivate to use the action.
    As a final note, remember that the elements you do not want to appear on the initial screen must not be initially visible.  Make sure to set them to invisible by removing the checkmark in the 'Visible in output' box located next to the button name.  In my case, the image of the completed battery and the invisible button to allow a revisit of content was initially hidden.  Here is a final screenshot of my timeline for this interaction.  I hope this information helps you!

  • Need to disable/Grayed out Unreseve button for Order lines

    Hi All,
    In Back to Back order process once the order is progressed, the requisition will be created and Quantity will be reserved for PO to be received.
    Some of our users want go and Unreserve this by the below methods.
    1) Tools --> Scheduling --> Unreserve
    2) Right Click on the order line --> Scheduling --> Unreserve
    We need to Disable or Grayed out this Unreseve option for ATO Flagged lines.
    Can anyone let me know if this is possible.

    Ok , Ned , well your Guidance really worked , thanks alot for that.
    I made it work , though since i am very new to AS3 , i really had to experiment , here is the final Code :
    import flash.events.MouseEvent;
    stop();
    var note1:Mc_Notice1 = new Mc_Notice1;
    var note2:Mc_Notice2 = new Mc_Notice2;
    var notes:Array = [note1,note2];
    //var count:Array = new Array(1);
    var count:int;
    count = 0;
    btnload1.addEventListener(MouseEvent.CLICK , load1);
    btnload2.addEventListener(MouseEvent.CLICK , load2);
    function load1(Event:MouseEvent):void
      addChild(notes[0]);
      notes[0].x = 100;
      notes[0].y = 100;
      count ++;
      trace("Counter Value:" + count);
      if ( count == 2)
      btnnxt.addEventListener(MouseEvent.CLICK , nextframe);
    function load2(Event:MouseEvent):void
      addChild(notes[1]);
      notes[1].x = 100;
      notes[1].y = 100;
      count ++;
      if ( count == 2)
      btnnxt.addEventListener(MouseEvent.CLICK , nextframe);
      trace("Counter Value:" + count);
    function nextframe(Event:MouseEvent):void{
      trace("Mouse Enabled");
      nextFrame();
    Once again , Thanks alot for the help and Guidance
    Best Regards

  • Unable to rotate raw images in bridge, rotate buttons grayed out?

    Unable to rotate raw images in bridge, rotate buttons grayed out? 
    Bridge 5.0.2.4. 

    There is an ignore EXIF setting Preferences. I can't remember if that is Bridge or Photoshop, but IIRC it is for DNG files.
    Right.  Check Photosho > Preferences > File handling and make sure 'Ignore EXIF tag, is not checked.  I think that might do it, so long as it refers to sidecare files, because only RAW files would have one.

Maybe you are looking for

  • AP Report - discounts taken / lost report

    Hi Gurus I searched in the forum but couldnt find any, So I am posting a question. Is there a standard report to show discounts taken and discounts lost report for AP? Or is there any other report in which by changing the parameters and selections I

  • Automation of Purchase Order to Sales Order

    Hi all, Suppose I created a Purchase Order '123' and an IDOC has also been created for this PO. I would like the system to create a Sales Order for the same Purchase order I created in the same system. Can you all let me know the different solutions

  • Sound in older ga

    I have a SB Audigy and running Win2K SP4 and i would like to know if there is any way to get music in older games, mostly DOS based ones, they will run, but with no music or sound.

  • GoPro Black Footage to Premiere Elements issues

    I am trying (unsuccessfully) to bring footage from a GoPro Hero3+ Black into Premiere Elements 12. I have tried various things including using GoPro Studio to convert the MP4 files to CineForm AVI files but every way I've tried, the quality is sub pa

  • Transport fails: reason u201Cinactive infoObj", but infoobj are "active"

    Hi, In the attempt to move some transport requests from Dev to Quality, Basis reports of some errors: Error when checking the InfoObjectCatalog ZCCCCCCCCC  InfoObject ZXXXXXX is not available in active version InfoObject ZYYYYYY is not available in a