Setting the Down Arrow Key. Help Needed.

Folks
I am having a problem.
I have a custom cell renderer which displays a list.
I am setting the focus of this list to the 1st element.
Now,when I press the down Arrow key,this doesnt seem to
go down nor the focus is coming downwards.
Have I overlooked anything? Can someone please help?
class MyListCellRenderer extends JPanel implements ListCellRenderer{
   private JLabel indexLabel;
   private JLabel imageAndText;      
   public MyListCellRenderer(){
   indexLabel = new JLabel();
   imageAndText = new JLabel();
   setLayout(new FlowLayout(FlowLayout.LEFT,3,0));
   add(indexLabel);
   add(imageAndText);
   setOpaque(true);
public Component getListCellRendererComponent(
       JList list, Object value,int index,
       boolean isSelected, boolean cellHasFocus) {
// ** Get the Focus on the first Element.
list.setSelectedIndex(0);
list.grabFocus();
setBackground(isSelected ? Color.red : Color.blue);
final JList fJList = list;
// ** Now press the Down Arrow
final Action downAction = actionMap.get("selectNextRow");
     actionMap.put("selectNextRow", new AbstractAction() {
     public void actionPerformed(ActionEvent e) {
      if (fJList.getSelectedIndex() < fJList.getModel().getSize() - 1)
        downAction.actionPerformed(e);
     else{
        fJList.setSelectedIndex(0);
        fJList.ensureIndexIsVisible(0);

see
http://www.replacementlaptopkeys.com/macbook-key.html
or similar  ebay etc
Be a bit wary of Glue for obvious reasons

Similar Messages

  • Scrolling down a pdf with the down arrow key ...

    Hello,
    I have a 20 page newsletter pdf with about 12 articles. At the top of the first page there's our text logo, and just below it is a table of contents compiled using table of contents styles (btw this pdf was compiled in Indesign 5.5) and just below that is the first article, then below that, the second.. and so on. At the bottom of each page there's a "return to the table of contents" button that shoots the reader back up to the TOC on the first page when clicked, in addition to a page number. There is also a header with the name of the publication and issue number..
    the problem I'm having is, when scrolling through the first article on the first page with the down arrow key, once I get to the bottom of the first page, the cursor then shoots back up to the table of contents. WHat I would like it to do is just scroll down to the next page. Once I get to the bottom of the first page the second time, the cursor jumps down to the bottom of the second page, straight to the page number, a few more taps of the down arrow key takes the cursor up to the header on page 2
    I'd like the down arrow scrolling to just go through the articles and skip the page numbers and other header/footer items. Any thoughts? Should I take my question to the InDesign forums? Thanks in advanced
    -J

    That behavior is controlled when Scrolling is selected from the Page Display Toolbar.
    You might want it defined in the Document Properties > Initial View, but I am not certain if it is a choice. Experiment with the options.
    I am not familair with Javascript in pdf, but that might set the control.

  • Creating new row in a matrix by pressing the down arrow key

    Hi all
    i wish to cause a matrix to add rows when pressing on the down arrow key. can you provide me with the lines of code which achieve this requirement?
    appreicate the help
    Yoav

    Hi Yechiel,
    I think you can capture the moment of the pressing the down arrow key. in that moment, you can utilize this code to add the line. I used DBDataSource. it's most easy and simple way to handle matrix, I think. I can't remember the character code of down arrow. But I think, you can find it easily.
    oForm.DataSources.DBDataSources.Item("@DBS_CBP2").InsertRecord(position)
                        oForm.DataSources.DBDataSources.Item("@DBS_CBP2").Offset = oForm.DataSources.DBDataSources.Item("@DBS_CBP2").Offset + 1
    oMatrix.AddRow()
    Regards,
    Hyunil Choi

  • Disabling the 'down arrow' key that takes me to the 2nd record. ?

    pressing the 'down arrow' key takes me to the 2nd record.
    well how do i disallow this...
    this is very funy and stupid also.

    I've also encountered the similar issue like this now in SQL*Form 3.0. If we have a 'down' trigger inside which we put 'null', it should not allow us to go to the next new record (at least I had ever experienced something like this in 6i forms).
    But now it will still go to the next new empty record even if I've already disabled that by including that trigger inside. Can anyone advise on this?

  • Is it possiable to navigate row by row using the down arrow key?

    Hi,
    The table is an ADF page table, and I want to nevigate to the next row by pressing the down arrow key. Is that possiable?
    Thanks
    Stephen

    Let me explain things better. First of all you have to create
    a javascript file , e.g: moveRow.js with the following code:
    i = 0;
    function moveRow()
    if (window.event.keyCode== 25) // 25 is down arrow
    i++;
    // FormID : TableID: tableSelectOneID
    document.getElementById('form1:table1:' i ':tableSelectOne1').checked=true;
    if (window.event.keyCode== 24) // 24 is up arrow
    i--;
    document.getElementById('form1:table1:' i ':tableSelectOne1').checked=true;
    Then in the jspx head, put something like this:
    <afh:head title="testTable" binding="#{backing_testTable.head1}"
    id="head1">
    <script type="text/javascript" src="moveRow.js">
    </script>
    </afh:head>
    // Call to the function when key is pressed:
    <af:tableSelectOne binding="#{backing_testTable.tableSelectOne1}"
    id="tableSelectOne1" onkeypress="moveRow();"/>
    Kind Regards,
    Luis R.

  • When I press on the down arrow key (or up) the web pages jumps all the way to the bottom (or top)

    So basically the up and down key are acting as "home" and "end".
    If I click on the page I can get them to work somewhat normally, although there is a cursor (like for imputing text) and it goes line by line when I press up and down (instead of scrolling) very annoying and I'll be switching to Chrome for good unless this is resolved for me.

    that was it... thank you

  • On Mac, need to navigate to first google search listing by keystroke, the tab key works sometimesand sometimes the down arrow works, nothing works consistently

    If I do a search using the google search engine, say of a phone number like (530) 335-5414 it results in a page with about 10 to 15 listing. Here is what the page looks like
    https://www.google.com/?gws_rd=ssl#q=%28530%29%20335-5414
    I am on a mac and I need to find a keyboard command to get me reliably to select the first listing . When the caret appears next to the listing I can press the enter key to open the underlying hyperlink.
    I have had success doing this with the tab key and sometimes it works almost 8 times in a row. Then I sometimes use the down arrow key and it occasionally gets me there. IS THERE A RELIABLE KEYBOARD NAVIGATION TO THE FIRST LISTING ON A GOOGLE SEARCH RESULT PAGE. I don't understand why my keyboard only works occasionally to navigate in this way . This is very important for me to do this and maybe someone out there knows how to get to select the first listing on a page by keyboard that works.
    Thank you very much for you

    I've called the big guys to help you. Good luck.

  • How change the sort order of searched items so last search item shows first. I DO NOT mean the order of search engines, but existing searches by down arrow key

    I want to be able to change the sort order of items I have already searched for in the search box. I want to be able to hit the down arrow key and see my previous searches in the order of last search showing first. At the moment I have no idea how it is sorting and it's very annoying to have to re-type a query I typed 5 minutes earlier but because I typed in another 10 since it is lost somewhere in the list. Can this be done, I have googled but did not find the topic anywhere. Just to clarify, I DO NOT MEAN the order of search engines (which is all that comes up in google), I mean the actual text typed in which has been saved in the drop down list.
    Thanks

    The "form fill" feature uses a "frecency" algorithm, frequency + recency, similar to the address bar autocomplete list.
    I found an extension that seems relevant, but the reviews are old so I'm not sure it's still working: [https://addons.mozilla.org/en-us/firefox/addon/searchbar-autocomplete-order/ Searchbar Autocomplete Order].
    But... is the autocomplete not working? I would expect that typing a couple characters of the earlier query would filter the list so you can easily select it? Or is the problem that the list doesn't remember enough searches for that?

  • How to implement JSF text input down-arrow key = next record navigation?

    Hi All,
    I've got a small query which you experts might be able to help me through. I would not be surprised if such questions would already have been raised in this forum.
    Formerly, I've created an Oracle Form that allow user to quickly insert data in bulk. It only has three 3 fields - first name, second name and address. Because of the flexibility of the Oracle Form, by pressing the down arrow key, user is able to create record when the last record is detected. And vice versa by hitting the up arrow key, it will move to the previous record when the current record is not the first record. So basically, the form is very 'key-driven' and without the use of the mouse, a lot of data can be inserted very quickly and efficiently.
    I've successfully converted such form to an ADF BC JSF page using the JHeadstart toolkit. But when I showed it to my users for comment, they were really disappointed with the number of mouse interactions they need to click every time to navigate between records as well as creating new records. My question is can I build some sort of ADF JSF event handler on any of the text items to perform the following tasks:
    1.) When 'down arrow key' is pressed AND not the last record THEN
    Go to the next record.
    2.) When 'down arrow key' is pressed AND is the last record THEN
    Go to the next blank record.
    3.) When 'up arrow key' is pressed AND not the first record THEN
    Go to the previous record.
    4.) When 'up arrow key' is pressed AND is the first record THEN
    Do nothing.
    If all the four above tasks are achievable in ADF JSF, can you please guide and brief me on the steps to implement them. Or these functionalities are already available somewhere in other open source toolkits. Your help is much appreciated. Thank you and have a nice day.
    Kind Regards,
    John

    Hi Steven,
    I've tried to incoporated attached link's codes with the JHeadstart generated code inside the jspx but I still cannot get it to work. There is a lot of Javascript error and is impossible to debug.
    Regards,
    John

  • My down arrow key does not work as it should

    Hello to you.
    My down arrow key does not work as it should.
    When I use my down arrow key is the whole side going down.
    It is annoying when you write that you always end up bottom of the page when using the Down arrow key. I hope I can help me
    I use Windows Vista.
    Yours faithfully
    Anders Lodberg

    Check if you enabled scroll lock (fn + insert), in excel it scrolls page when enabled and move across cells when disabled
    3000 N200 0769-AL3, Intel C2D 2G T5750, IEL10 mb, Kingston 4G RAM, Samsung 320G HD, Broadcom lan 100, Agere modem 56k, Broadcom wifi g, AuthenTec fingerprint reader, Sonix 1.3M camera, LG DVD burner, Samsung 15,4" 1280x800 BrightView, Intel X3100 IGD 384M, Ricoh 5in1, Ricoh 1394, vista home premium sp2

  • Down arrow key press autometically an3 simultaneously

    My hp pavilion g6 has a problem.the down arrow key press automatically and simultaneously after sometime.please tell me how to i get ride of this.

    The down navigation key do not work.please help me.

  • HT202157 I brought a new apple TV after it was going thru its update, it lost power?  I tried the reboot with the down arrow and menu button, but no love. Is this unit busted?

    I brought a new apple tv.  I tried to update it. When it finished, it lost power.  I tried to reset it with the down arrow key and the menu button, but no love. Does this mean that i should take it back to the store?

    Welcome to the Apple Community.
    If your problem persists get yourself a micro USB cable (sold separately), you can restore your Apple TV from iTunes:
    Remove ALL cables from Apple TV. (if you don't you will not see Apple TV in the iTunes Source list)
    Connect the micro USB cable to the Apple TV and to your computer.
    Reconnect the power cable (only for Apple TV 3)
    Open iTunes.
    Select your Apple TV in the Devices list, and then click Restore.
    (You may already have a micro USB cable if you have a camera or other digital device)

  • Down arrow key won't work

    Hello!
    Here is my situation:
    I'm working in a Flash-based courseware environment.
    Basically, has anyone encounted a situation where the down arrow key (or any key for that matter) will work on someones computer, and not work on someone elses computer? We use various methods to navigate through our courseware, most of which are clicks, but the down arrow key is used fairly often. But unfortunately, despite our best efforts, this key often does not work on clients computers. We've tried swapping out different keyboards, no luck.
    We do not have the source files for the Flash, it is auto-generated by the tool we are using (which is similar to captivate, camtasia, etc).
    Any thoughts?

    Are you using the same browser consistently throughout testing? Sometimes browsers are the issue for such problems and not the hardware itself

  • Down arrow key maps as up arrow key

    when using the down arrow key to select something from the dropdown list in the address bar or search box, it seems to be mapped as the up arrow key.

    See http://forums.mozillazine.org/viewtopic.php?f=23&t=2239223&start=315

  • Why am I recently unable to use my mouse to scroll email topics or content?  I can only use the up and down arrows keys to scroll.

    Why am I recently unable to use my mouse to scroll email topics or content?  I can only use the up and down arrows keys to scroll. I am able to use my mouse to scroll through internet searches.  It only seems to have affected my email messages.

    Try a restart.
    Do a backup, using either Time Machine or a cloning program, to ensure files/data can be recovered. Two backups are better than one.
    Try setting up another admin user account to see if the same problem continues. If Back-to-My Mac is selected in System Preferences, the Guest account will not work. The intent is to see if it is specific to one account or a system wide problem. This account can be deleted later.
    Isolating an issue by using another user account
    If the problem is still there, try booting into the Safe Mode using your normal account.  Disconnect all peripherals except those needed for the test. Shut down the computer and then power it back up after waiting 10 seconds. Immediately after hearing the startup chime, hold down the shift key and continue to hold it until the gray Apple icon and a progress bar appear. The boot up is significantly slower than normal. This will reset some caches, forces a directory check, and disables all startup and login items, among other things. When you reboot normally, the initial reboot may be slower than normal. If the system operates normally, there may be 3rd party applications which are causing a problem. Try deleting/disabling the third party applications after a restart by using the application un-installer. For each disable/delete, you will need to restart if you don't do them all at once.
    Safe Mode - Mavericks
    Safe Mode - About

Maybe you are looking for

  • Syncing audio to clips after making the cuts -Adobe premiere pro cs 5.5

    Hello Everyone, I am using adobe premeire pro cs 5.5. I have adobe prodution premium suite. I have completed my cuts with a bunch of clips in each sequence. None of them had audio, so I made all the cuts without the audio. Now I have got all the same

  • I WANT TO DELETE MY ACCONT

    IM SO SICK OF THIS! I'VE TRIED ALL OF THE INSTRUCTIONS OF HOW TO DELETE/UNLINK MY SKYPE ACCOUNT FROM MY MICROSOFT ACCOUNT. NO INFORMATION IS HELPFULL. NORE DOES THE INFORMATION STAND FOR SOMETHING REAL. I'M REALLY ANGRY AS YOU CAN TELL. I ALSO TRIED

  • Mass deletion of roles from users

    I want to delete all roles from locked users. Is there a specific transaction for this instead of SU10? In SU10 one has to enter the roles to remove.

  • Reading AppleWorks documents on a PC

    I thought Apple computers and PC's were completely compatible. Is there any way I can read Apple Works documents on a PC? I'm running Windows XP with Office Word 2003 and it can not read my documents from OS X.4.5 / Apple Works.

  • Rnumber in ddi_regs_map_setup

    Hi All, I have a doubt on ddi_regs_map_setup fn call. In the ddi_regs_map_setup the explanation for rnumber is. rnumber - Index number to the register address space set. How do we know whether the address space is I/O or memory address space. Is ther