Indicate most recently selected item in JList

When a JList is set for multiple item selection,
is there any way to visually indicate to the user
which item has been most recently selected?
I notice that in a JTable, a coloured border
gets painted around the cell most recently
clicked on (this is in addition to any cell
background colouring which may be done). This would
be sufficient in my case for a JList, but I
cannot tell that JList supports this.
Any suggestions?
b.c

Good point. I've just tried the following:
Implement a custom cell renderer. In the method,
getListCellRendererComponent(), when the cell
has focus, add a coloured border to it. If the
cell does not have focus, make the border null.
Works beautifully.
b.c

Similar Messages

  • Problem getting most recently changed item.

    Hi,
    I am trying to set the value of an item based on the most recent item to have changed.
    I have 3 conditional processes which set the value of a hidden item (P1_FOCUS) 'When Any Item in Comma Delimited List Of Items Has Changed'.
    Proc1 (sequence 50): If P1_SEL_A changes, P1_FOCUS is set to A.
    Proc2 (sequence 60): If P1_SEL_B changes, P1_FOCUS is set to B.
    Proc3 (sequence 70): If P1_SEL_C changes, P1_FOCUS is set to C.
    If all three P1_SEL... items (select list with submit) are changed at some point, it doesn't pick up the most recently changed item, it just knows they have all changed and therefore the item is set to C as the C process is the last to be run (I assume the processes are run in sequence order?).
    Is there a way to only pick up the most recently changed item? Maybe clear the history of what has changed on this page somewhere?
    Overall, I am trying to get the last item in changed before the submit so the focus can go back to that item on the page in the page 'on load' process.
    Cheers
    Katie

    ApEx normally generates links that look like buttons by adding styling to an "a" tag.
    "a" tags accept focus in the same way as buttons so you have actually lost the focus on the final input field by the time you've clicked the link.
    However, you can test this by creating a new button template in your theme. Use something like the following in the Template Text:
    <button style="font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 11px; padding:1px; margin: 2px; text-decoration: none; cursor: pointer;" onclick="#LINK#">#LABEL#</button>
    This will create a normal HTML button.
    If this doesn't work, can you paste into this thread a copy of the javascript you are using.
    Regards
    Andy

  • Disable most recently used items for this field in CRM 2013

    Hi,
    I have checked "Disable most recently used items for this field " property option for lookup filed in CRM 2013. But it still displaying MRU items on the lookup filed. Can someone please help to fix this ?
    Regards,
    Thanga

    did you try to clean your browser cache? use a different browser?
    My blog: www.crmanswers.net -
    Rockstar 365 Profile

  • Selecting item in Jlist

    Hello,
    I'm using a JList but when I set, I'm not able to selected any item
    of the JList whereas I can when no CellRendere is set ..
    Does anyone see an explanation ?
    Thanks in advance

    Hello,
    I'm using a JList but when I set, I'm not able to^^^
    a CellRenderer of Course
    selected any items
    of the JList whereas I can when no CellRenderer is set
    Does anyone see an explanation ?
    Thanks in advance

  • Show (croll-to) selected item in jlist

    i have 100 items in a jlist. then i scrolled to the bottom of the list.....so now the first item is not in view anymore.
    i have a button on top that retrieves rows and rebuilds the jlist.
    which it does.
    however, if i am at the bottom of the list and hit the button i want the first item to be selected and viewed in the screen.
    dbase_list.setSelectedIndex(0); ---> selects the first item
    but its not in view till i scroll back up again.
    how do i select and place the first item in the users view after i hit the button? is there a method that does it?
    thanks

    I came to know this from one of the postings.
    dbase_list.ensureIndexIsVisible(0);
    should scroll the JList programatically to the top.
    Hope this helps.
    Ranga.

  • How do i fix a flash "plug-in container" issue (ff indicates most recent version is installed)

    Hello. to start with im not really up on the ins and outs of ff, ive used it for a while but not really tinkered with till this problem
    Im running Vista (no comments on that please :p) and the latest version of as downloaded from the mozilla website (3.6 something)
    my plug-ins are (version number):
    2007 MS Office system (12.0.4518.1014),
    Bio3D (12.0.0.733) - this comes with ChemDraw i think,
    ChemDraw (12.0.0.733),
    getPlusPlus for Adobe 16287 (1.6.2.87),
    Java Deployment Toolkit (6.0.210.6),
    Java(TM) Platform SE 6 U21 (6.0.210.6),
    MS Office Live Plug-in for FF (2.0.4024.1),
    MS (R) WMP FF plug-in (1.0.0.8),
    Mozilla Default Plug-in (1.0.0.15),
    Novell iPrint Plug-in (5.3.0.0),
    Novell iPrint Scriptable Plug-in 1.0 (5.3.0.0),
    Quicktime P-in (7.6.6.0),
    Shockwave Flash (10.1.53.64),
    Silverlight P-in (4.0.50524.0),
    Windows Presentation Foundation (3.5.30729.1).
    Ive been on numerous fix-it sites but cant find a solution i understand or can get to work. the problem still occurs in safe mode and with only shockwave flash enabled (this seems to be the issue) and after numerous reinstalls, i have also deleted all i can find of adobe and shockwave then reinstalled to no avail :(
    Whats chrome like?
    Thank you muchly
    == URL of affected sites ==
    http://www.youtube.com

    hi all - I have a similar problem with flash - basically the plugin crashes pretty much every time I am not looking at it directly (playing online games in tabs for example)
    I have tried disabling the "memory-safe-away-time-out thingee" in config:about - to no avail. I have also tried disabling all other plugins (not that I actually have many - Java, VLC, quicktime, some windows stuff), have set themes to default, have made sure all plugins are latest version.
    currently running the 4.0.b2 Firefox version cause of the plug in crashes in the 3.6.8 version - same problem though.
    and where it gets really strange is that a friendly help person on the adobe site suggested I upgrade my firefox to version 3.8 (while I was on the 3.6.8 version) and that would fix it. which I thought was.. interesting as 3.6.8 is the latest version as Firefox upgrade check insisted.
    by now i have invested at least 4 days trying to fix this issue and I gotta say... I am tempted to actually try other browsers, though firefox is my default browser since years.

  • 10.7.2 Finder "Selection" not most recent

    This wasn't happening until a few weeks ago, and was not happening whan I first updated to 10.7.2.
    I must add that I can't do OS updates due to work restrictions.
    I use lots of applescripts & Automator tasks that deal with the Finder selection, like renaming, creating backups, etc..  I'm finding that quite often the task is performed on not my most recent selection. but an older selection that I can't even see.
    I've started selecting & deselecting & then re-selecting again, files I want to perform these tasks on, but even then it doesn't always refresh correctly and performs the tasks on the wrong file.
    Is there some preference I ca trash, or any other suggestions??
    Thanks!

    When in Finder, COMMAND 'J' (letter J), may give you what you want.  Check the appropriate boxes.
    Ciao.

  • "Most Recently Added" Playlist syncing issue

    I add music to my iTunes library pretty slowly, so I created this smart playlist to replace the default Recently Added playlist:
    http://www.cubeupload.com/files/45a800smartplaylist.png
    In iTunes, this shows me the the 90 most recent Music items I added to my library. On my iPod Touch 2nd Gen, however, it shows me a seemingly random list of songs in my library which were synced to the iPod.
    Any ideas?
    Message was edited by: Corey Csuhta

    Hi Corey,
    Welcome to Apple Discussions.
    The conditions for your Smart Playlist are specific to the following:
    iTunes will pick "90" items, with the parameter of *"most recently added"* - the "most recently added" condition is based of date, too my knowledge it does not encompass time though. - So, if you added more than 200 items and they all share the same date, then iTunes will choose 90 of those 200 items randomly.
    Other than that, there may be a metadata error in your files which is causing this issue.
    Regards,
    Peter.

  • I have thousands of photos.  When I select a photo and edit it I want to return to the Organizer where I left off.  I don't want to go to the most recent photo and have to find my way back to where I was.  Is there a way to make this happen?

    When I am in the Organizer and edit a photo I want to return to the Organizer where I left off.  I don't see that as an option--it always returns me to the most recent photo.  Is there a fix?  Thank you.

    Art,
    I am trying to follow your very precise steps, and in my case (PSE11 also, Win7), the focus stays on the edited picture after I return from the editor to the Organizer. I am pretty sure that in the previous post describing your situation, I was able to reproduce the problem, but I don't remember on which version. I just tried in 'Folders' view mode to edit in a selected folder, then I clicked 'All media' so that no folder was selected. Same result in both cases.
    Even if you prefer to work in folders view, you could take advantage of the ability to use 'albums'. It's a misleading word to describe a selection, a 'collection' of pictures, which you can sort as you want. It's a kind of  'playlist' like with music items. In the organizer, you can select a folder and create an album (even a temporary one) just by choosing 'create instant album'. Suppose you have made an album from a folder or a selection of highlighted pictures to edit. You can order them in date order, import batch or 'custom' order'. Since PSE12 you can also sort them in filename order. You should never lose the 'focus' on your last edited picture when coming back from the editor to the organizer. If the purpose of that album is only to help in organizing an editing session, you simply delete the album (the playlist) if you don't want to keep the list afterward.
    I hope someone will be able to confirm how that can happen...
    Edit;
    I have just read Brian's post.
    That may be the difference...

  • 3 Most Recent Unplayed Podcasts is selected - But iTunes still syncs all

    I've selected "3 most recent podcasts" to be synced with my iPod, but iTunes still syncs all the podcasts, without deleting or omitting older, played podcasts.
    Any ideas?
    Thanks,
    Ben

    I have had a variation on this problem for years.
    If I tell iTunes not to sync Podcasts, it does it anyway and just makes them invisable to the iPod. You can see them in iTunes when navigating the iPod.
    I reported to Apple, but nothing ever fixed. Mind you, they still can't get Apple Mail to check the system preferences to learn which is the first day of the week so I don't hold my breath for an easy fix to either apps.
    The only way I found to resolve it is to select the option to only sync ticked items and then unselect all the podcasts, choosing only those you wish to sync.
    It's messy, it shouldn't be required, but with 10GB of podcasts on my machine, I haven't any other choice.
    Unless someone from Apple knows of a proper fix?

  • Is there a way of displaying  the various item in my Downloads folder as icons arranged in order of Date Created, such that the most recent items appear at the bottom, rather than the top?

    Is there a way of displaying  the various item in my Downloads folder as icons arranged in order of Date Created, such that the most recent items appear at the bottom, rather than the top? I know this can be done when they are displayed as a list, but I want icons!

    Hi geezer,
    when you open your 'Downloads' folder choose 'View'  in the Menu bar and choose:
    'as List'
    'Show View Options'
    In 'View options' window you tick:
    'Always open in list view'
    'Date Modified', or
    'Date created'
    Now inside the 'Downloads' folder click on 'Date Created' (or 'Date Modified')
    column to get items alined from oldest to newest date (or reverse)…

  • Select "most recent" records in abap

    Hi
    how can I select the most recent records in a table by using the abap select statement.
    Example: The 100 rows with the "highest" (most recent) sequence-numbers in a table with documents.
    somehow like this:
        SELECT "most recent" * FROM draw
        INTO TABLE gt_doklist
        UP TO 100 ROWS
        where ...
    Has anybody an idea?
    Thanks in advance,
    Willi

    Actually I believe that all the answers are wrong.
    I believe that there will never be a single statement. If you need to determine the last 100 records for a special user you first need to determine the highest document number.
    this can be done by
    select max( document_number ) into document_number from table where username = username.
    Any descending sorting order or group by etc. will never make sure that you get the last one. For a simple reason What should the select statement look like that makes sure (in combination of any cursor applied)? Its impossible!
    If you now need the latest 100 records for a single user its the same problem like buffered number ranges. There is no way to perform that task because there is no database routine or sql statement to do so. And 1.5 million records are too much to try out or select everything.
    You could do an assumption that the last 100 for that user have been posted during the last 1000 or last 10.000 records, select them and filter out.
    Alternative you can perform the following select statement for 100 times. Using an index on document number and user might not be such a performance killer if its only done for one user during his online dynpro process:
    data: max_number type char10.
    select max( documentnumber ) into max_number from table
      where username = username into [structure].
    max_number = max_number + 1.
    do 100 times
    select max( documentnumber ) from table intomax_number
      where username = username and docnumber lt max_docnumber.
    select * from [db_table] into [structure] where docnumber = max_number.
    append [structure] to [table].
    enddo.
    Of course that just draft coding... apply if statements and so on...
    Even though its pretty poor, its the only way to do. Any select statement will never garantee what records you will get if you do not restrict accordingly and if the restriction has to be made on document number, but if there is no way to get the max_number - [100 last records of this user], there is no solution using one statement.
    Thats it.
    Edited by: Rob Burbank on Feb 25, 2010 8:52 AM

  • I can no longer manually select podcast episodes to download. It automatically downloads the most recent. I have been downloading a few episodes at a time due to the limited memory of my Shuffle. Is there a work-around?

    I can no longer manually select podcast episodes to download. It automatically downloads the most recent. I have been downloading a few past episodes at a time due to limited memory of my Shuffle. Is there a work-around for this?

    Similar problem here. My Ical refuses to edit or delete events. Viewing is possible, though sometimes the whole screen turns grey. Adding new events from mail is still possible. The task-pane completely disappeared. My local apple technic-centre messed about with disk utility for a bit and than told me to reinstall leopard. I could of course do that, but it seems to me that reinstalling Leopard just to fix iCal events is a bit invasive.
    I tried also tried removing everything, installing a new copy of iCal from the leopard-cd, software updates, all to no avail.
    At the moment I'm open to all suggestions that do not include a complete leopard reinstall.

  • Attempting to Get Specific Items Selected from a JList

    Hello all, back again...
    I'm working on a simple interface that can run an SQL query with specific settings, and these settings can be altered by choosing one or multiple options from a JList to the side of the table that displays the results. My problem is, currently, not being able to figure out how to get the accursed thing to tell me what items in the JList are selected!
    I've tried using:
    int multiselect[] = cmbSystems.getSelectedIndices();...but it inevitably returns an array with a size of 1. Frustrating. I know I'm missing something, but I have no idea what. What am I doing wrong? Thanks!
    ~ Matt

    Mystrunner wrote:
    Hmm, okay... give me a bit to figure that out, and I will. :)Sure. Your SSCCE should probably only consist of a JList that prints out the selected items when the selection changes, or something like that. I would bet that you figure out what's going wrong in the process of boiling your code down to the SSCCE.

  • Select most recent DATE for an ID.

    Hi All,
    I need to SELECT the records with the most recent DATE for each ID. A DATE range is part of the selection criteria.
    My data.
    MY_ID MY_DATE
    1684662 26-JAN-09
    1424097 27-JAN-09
    1684663 27-JAN-09
    1684664 27-JAN-09
    1684672 28-JAN-09
    0689073 28-JAN-09
    1052476 21-JAN-09
    1052476 21-JAN-09
    1360828 23-JAN-09
    1684661 23-JAN-09
    1052476 30-JAN-09
    1052476 30-JAN-09
    1052476 30-JAN-09
    1052476 30-JAN-09
    The code below works fine when selecting 1 ID in the SUBSELECT, but with multiple ID it still selects rownum=1 (of course). This as far as my thinking takes me.
    SELECT my_id,
    my_date
    FROM
    (SELECT my_id,
    my_date
    FROM my_table
    ORDER BY my_date DESC
    WHERE rownum = 1
    AND *{color:#ff0000}my_id = 1052476{color}*
    AND TO_CHAR(my_date,'YYYY/MM/DD') BETWEEN '2009/01/01' AND '2009/01/31';
    If I could somehow pass the SELECT ID into the SUBSELECT WHERE clause I should have this done.
    Any suggestions?
    Thank You in Advance for Your help,
    Lou

    One of many possible soultions.
    ME_XE?with data as
      2  (
      3     select 1684662 as id, to_date('26-JAN-09','dd-mon-yyyy') as the_date from dual union all
      4     select 1424097 as id, to_date('27-JAN-09','dd-mon-yyyy') as the_date from dual union all
      5     select 1684663 as id, to_date('27-JAN-09','dd-mon-yyyy') as the_date from dual union all
      6     select 1684664 as id, to_date('27-JAN-09','dd-mon-yyyy') as the_date from dual union all
      7     select 1684672 as id, to_date('28-JAN-09','dd-mon-yyyy') as the_date from dual union all
      8     select 0689073 as id, to_date('28-JAN-09','dd-mon-yyyy') as the_date from dual union all
      9     select 1052476 as id, to_date('21-JAN-09','dd-mon-yyyy') as the_date from dual union all
    10     select 1052476 as id, to_date('21-JAN-09','dd-mon-yyyy') as the_date from dual union all
    11     select 1360828 as id, to_date('23-JAN-09','dd-mon-yyyy') as the_date from dual union all
    12     select 1684661 as id, to_date('23-JAN-09','dd-mon-yyyy') as the_date from dual union all
    13     select 1052476 as id, to_date('30-JAN-09','dd-mon-yyyy') as the_date from dual union all
    14     select 1052476 as id, to_date('30-JAN-09','dd-mon-yyyy') as the_date from dual union all
    15     select 1052476 as id, to_date('30-JAN-09','dd-mon-yyyy') as the_date from dual union all
    16     select 1052476 as id, to_date('30-JAN-09','dd-mon-yyyy') as the_date from dual
    17  )
    18  select id, the_date
    19  from
    20  (
    21     select id, the_date, max(the_date) over (partition by id) as max_the_date
    22     from data
    23  )
    24  where the_date = max_the_date;
                    ID THE_DATE
                689073 28-JAN-0009 12 00:00
               1052476 30-JAN-0009 12 00:00
               1052476 30-JAN-0009 12 00:00
               1052476 30-JAN-0009 12 00:00
               1052476 30-JAN-0009 12 00:00
               1360828 23-JAN-0009 12 00:00
               1424097 27-JAN-0009 12 00:00
               1684661 23-JAN-0009 12 00:00
               1684662 26-JAN-0009 12 00:00
               1684663 27-JAN-0009 12 00:00
               1684664 27-JAN-0009 12 00:00
                    ID THE_DATE
               1684672 28-JAN-0009 12 00:00
    12 rows selected.
    Elapsed: 00:00:00.03

Maybe you are looking for

  • How to use output of a Query as an input to another Query

    Dear BI experts, We have a unique requirement. We are multinational company and employees moving from Country to another. I have created a Bex query to give me the list of countries that employees have been since they joined the company. The columns

  • Adding an Input field in Standard Webdynpro Component in SAP SRM

    Hi Friends, I want to add one input field in sap standard webdynpro component in SAP SRM MODULE the component name is /SAPSRM/WDC_DODC_RFQ_H_BD view name is   V_DODC_RFQ_H_BD Upon clicking on SAVE button , it shud save in database what is the name of

  • Authorization Object for DashBoard

    Hello Experts, Can someone tell me wich authorization object for Dashboard do you use? (RSZCOMPID) Thanks . Thibaud.

  • EBP and SUS in same client

    Hi, If we habve EBP and SUS in same client do we need XI for connecting the two systems. Thanks, Manu

  • How can I stop my screen from turning to landscape?

    I am using my iPod touch in a sleeve while I am walking on the treadmill.  Everytime I put it in the sleeve it turns to landscape.  Is there anyway to make this stop turning and lock it into portrait?