Disabling icon in button

Hello everybody,
I'm trying to disable a button. This is what i'm doing:
btn.setDisabledIcon(btn.getIcon());
btn.setEnabled(false);
btn is the instance of JButton.
My button is getting disabled but it's color is not turning to gray. Can somebody help me out please.
Thank you in advance,

Hi all,
Thank you for your suggestions. It works and the button along with the icon becomes gray. Can anybody help me out in the following:
In the JBuilder, as soon as i save the files, 'save' button in the toolbar becomes disabled. When the button is disabled, what all i see is a disabled icon. I can't even make out that the icon is part of a disabled button which means button's boundaries are removed when the button is disabled. Can anybody help me out in achieving this?
In other words, this is what i'm trying to achieve:
when i say btn.setenabled(false), my button along with the icon is disabled. So in this state my user can make out that the disabled icon is sitting on a disabled button. Is there any way i can take out that button part by just making the 'disabled icon' sitting on the tool bar?
Thank you in advance

Similar Messages

  • [SOLVED] Firefox/GTK - How to disable the icons on buttons?

    I'm running GNOME 2.30 with Firefox 3.6.3.
    I have set: gtk-button-images = 0 in .gtkrc-2.0 (although I think it might be deprecated), as well as setting buttons_have_icons to false in gconf under /apps/desktop/gnome/interface.
    All other programs have icon-free buttons, but Firefox insists:
    [img]redacted[/img]
    Is there something I'm missing?
    Last edited by jasonwryan (2013-03-17 23:23:30)

    I'm not so sure ... I've tried all of the ~25 GTK themes I have installed, and they all still have icons, but only in Firefox.  All (most?) other GTK apps I've tried removed the button icons.
    I'm in Xfce now, and the situation is the same.  Look at the "Close" buttons in both sceens:
    Icons on buttons ENABLED:
    Icons on buttons DISABLED:
    So maybe this is a Firefox issue?
    Last edited by MkFly (2010-05-29 02:52:12)

  • How can i disable '+' icon in the toolbar

    Hi,
    I have one requirement i.e i want to disable '+' button[File-->New] in the toolbar.This button creates a record when i click on this.
    My block(Updatable block) should allows updations and insertions so i can't make insert_allowed and update_allowed property to "NO".I tried with
    APP_SPECIAL2.ENABLE('FILE.NEW',PROPERTY_OFF); but the + icon is still enabled when i write above code.
    How can i disable '+' icon in the toolbar
    Thanks in advance,

    This is eBusiness-related, maybe ask your question in the EBusiness-forum, maybe here OA Framework

  • How to disable the Save button For a pdf?

    Hi,
    I have a requirement that when you open the livecycle developed pdf, the Save option available in the toolbar (Save As icon) and File menu of the Reader should be disabled. A button will be provided in the form separately to provide the Save functionality. Can anybody help me reg. this? Is there any setting available for this in Adobe Pro or any other tool?
    Regards,
    Maria

    It's not really difficult to disable the save button. But it depends on the context from where you want to delete it. even if you disable the save button the user has the option to print screen and create a fresh pdf. So your question has some philosophical aspects to deal with. Please mail me at [email protected] incase of further quries. I've understood your problem and have got a solution but it's not somewhat legitimate to do. I can share it with you through email.

  • Qosmio X500 - How to disable beep and buttons?

    I have the x500 series and want to change a few things
    Disable the following;
    1^st^. Annoying beep when you press one of the shortcut buttons on the left (e.g. volume).
    2^nd^. Displayed shortcut buttons (e.g. mouse disable).
    - When playing a game and press one of the shortcut buttons (e.g. mute), it minimises the game and displays an annoying icon (mute).
    3^rd^. Shortcut buttons on the left of keyboard.
    - They are good buttons, when I'm not using them, they are very sensitive and accidently press them.

    Hello
    The beep sound of illumination buttons you can disable in BIOS (BIOS setup > Advanced > System Configuration). There is an option called Beep Sound.
    Generally speaking you can also disable all illumination buttons in BIOS, after this you will not see such shortcut buttons anymore but only disabling the icons only is not possible.

  • Changing background color in 'options'-content- colors hides icons and buttons at various sites

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [[/questions/895755]]</blockquote>
    This has been an ongoing fault through the versions of Firefox. A work around I discovered is to check- 'allow pages to choose own colors' then use no squint to color and then icons and buttons remain visible. This method is not an acceptable procedure and leaves the fields white. And also, a very annoying white flash when transitioning to another page.
    If you are one of the elite group of artists that strive for zero eye strain and love the beauty of a black background with light colored text and are mystified as to how to cure the problem here it is. Be sure to contact bugzilla.mozilla.org and report this bug.

    If you disable website colors and want to show your own colors then background images are hidden as well.<br />
    So buttons that use a background image aren't clearly visible anymore.<br />
    That setting is meant as an accessibility feature and as you've noticed, NoSquint works better as it uses a different way to achieve this.

  • Disable Right Mouse Button Popup Menu

    How can I disable right mouse button popup menu for a LabVIEW control to use
    my custom popup menu?
    Alessio Colzi

    Sorry for the stupid question but I forgot that option.
    Thank you Gorka
    Alessio
    "Gorka Larrea" ha scritto nel messaggio
    news:[email protected]..
    > Not sure if can be made under LV 6 but under LV 5.0 you can disable
    > runtime popup menu for all the vi under VI setup right clicking the
    > icon in the right part of the front panel.
    >
    > Another option is to put a transparent decoration over your control,
    > to avoid right clicking.
    >
    > Hope this helps

  • How to disable the minimize button on the JFrame?

    Does anyone know how to disable the "Minimize" button on the JFrame (Window)?

    Why bother using a JFrame at all? Just extend JDialog, and there won't be a minimize button to worry about at all. The only drawback is that a JDialog doesn't put an icon in the taskbar, so you have to move/close other windows until you can see the JDialog window on the desktop.
    The windowMinimized stuff doesn't let you stop what the window is doing -- you just get an event telling you what happened.

  • How can i disable a submit button and execute submit_action method on click

    Good Day,
    On my page I have a submit button that execute the submit_action method of the page backing bean that submit data captured on the page into a database and activate another class that send mail at the same time on a click of the submit button,the mail process takes a while before returning back to the page.I was able to disable the submit button to prevent the user from keep click while the process is running but the issue is on clicking the submit button it only disable the submit button without executing the submit_action method of the page backing bean.How can i disable the submit button and execute submit_method of the backing bean at the same time.
    Thanks in advance.

    I tried this out on one of my pages to see if it works.
    First, I added the following JavaScript to my submit button's onClick event:
    this.disabled=true; return true;When I clicked the submit button, it was disabled but the form was not submitted.
    I deleted the JavaScript from the onClick event and added the following JavaScript to the form's onSubmit event:
    var button = document.getElementById("form1:submitButton"); button.disabled=true; return true;When I click the submit button, it was disabled and the form was submitted but the button's action method was not called.
    The next thing I tried was to change the onSubmit event code:
    var button = document.getElementById("form1:submitButton"); setTimeout("button.disabled=true", 500); return true;This seemed to work. The difference was that I added a 1/2 second delay before disabling the button.
    See if that works for you. If not then I'm fresh out of ideas.

  • How can I disable the previous button in the first page and the next button in the last page?

    Hi all,
    I have created a new skin for a webhelp by modifying the layout and the buttons. However, I am not able to find a way where in we can
    disable the previous button ini the first page of the webhelp and hte the next page in the last page of the webhelp. If both the next and previous button is visibile in the first and last page, it is sort of misguiding the user.
    I am using Robohelp 9.
    Please advice.
    Thanks,
    Parag

    I think you are mixing Previous and Next in a browse sequence and the Previous and Next that you get in the browser itself.
    In a browse sequence, they are automatically disabled at the start and finish. When in the first topic in the sequence only Next will be enabled, when in the last topic only previous will be enabled.
    Previous and Next in the browser are working on the topics your user has viewed which is not the same thing.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How can I disable the Voicemail button on an iPhone 4

    How can I disable the Voicemail button on an iPhone 4 or
    if that is not possible can i programme it to dial my own phone rather than my carrier's Voicemail box?

    No, it's not possible to disable that button and no, it's not possible to reprogram it to anything else.

  • Is there a Way to lock apps or disable the home button?

    I often allow my 16 month old to play toddler games on my iPhone. He knows how to slide his finger to unlock the phone and he loves pressing and holding the home button to activate Siri so he can talk to her! LOL! I am worried that he will accidently delete or move an app to another screen by accident so is there a way to prevent that from happening. Also while he plays his games, he likes to press the home button which closes him out of his game. Is there a way to disable the home button so he can just stay within his toddler games?

    You can use Guide Access to restrict your child to using a single app. See:
    http://support.apple.com/kb/HT5509
    Regards.

  • How to disable the Tools Button in Bex Analyzer

    Hi Guys,
    How do I disable the Tools button only in Bex Analyzer so as to avoid the users messing with Query Designer.
    Thanks,
    Recca

    Recca,
    Can you do this via authoirsations instead?  ie. Allow two types of users, Designers who have access and Users who don't.
    User will be able to access the Query Desinger but have no access to create or save. That should suffice.
    If you start tweaking with the toolbar it may have wider negative implications.
    Regards
    Gill

  • Setting icon for buttons in labview 6i

    Hi All,
    Currently i am working on Labview 6i. i created two buttons in my vi one button is used to perform the test, another will be used to exit from the test. i would like to add icons for those buttons. can anyone tell me how to add icons for buttons.
    Thanks,
    kalpana

    You realize that LabVIEW 6.0 is at least 15 years old? That would be almost equivalent to working with a Windows 98 machine nowadays!
    Yes your picture can't be imported in LabVIEW 6.0 on my machine either. I haven't checked about all the details, but the LabVIEW import in 6.0 doesn't seem to work for png and gif images but only for bmp. Newer versions do work for your png file including honoring the transparency at least since version 7.1.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How do i disable a stop button within an event

    Using LabView 8.6 I'd like to disable my vi's stop button so the user can't stop the vi unless the network application is in the correct mode of operation.
    I only want the user to be able to stop the vi when it is ok to do so. What I tried works to prevent the stop button from operating at the wrong time but the vi does not always stop and I have to force the vi to stop.
    My event structure handles all the buttons and inputs for my vi. The event structure is within the while loop that generates commands for the network application when I click on one of the buttons or enter a value into a input field. Another while loop is reading data from the network application and displaying the data on the vi. I used a "Stop" local value to stop the display while loop.
    How am I supposed to disable the stop button but have my vi stop when it is ok to do so in the correct way?
    Attachments:
    Image 1.jpg ‏61 KB

    OK I'll try to handle this point by point.
    Q1, what gets wired to the "SilentShutdown" & "Discard?" when using "Application Instance Close?" 
    A1 Wire a TRUE to Discard?  That's the only thing that event case needs if the Stop condition output is default if unwired "F"   
    REASON you had a problem" it makes not sense to wire the same value to both Discard? and Silent Shutdown?  (Or even use both)  Discard in Filter events is used to "Trap" the event and decide if the app really wants to process it so discarding an app close removes the event and the OS wont process it.  Silient Shutdown? does just about the opposite an tru hear means "Shut down the app without any normal user prompts" Wiring them both T or F would trigger either allowing the app close event to process normally or triggering a application shutdown.
    COMMENT:  I've tried various combinations of nothing & true/false but clicking on the "Windows Red X" still closes the window (as far as I know no one has ever clicked the windows close, but the "Stop" button has been clicked a number of times by mistake)
    RESPONSE: Ah! You have "Trained" LabVIEW users!  They have been burned so often by LabVIEW code that they expect it to misbehave and don't even think about trying to "Close" a LabVIEW window.  In decades past the event structure did not exist in LabVIEW and so the only way to prevent the app close event from firing was "User Training."  There are better practices available now.
    Q2: If I get the previous suggestion to work and follow the next suggestion (Rip off the abort button), I won't be able to ever stop the vi when it hangs. It still does that sometimes. In my actual vi I'm still getting the hangs.
    Amplifications:
    if the vi stops[,] the network communication & control to the network application is lost.
    then the only way to stop this applications[external app on another processor] is with "^C" in the Putty window.
    A2: You've got the tail wagging the cart before the dog-horse!  BOTH application need to be rethought in such a manner as they can be independantly controlled.  But, this is a LabVIEW forum so I expect that your scope of work is to get the LabVIEW side working in a dignified manner- let's concentrate on that.  PuTTY windows and Task Managers are not evil - for debugging and integration.  especially when integrating multiple processes that may not yet be "Mature".  but a quick VISA write "^C" in your shutdown code might make the other application tolerable
    Q3hould I use a "Flat" or "Stacked" sequence to control the order of execution within the "data" loop?
    A3: NEITHER.  You should do a quick forum search for Queued State Machine or Queued Message Handler (QSM and QMH) after looking at the help for the QSM Sample Project (LabVIEW 2012 or later) the Shipping examples are a good place to start but! many discussion threads have questioned the example's exit practice and offered some alternate examples.
    Jeff

Maybe you are looking for

  • Printer driver for wireless model ESP 7250

    Looking for a driver for iPad to wireless kodak printer ESP 7250

  • Acrobat Reader for Sun Solarisu Intel platform

    Is there a version of Acrobat Reader there I can use on Solaris 8 Intel platform?? Thank you very much for your pointer!!

  • 5.1 AC3 downmixing to stereo

    Hi, I am currently working on a workflow to create my own AVCHD discs (Blu-Ray on a DVD-R) from my Sony SR11 without editing or transcoding in Premiere. I import the files directly into Encore after demuxing them using tsMuxer (I need to demux them f

  • Write Off Difference Automatically

    Hi Friends, Can anyone please help me out in knowing the functionality of  'Write Off Difference Automatically u2018 in F-32 t code which is for Clear Customer By selecting Write Off Difference Automatically u2018.the difference amount should get pos

  • Need help updating my creative cloud

    Hello Adobe community! I am a student in highschool. Last year, i bought Creative Cloud for one year and it has now expired. After looking around adobe.com, i found this option: http://www.adobe.com/offer-terms/edu_puf_promo.html. Does this mean I ca