Changing the first item being focused in a window

Hello fellow programmers. I'm developing an application that contains a number of radio buttons as well as a PLAY and STOP button. I would like the PLAY button to be focused whenever the window is opened. I was able to get this done by calling the requestFocusInWindow() method after the initComponents() method in my form class. I also had to call the requestFocusInWindow() method in the STOP button's ActionPerformed method. I noticed for a split second, another button was getting the focus whenever the STOP button was pressed (until the requestFocusInWindow()) was called).
I've tried adding the requestFocusInWindow() method in just about every location in the PLAY button's code with no success. The only thing that works is what I described. Is there a better way of accomplishing this?
Thanks in advance.

You'll need a custom focus traversal policy, see [the tutorial|http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html#customFocusTraversal].

Similar Messages

  • On a Mac v10.6.6 Firefox v3.6.13 Right click on Google Map does not bring up the drop down box, with the first item being directions from here, the right click does work on Google map when using Safari

    On a Mac v10.6.6 Firefox v3.6.13 Right click on Google Map does not bring up the drop down box, with the first item being "directions from here", the right click does work on Google map when using Safari

    Your above posted system details show outdated plugin(s) with known security and stability risks.
    *Shockwave Flash 9.0 r999
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/
    In Firefox 3.6 and later versions you need the Next-Generation Java™ Plug-In present in Java 6 U10 and later (Linux: libnpjp2.so; Windows: npjp2.dll).
    http://java.com/en/download/faq/firefox_newplugin.xml
    See also http://java.sun.com/javase/6/webnotes/install/jre/manual-plugin-install-linux.html

  • Windows Explorer - How to select the first item once we open the explorer?

    Hi,
    In Windows Explorer - How to select the first item once we open the explorer using keyboard shortcut. I typically use downward arrow, it goes to the 2nd item in the list, then I again have to use upward arrow to go up.
    Is there a shortcut to select the first item in the list using keyboard? This is not specific to Windows 7, it has been the behavior even in previous Windows OS versions.
    Thanks,
    Mallik

    Opening a Microsoft Ticket is probably your best option. Unfortunately the change will not happen immediately and it will require multiple users to send in a ticket. I hope this ends up being resolved though.
    Good luck Mallik
    Also, don't forget to mark the post as answered so that it does not show up as unanswered to help others who search the forums.
    Agreed, MS wont change it easily. :)
    Arnav Sharma | http://arnavsharma.net/ Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading
    the thread.

  • Navigate to the first item in a updatable report

    on my page i have a master/detail form. When a new detail - record is created, the cursor navigate to the first item on the page => it is the first item of the master! What I have to do, that the cursor navigate to the first item in the new detail-record ??
    Thanks
    Robert

    Hi Andy,
    thank you for your answer.
    When the program start, I can not find the cursor. I think, I have a problem to reference the item in the updatable report. I wrote the following lines:
    <script language="JavaScript1.1" type="text/javascript">
    alert('Vor Cursor Navigation');
    first_field('#FKOM_RUFNR#');
    </script>
    (FKOM_RUFNR is a column of the select statement in the report!!)
    A second problem: The cursor navigate to the field - first_field('FIELD_NAME') - every time. But the cursor should navigate to the field in the updatable report, if the button "ADD" in the region of the updatable report was clicked. If the page was displayed without clicking the ADD - button, the cursor should navigate to the first item in the master form ( like => Cursor focus: first item on the page). How can I do that ??
    Thanks
    Robert

  • Error log file when we change the first date with the ZAL11 transaction

    Hi friends
    How do i change the First Available date(FAD) in the line item of the sales order using ZAL11 transaction. PR and PO generated for the line item of the sales order.
    Thanks&Regards
    Taraka Rami Reddy J

    Standard AL11 is cusomized as ZAL11 functionality is same .
    reagards
    taraka

  • Defaulting a dropdown to the first item in the list

    I have two dropdowns in InfoPath 2010. The second dropdown gets populated depending on what the first dropdown is set to.
    Example: If the first is set to Florida, the second will display all the cities in Florida. If you set the first to Georgia, the second will change to a list of cities in Georgia.
    The problem is that it defaults to a blank line, I need the first item in the second dropdown to populate with the first item in the list.
    I've scoured the web but I can't seem to find a solution.
    Any solutions or workarounds?

    Hi,
    To achieve your requirement,  creating cascading dropdown fields with InfoPath.
    Please refer to the following blogs about creating cascade drop down in InfoPath form step by step:
    http://blogs.msdn.com/b/bharatgupta/archive/2013/03/07/create-cascading-dropdown-in-browser-enabled-infopath-form-using-infopath-2010.aspx
    For the issue that second dropdown defaults to a blank line, add a formatting rule to the first dropdown. Refer to the following articles:
    http://www.pointbeyond.com/2011/11/20/cascading-dropdowns-in-infopath-2010/
    http://msreddysharepoint.blogspot.in/2012/12/infopath-2013-web-browser-creating.html
    Best Regards,
    Lisa Chen
    Lisa Chen
    TechNet Community Support

  • Doesn't allow us to change the commitment item in ME21N/ME22N

    Hi,
    We have prepared Po for Stock transfer Order by using Item Category I, without PR. While making Po we have two line items... 1st line item the material is DMFRL1023 (Raw Material) & 2nd line item is DMFRC1051 (Raw Material). In Material DMFRL1023 itu2019s allowing to change the Commitment Item but  in 2nd line item it doesnu2019t allow to change the commitment item. The Valuation Class & VC: Sales order stk in both materials is same. The Gl which is attached in BSX transaction key in obyc is XXXXXX. And the same GL appears when we do the entry in new po against two materials because we have created Commitment item same no as GL which is non budgetable. But in Material DMFRL1023 it give us to change & for Material DMFRC1051 it doesnu2019t allow us to change the commitment item. If we changed that it will take previous commitment item (Default one).  There is no purchase Order history against both line item
    Kindly advice.
    Thanks in advance
    Regards,
    Nikhil

    Hi Nikhil,
    The way that commitment items are derived by transaction FMDERIVE can be the answer for your inquiry.
    I will explain to you in detail how to use the trace tool.
    Normally the derivation strategies are called at posting time several times. Please turn the trace of FMDERIVE On, as explained in SAP note 666322 (download the note in service marketplace). If you enter in transaction FMDERIVE you will see the trace button (a truck) were you click on activate.
    This is a customer tool where you can analyze the derivation log and find out how the Account Assignment objects are determined (values after and before the derivation process).
    Please do the following:
    a. Enter in FMDERIVE and activate the Trace
    b. Test again your issue in ME21N/ME22N.
    c. You will receive FMDERIVE trace screen with the values of account assignments. Probably you will receive more than one time this screen. If you see that the value is correct go to the next step clicking on button "X".
    Whenever you find that the value is incorrect (or empty), please do the following:
    d. In the FMDERIVE pop-up screen click on button "Display Log". When you click there you will see another screen.
    e. There, Go to Menu Goto -> Display Print Template
    f. Click on both folders to open the tree.
    In the first one you will see the Values after and Before.
    In the second one (Steps), you are able to see WHERE exactly was the change, what was happening during the execution of derivation rules, the RULES that it is in use in that step.
    All the derivation rules which are in use during the process will be marked with yellow line.
    If you check the trace log and the 'value after' is not correct, you should adjust your existing  derivation rule.
    If you find out that a derivation rule is responsible for the different behaviour on commitment item changes in MM transactions, I suggest you to find out the derivation rule and then adjust the target field settings.
    For this, please enter in the derivation rule -> Definition Tab, double click in the name of your Target Field (bottom part of the screen).
    There you will find the fields:
    ( ) Do not overwrite if Fld Already Filled    
    ( ) Overwrite with new value
    ( ) Overwrite with new value if new value is not empty.
    You should choose the most appropriate option for your business scenario.
    I hope this helps.
    Best Regards,
    Vanessa.

  • How do I change the first name associated with a developer account?

    How do I change the name on my developer account. I now have my discussion ID tied in with developer account, and I would like to change the name associated with my developer account. There is a field to change my first name on the discussion board, but there seems to be no option to change the first or last name associated with a developer account.

    I ran into the same problem and was glad to find this post.
    I started to register as a iOS developer but my daughters name shows up in the personal info field and can not be changed. When I go to the "manage my ID" page it has my name and the correct info. How do I fix this for my Developer ID registration?
    I just sent an email to the link Dave supplied and am waiting for a response.

  • After upgrade SP-Crawl Error: The SharePoint item being crawled returned an error when attempting to download the item.

    Hi All - After the upgrade, I am getting SP-Crawl Error for certain links. I check the Crawl component has proper permission.
    Google is showing some article like
    http://blog.karstein-consulting.com/2012/04/20/error-in-crawl-log-the-sharepoint-item-being-crawled-returned-an-error-when-attempting-to-download-the-item/
    not sure if this resolution is referring to 2010 and/or 2013. 
    I checked the registery editor. I couldn't find 14.0 under the Office Server.
    Any clue?
    Regards,
    Khushi
    Khushi

    I checked the web application policy the search crawl account has full read permission.
    Crawl
    Fiddler
    Log Error referring the Correlation ID
    01/06/2014 13:05:06.14  w3wp.exe (0x1698)                        0x0118 SharePoint Foundation        
     Monitoring                     nasq Medium   Entering monitored scope (Request (GET:/sites/HR/Shared%20Documents/Benefits/Insurance%20Benefits/Life%20Insurance/Basic%20Life%20and%20ADD)).
    Parent No 
    01/06/2014 13:05:06.14  w3wp.exe (0x1698)                        0x0118 SharePoint Foundation        
     Logging Correlation Data       xmnv Medium   Name=Request (GET:<SiteURL>/sites/HR/Shared%20Documents/Benefits/Insurance%20Benefits/Life%20Insurance/Basic%20Life%20and%20ADD) e8b1679c-0476-70d4-9fcd-2cef5be44461
    01/06/2014 13:05:06.14  w3wp.exe (0x1698)                        0x0118 SharePoint Foundation        
     Authentication Authorization   agb9s Medium   Non-OAuth request. IsAuthenticated=True, UserIdentityName=, ClaimsCount=0 e8b1679c-0476-70d4-9fcd-2cef5be44461
    01/06/2014 13:05:06.15  w3wp.exe (0x1698)                        0x1738 SharePoint Foundation        
     General                        af71 Medium   HTTP Request method: GET e8b1679c-0476-70d4-9fcd-2cef5be44461
    01/06/2014 13:05:06.15  w3wp.exe (0x1698)                        0x1738 SharePoint Foundation        
     General                        af75 Medium   Overridden HTTP request method: GET e8b1679c-0476-70d4-9fcd-2cef5be44461
    01/06/2014 13:05:06.15  w3wp.exe (0x1698)                        0x1738 SharePoint Foundation        
     General                        af74 Medium   HTTP request URL: /sites/HR/Shared%20Documents/Benefits/Insurance%20Benefits/Life%20Insurance/Basic%20Life%20and%20ADD e8b1679c-0476-70d4-9fcd-2cef5be44461
    01/06/2014 13:05:06.17  w3wp.exe (0x1698)                        0x1738 SharePoint Foundation        
     Files                          aise3 Medium   Failure when fetching document. 0x80070090 e8b1679c-0476-70d4-9fcd-2cef5be44461
    01/06/2014 13:05:06.17  w3wp.exe (0x1698)                        0x1960 SharePoint Foundation        
     Monitoring                     b4ly Medium   Leaving Monitored Scope (Request (GET:<SiteURL>/sites/HR/Shared%20Documents/Benefits/Insurance%20Benefits/Life%20Insurance/Basic%20Life%20and%20ADD)).
    Execution Time=20.5461867360237 e8b1679c-0476-70d4-9fcd-2cef5be44461
    01/06/2014 13:05:06.17  w3wp.exe (0x1698)                        0x1960 SharePoint Foundation        
     Monitoring                     b4ly Medium   Leaving Monitored Scope (Request (GET:<SiteURL>/sites/HR/Shared%20Documents/Benefits/Insurance%20Benefits/Life%20Insurance/Basic%20Life%20and%20ADD)).
    Execution Time=29.917489513332 e8b1679c-0476-70d4-9fcd-2549ba3ee9d4
    01/06/2014 13:05:06.17  w3wp.exe (0x1698)                        0x1960 SharePoint Foundation        
     Monitoring                     nasq Medium   Entering monitored scope (Request (GET:<SiteURL>nsurance%20Benefits%2fLife%20Insurance%2fBasic%20Life%20and%20ADD&FolderCTID=0x01200039DA632EEACF264685CF39D68A18F7C8)).
    Parent No 
    Any clue?
    Regards,
    Khushi
    Khushi

  • How to change the line item storage location during the sales order creatio

    How to change the line item storage location during the sales order creatio

    Hi Kumar,
    I think you can just delete it in the sales order directly, if you are using make-to-order scenario, then there will be special stock left for the sales order as the production has been goods receipt, you need to use MM transaction move the stock to unrestricted use stock. If you are using make-to-stock scenario, there should be no further problem. If you are using assembly order, please try to reject the sales order item to see if it could fullfill your requirement.
    Regards,
    Rachel

  • How can I change the settings for being timed out (I don't want to be timed out ever)

    How can I change the settings for being timed out (I don't want to be timed out ever)?

    I am sorry but this isn't something that you can set. The system has timeouts built into the code.
    Andrew

  • ADF Faces: How to autoselect the first item in a af:table ?

    Hi
    I want <af:table> to autoselect the first item in the set (if there is at least one item). I'm looking for a programatic way to do it, but haven't found a solution.
    Any suggestions?
    TIA,
    Brian

    There is no declarative way of doing this.
    The java apis to do this are...
    call...
    table.getSelectionState().clear()
    table.setRowIndex(myIndex);
    table.getSelectionState().add();

  • Change the default 'Item not found' Page

    Anyone know how to change the standard 'Item not found' in KM? I would like to change it to something a bit less technical. I am assuming that it is stored in the repository somewhere.. but where?

    No,
    it's currently not possible to change that page.
    Best regards, Julian

  • Why is the First Item Moved by a Rule is Grayed Out

    Howdy,
    When rules are applied to move e-mails from my Inbox to some other folder the first item in any of those folders is either grayed out and not listed as new or has the Junk Mail Flag set even though Mail doesn't think it's junk mail (i.e., the thimbs down button is active rather than the thumbs up button to reset to not junk). This is with Mail in 10.8.1.

    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

  • How can i show the first item in the list as selected item

    Aslam o Alikum (Hi)
    Dear All
    How can i show the first item in the list as selected item when user click on the list. Right now when user click the list the list shows the last item in the list as selected or highlighted. Furthermore if the list item have large no of value and a scroll bar along with it then the list scroll to last item when user click it with mouse. I want that when user click the list item with mouse list should show the first item as highlighted.
    Take Care
    Allah Hafiz

    Hi!
    You can set list "initial value" using When-Create-Record trigger.
    I.g.
    :<Block_name>.<list_item_name> := Get_List_Element_Value('<Block_name>.<list_item_name>', 1);

Maybe you are looking for