Change tab icon when you clicked

is it possibleto change the icon of a tab in a JTabbedPane when it is selected ??
and if so how can we do it??
Thanks

is it possibleto change the icon of a tab in a JTabbedPane when it is selected ??yes, it is
and if so how can we do it??With JTabbedPane's setIconAt(int index, Icon icon) method
Thanksthere you go!

Similar Messages

  • Decorator not changing when you click on listitem

    Dear,
    I'm developing a mobile application for my thesis and I was working with flash builder burrito. I now installed the new SDK and flashbuilder 4.5.
    I changed my code a little bit so it would work with the new SDK.
    But there's one problem I can't solve.
    I have a list with objects in it. When the element is not checked you can see a gray V, when you click on it it should become a green V. So the user can see wich one is checked and wich not. Here for I use a list with an itemrenderer.
    The problem is when he loads the page he can set the decorator correctly. But when you click on a listitem he doesn't change the decorator.
    I've allready tried to debug , and the debugger is going to the itemrenderer and setting the decorator but de decorator doesn't change in my list.
    I made a small example to show:
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
              xmlns:s="library://ns.adobe.com/flex/spark" title="Home"
              initialize="init()">
         <fx:Script>
              <![CDATA[
                   import mx.collections.ArrayCollection;
                   [Bindable]
                   private var m_list:ArrayCollection = new ArrayCollection();
                   private function init():void
                             for(var i:int = 0 ; i<5 ; i++)
                                  var test:SelectableItem = new SelectableItem("Item"+i);
                                  m_list.addItem(test);
                   protected function list1_clickHandler(event:MouseEvent):void
                        SelectableItem(m_list.getItemAt(listID.selectedIndex)).toggleSelection();                              
              ]]>
         </fx:Script>
         <s:List id="listID"
                   x="0" y="99" width="480" height="596"
                   dataProvider="{m_list}"
                   itemRenderer="views.ListItemRenderer"
                   click="list1_clickHandler(event)"/>
    </s:View>
    This is my class:
    package views
         public class SelectableItem
              private var m_name:String;
              private var m_selected:Boolean;
              public function SelectableItem(name:String,selected:Boolean = false)
                   m_name = name;
                   m_selected = selected;
              public function get name():String
                   return m_name;
              public function set name(value:String):void
                   m_name = value;
              [Bindable]
              public function get selected():Boolean
                   return m_selected;
              public function set selected(value:Boolean):void
                   m_selected = value;
              public function toggleSelection():void
                   selected = !selected;
    and here is my itemrenderer:
    <?xml version="1.0" encoding="utf-8"?>
    <s:IconItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                             xmlns:s="library://ns.adobe.com/flex/spark"  iconWidth="64" iconHeight="64"
                             labelFunction="itemLabelFunction">
         <fx:Script>
              <![CDATA[
                   [Embed(source="checked.png")] 
                   public var checked:Class;
                   [Embed(source="unchecked.png")]
                   public var unchecked:Class;
                   override public function set data(value:Object):void
                        super.data = value;
                        if(value != null)
                             if(value.selected)
                                  decorator = checked;
                                  setStyle("color", "red");
                             else
                                  decorator = unchecked;
                                  setStyle("color", "black");
                   private function itemLabelFunction(item:Object):String
                        return item.name;
              ]]>
         </fx:Script>
    </s:IconItemRenderer>
    As you can see I also use setStyle and change the color when you click it. This is because that works. This is only temporary offcourse.
    And I think that's a strange thing that setStyle does work but setting the decorator to a new image doesn't.
    I hope my question was clear and that someone can help me.
    Thanks in advance.
    Kind regards,
    Thibault Heylen

    I believe this was the bug: http://bugs.adobe.com/jira/browse/SDK-29929
    It will be fixed in the next release of Flex.

  • I would suggest a new feature:The possibilty to change the mouse pointer icon when you hover on an a

    I would suggest a new feature:The possibilty  to change the mouse pointer icon when you hover on an active link by any other one icon I select.

    Current Firefox versions have a feature called tear-off tabs.<br />
    You can detach a tab from the current window and open it in a new window by dragging a tab in the browser window.<br />
    You can drag that tab back to the tab bar in the original window to undo that detaching.
    bug489729 (Disable detach and tear off tab):
    * https://addons.mozilla.org/firefox/addon/bug489729-disable-detach-and-t

  • Please help. My facebook app will not open on my iphone 4. I deleted it,numerous times and downloaded it again. It uploads, but when you click on the icon, it flickers then closes.  Help.

    Please help. My facebook app will not open on my iphone 4. I deleted it,numerous times and downloaded it again. It uploads, but when you click on the icon, it flickers then closes.
    Help.

    Then the next step would be to restore your phone.  My advice is that prior to restoring you import your photos and videos to your computer and back up your contacts (by syncing them with iCloud or to a supported program on your computer using iTunes) as a number of users report losing these when restoring their device.

  • Where does it go when you click on the Calendar icon beside the date field?

    Hi,
    Does anybody know what page or region does it go when you click on the Calendar icon beside a date field? I need to know how it generates the list of values for year.
    Need your help. ASAP. If you need to know more about my inquiry please email me, [email protected]
    Thanks.

    It's a Date bean and it is UIX which generates the java script to pop open the dialog box and the UI. I donot think there will be any public document available on the implementation.

  • Blackberry App World won't open when you click on icon

    Blackberry App World won't open when you click on icon, I have done reboot and batt pull and redownloaded - any ideas

    Hello scottex968, 
    Welcome to the forums. 
    In this case we can try to reload the software on the BlackBerry® smartphone to make sure it is running the latest version and there are no issues with the OS.
    Here is how to backup your BlackBerry smartphone http://bbry.lv/oPVWXc
    Once you have backed up your BlackBerry smartphone please follow the link below to complete a clean reload of the BlackBerry smartphone software.
    Link: http://www.blackberry.com/btsc/KB03621
    Once completed test it and proceed with a selective restore, here is how to restore http://bbry.lv/qgQxLo
    Thank you
    -SR
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • I am trying to use the brightness adjustment on a grayscale photoshop CS6 file.  The preview shows the adjustment working and changes the brightness, but when you click to apply the change, it does not apply the adjustment.  I have run into this problem b

    I am trying to use the brightness adjustment on a grayscale photoshop CS6 file.  The preview shows the adjustment working and changes the brightness, but when you click to apply the change, it does not apply the adjustment.  I have run into this problem before, although rarely, with some other files over the years and with earlier versions of CS.  I would like to know how to overcome this problem?

    Make sure you are viewing your image at 100%. At smaller views, pixels and layers and the way they interact are approximate interpolations and won't show you the actual pixel-for-pixel changes.

  • When you click on an icon on your dock...

    when you click on an icon on your dock how many times does it bounce up and down before the program actually opens up? because i just ordered 2gb of ram and it seems slower than when i had 512mb

    I know Firefox does this weird thing where it shows up and bounces, then goes away (quit) then opens up again and works fine. This usually happens to me when I first install it or upgrade to a new version.
    There is actually a bounce limit. I used a PowerMac G5 with some problems where the apps would just keep bouncing and never open. Eventually they would get tired and stop bouncing, not open, but right-clicking showed "Application not responding" in the menu.

  • I'm in Safari, is there a way to change the order when you right click a link? Just upgraded to Mavrick OS

    I'm in Safari, is there a way to change the order when you right click a link? Just upgraded to Mavrick OS

    You can do that with the Menu Editor extension - https://addons.mozilla.org/firefox/addon/menu-editor/
    This extension has not been updated by its author in a couple of years, but another developer has updated it for Firefox 4, you can get the updated version from http://netticat.ath.cx/MyAddons/MyAddons.htm#3rdpartyaddons

  • Original iphone displays under devices but when you click on it nothing happens, no summary tab,etc

    My original iphone displays under devices in ITUNES but when you click on it nothing happens

    This issue can be caused by the Ask<i></i>.com toolbar (Tools > Add-ons > Extensions)
    Your system details show that toolbar in the user agent as AskTbLPY/3.12.2.16749
    See:
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Why can't I get the image to view larger when you click on a thumbnail?

    I thought that there was a way to have the image open up larger in a new little window when you click the thumbnail on a photos page....when I click a thumbnail on my photos page it takes me right to slideshow view and the images are displayed too small to see fine detail (I am a retoucher, so my clients need to be able to see hi res images) I can't find a way to change the size of the slideshow images or to get my thumbnails to click open to a hi res version in a new window. The only solution I can think of is to use a blank template page, make each small image a link to a hidden page with the image at hi resolution....but this would take forever and I would have a gazillion pages on my site that way. Any idea how to get around this. Seems like the older version of iweb didn't have this problem...????
    (for an example of what I mean, my site: http://www.katesilsby.com (retouch page) and what old iweb did and what I want to happen: http://web.mac.com/vogier/iWeb/vivian%20ogier/wardrobe.html

    (for an example of what I mean, my site: http://www.katesilsby.com (retouch page) and what old iweb did and what I want to happen: http://web.mac.com/vogier/iWeb/vivian%20ogier/wardrobe.html
    iWeb2 photos page is completely different from that of iWeb1.
    iWeb2 photos page can be retro back to iWeb1, but not without major javascript coding.
    or using completely different previewing method for larger image, example: http://hdl.50webs.com/Lytebox/Photos.html

  • Display the second report as modalform and filter with primary key value of first report when you click on first report column link

    Hi All,
    I have two reports.
    1. order report
    2. order detail report
    when you click on the order report column it display the order detail report as a modal form.
    i was done below steps.
    1. In page header i was written the below code
    <link rel="stylesheet" href = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/
    redmond/jquery-ui.css" type="text/css" />
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"> </script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"> </script>
    <script type="text/javascript">
    $( function() {
    $('#ModalForm1').dialog(
    autoOpen : false ,
    width :470,
    height: 500,
    resize :false,
    function openForm1()
    $('#ModalForm1').dialog('open');
    function closeForm()
    $('#ModalForm1 input[type="text"]').val('');
    $('#ModalForm1').dialog('close');
    </script>
    2. order report.
    3. order detail report
       select * from order_details where order_id = p_order_id;
    region header
    <div id="ModalForm1" title="Ordered Items" style="display:none">
    <p class="msg"></p>
    footer
    </div>
    4. created the hidden item in order detail report.
    5. in order report column attributes i was given link like below.
    javascript:$s('p_order_id','#order_id#');openForm1();
    when i click on the order report column link it passing the row primary key value to hiddent and open the report as modal form. however it is not filter the report with hidden item. it showing the no data found.
    problem is hidden item value is not submitting. once we submit that value it showing the 2nd report with filter data.
    can any help me to achieve above requirement.
    apex: 4.2
    oracle 11g
    Regards,
    Vijay.

    Vijay,
    Issue 1: Your usage of $s() JavaScript API seems to be wrong. For the first parameter, you need to use the name of the hidden page item and not p_order_id.
    javascript:$s('P1_ORDER_ID','#ORDER_ID#');openForm1();
    Issue 2: Seems like you are not setting the hidden page item's value in session state. Assuming your hidden page item is called P1_ORDER_ID, Under "Region Definition" tab of your "Order Detail Report" under "Source" tab, for page items to submit, enter the name of the hidden page item P1_ORDER_ID.
    Thanks!
    JMcG

  • I used to be able to open a second tab to get to another web site without closing the first one....now I can see the second tab but when I click on it nothing happens...

    I used to be able to open a second tab to get to another web site without closing the first one...now I can see the second tab but when I click on it, nothing happens..

    This issue can be caused by the Ask<i></i>.com toolbar (Tools > Add-ons > Extensions)
    Your system details show that toolbar in the user agent as AskTbARCD/3.13.1.18107
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Can i make a button change anchor link when you scroll down the site?

    I am trying to make a scroll site.. and i have navigation buttons on the right, a full menu, but also a "1 topic up" button and "1 topic down" button.
    Is there any way that i can have those buttons change anchor link when you scroll down the site.
    Example:
    I am at home, then i press "1 topic down" and gets scrolled to the next topic on the website, but then i cant make the button change to link to the anchor below that, so the button becomes useless after that 1 press.
    Is that in any way possible in Muse to make it change link?

    Hi
    You can try to create different buttons on page positions where down scrolling will be active with separate button actions. For example you click on "I topic down" , page scrolls and there is another button placed with "Next Topic down" , on click this would scroll the page more and similarly along the length of page.
    Button with anchor link scrolling down the page cannot be used for different anchor links, creating different buttons with anchors is the solution.
    Thanks,
    Sanjit

  • What are the little filling circles when you click on a mailbox

    in regards to .mac via mail application, what is the the circle that fills up like a pie being cut backwards when you click a mailbox??

    You're welcome.
    Everynow and then, I goto close out Mail, and the screen goes away,
    but the dock icon and menubar still stay active...for a bit or so, then
    closes. Is this due to the same "activity?"
    The answer is yes.
    Depending on your settings for automatically deleting messages from an account's Junk or Trash mailbox, activity will occur.
    Launch the Activity Viewer - at the menu bar go to Window and select Activity Viewer.
    When quitting Mail, any activity should be shown in the Activity Viewer.

Maybe you are looking for

  • How to insert column values into database as rows

    Hi, I have 8 columns and some not null columns. Based on not null columns I want to insert into table as rows. The 8 columns may contain values or no value. If the first column contains data, then I have to insert into one row. if the second column c

  • First PKGBUILD: 'cannot stat' error for source file

    I'm attempting my first PKGBUILD and I've run into some trouble. PKGBUILD: # Maintainer: Simon Wydooghe <hyperbaton at gmail dot com> pkgname=vpcs pkgver=0.21a pkgrel=1 pkgdesc="Simulates up to 9 computers for ping/traceroute purposes." arch=('i686'

  • IPhoto restoring ALL my deleted photos [ever] after library re-build

    Hi. After the last iPhoto update I had to re-build the library. As a result, all the pictures I deleted from iPhoto [ever], are back. I am positive that I have deleted the iPhoto trash as well as the System trash regularly. Is this normal? does iPhot

  • Cannot execute weblogic.Admin class

    Hello, I´m using WLS5.1 SP9, jdk1.2.2_07. I cannot execute the weblogic.Admin command in my WLS running, and cannot connect through the console. I´m getting marshalling exceptions. When I try the command: java -classpath ./lib/weblogic510sp9boot.jar:

  • About Tables in ECC

    Hi Experts,   I need the information about BP3100 which is related to Business. I have to explain about the table means what is the use of that table and Importance of the table to my client. They dont know technical things. So that must be business