Disabled Button Gets Focus in 1.4 and not in 1.3

Hi
I am in the process of migrating from version 1.3 to 1.4.2
I have a screen on which I I have a button which is disabled when teh screen initializes. There are other items to which I can navigate through TAB.
If i keep pressing Tab so that the focus comes to the disabled object, then it just stays there...nothing happens in version 1.4 although version 1.3 works for a similar scene and teh control goes to teh next component on the screen
I have tried setting the focus by checking the status of teh button and have set it to the same value as being enabled or disabled.
Any help please!
Thanks
priya

hi
I have tried this...but this doesnot seem to help...
i have also set
setRequestFocusEnabled(false)
to disable mosue and keyboard events..but thsi doensot seem to help either...
thanks
priya

Similar Messages

  • Disabled button getting focus

    My problem is that a disabled button are getting focus, which is bad when the application are operated without a mouse.
    I made this litlte demo to illustrate the problem.
    Try pressing button no.1. This will disable button no.1 and button no.2,
    but why are button no.2 getting focus afterwards?
    * NewJFrame.java
    * Created on 29. september 2005, 16:55
    import javax.swing.*;
    * @author  Peter
    public class NewJFrame extends javax.swing.JFrame {
        /** Creates new form NewJFrame */
        public NewJFrame() {
            initComponents();
            printButtonStatus();
        private void printButtonStatus () {
            printFocus (jButton1);
            printFocus (jButton2);
            printFocus (jButton3);
            printFocus (jButton4);
         * Just debug inf.
        private void printFocus (JButton button) {
            System.out.println ("Button=<" + button.getText () + ">, Enabled=<" + button.isEnabled() + ">, Focus=<" + button.isFocusable() + ">");
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            jPanel1 = new javax.swing.JPanel();
            jButton1 = new javax.swing.JButton();
            jButton2 = new javax.swing.JButton();
            jButton3 = new javax.swing.JButton();
            jPanel2 = new javax.swing.JPanel();
            jButton4 = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jButton1.setText("jButton1");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            jPanel1.add(jButton1);
            jButton2.setText("jButton2");
            jPanel1.add(jButton2);
            jButton3.setText("jButton3");
            jPanel1.add(jButton3);
            getContentPane().add(jPanel1, java.awt.BorderLayout.NORTH);
            jButton4.setText("jButton1");
            jPanel2.add(jButton4);
            getContentPane().add(jPanel2, java.awt.BorderLayout.CENTER);
            pack();
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
            // TODO add your handling code here:       
            jButton1.setEnabled(false);
            jButton2.setEnabled(false);
            jButton3.setEnabled(false);
            printButtonStatus();
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NewJFrame().setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JButton jButton1;
        private javax.swing.JButton jButton2;
        private javax.swing.JButton jButton3;
        private javax.swing.JButton jButton4;
        private javax.swing.JPanel jPanel1;
        private javax.swing.JPanel jPanel2;
        // End of variables declaration
    }

    Very courius.
    I have made a little change in your code.
    1) scenario
    Simply changing .setEnabled(false) invokation, the class works fine.
    so
    jButton2.setEnabled(false);
    jButton3.setEnabled(false);
    jButton1.setEnabled(false);
    2) scenario
    the class works fine also using your .setEnabled(false) order invokations and putting after those:
    FocusManager.getCurrentManager().focusNextComponent();
    I do not know exactly why, I suppose that is there something not properly
    syncronized in events dispaching.
    In my opinion:
    a) setEnabled(false) at last calls for setEnabled(false) of JComponent
    that fires a propertyChange event
    so:
    scenario 1)
    buttons 2 and 3 are disabled before of button1 that has the focus in
    that moment (given by a the mouse click on itself)
    When botton1.setEnabled(false) is performed buttons 2 and 3 are
    just disabled, so focus is got by button4 (that is enabled)
    scenario 2)
    button1 that has the focus (given it by the mouse click) becames
    disabled before that button2 becames disabled too.
    So, probably, when the event of PropertyChanged is fired and processed, button2.setEnabled(false) invokation has not been
    just performed and swings looks for it as a focusable component
    So, using FocusManager.getCurrentManager().focusNextComponent(),
    we force the transer focus on next focusable component.
    This is only a my suppose, looking what happens.
    Regards.
    import javax.swing.*;
    * @author Peter
    public class NewJFrame extends javax.swing.JFrame {
    /** Creates new form NewJFrame */
    public NewJFrame() {
    initComponents();
    private void printButtonStatus () {
    printFocus (jButton1);
    printFocus (jButton2);
    printFocus (jButton3);
    printFocus (jButton4);
    System.out.println("--------------------------------");
    * Just debug inf.
    private void printFocus (JButton button) {
    System.out.println ("Button=<" + button.getText () + ">, Enabled=<" + button.isEnabled() + ">, Focus=<" + button.hasFocus() + ">, Focusable=<" + button.isFocusable() + ">");
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    private void initComponents() {
    jPanel1 = new javax.swing.JPanel();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jButton3 = new javax.swing.JButton();
    jPanel2 = new javax.swing.JPanel();
    jButton4 = new javax.swing.JButton();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jButton1.setText("jButton1");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton1ActionPerformed(evt);
    jPanel1.add(jButton1);
    jButton2.setText("jButton2");
    jPanel1.add(jButton2);
    jButton3.setText("jButton3");
    jPanel1.add(jButton3);
    getContentPane().add(jPanel1, java.awt.BorderLayout.NORTH);
    jButton4.setText("jButton1");
    jPanel2.add(jButton4);
    getContentPane().add(jPanel2, java.awt.BorderLayout.CENTER);
    pack();
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
    // I have simply change the order
    jButton2.setEnabled(false);
    jButton3.setEnabled(false);
    jButton1.setEnabled(false);
    // with this sentence the class work with original .setEnabled order
    //FocusManager.getCurrentManager().focusNextComponent();
    SwingUtilities.invokeLater(new Runnable()
    public void run()
    printButtonStatus();
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new NewJFrame().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    // End of variables declaration
    }

  • Can one set "Navigation Pane Buttons" Left Sidebar to 'Default Hidden' and 'Not Open' upon opening Any .pdf document?

    Can one set "Navigation Pane Buttons" Left Sidebar to 'Default Hidden' and 'Not Open' upon opening Any .pdf document?

    Photoshop has to have full administrator rights to have read/write access.
    This means you need to run Photoshop CS5.1 in an Administrator account and set it up to "Run as Administrator."
    1. Close Photoshop if it's open.
    2. Right click on your Photoshop CS5.1 launch icon then select "Run as Administrator" from the context menu. (You will have to enter Admin Password if UAC is enabled to change this setting.)
    3. Launch Photoshop CS5.
    4. See if you create and save a document.
    Even if you are in an Administrator account you have to do this as Vista's Admin account isn't really the Super Admin as it is in XP so you have to elevate the rights by selecting "Run as Administrator". This setting is sticky so you should only have to do this once. I am not sure why CS3 is suddenly acting as if it does't have Admin rights unless you are running it in a new account that isn't an administrator or maybe uninstalled (cleanScript?) then reinstalled.
    If can't create or save a document, check that the account that Photoshop is in is an Administrator account.
    To check if you are in an Administrator account...
    1. Type user account in your Vista or Windows7 start search bar. (Start search bar is at the bottom of the panel that opens when you click the start Windows start globe located on the far left hand side of your Windows task bar.)
    2.  Click on "User Accounts" which should show up at the top of the list. This will open the dialog to User Accounts where you can "Change Your Account Type". If UAC (User Account Control) is turned on, you will need to enter the Admin password to change this setting.

  • Why are my emails getting caught in my outbox and not sending?

    Why are my emails getting caught in my outbox and not sending?

    This started happening to me immediately after updating to 10.9.3. None of the suggestions that I could find through Google (orotherwise) helped at all. Mail.app simply does not try to empty the outbox. I would call AppleCare, but they'll just tell me that the software is fine and that it's unreasonable for me to expect to be able to send email.
    Apple support is a dim shadow of it's former self, but it correctly reflects teh state of Apple development. I picked a horrible time to switch to Mac.

  • Why do I get 'mobile me' in settings and not icloud? when I try to go into it, it says not responding, try later.

    Hi
    Could anyone help me with this please?
    Why do I get 'mobile me' in settings on my imac and not 'icloud'? when I try to go into it, it says not responding, try later.
    Thanks

    Why do I get 'mobile me' in settings on my imac and not 'icloud'?
    Because your operating system is too old. iCloud was introduced in Mac OS X 10.7.4 and later. You can upgrade through the Mac App Store. The latest version is Mac OS X 10.9.3 and is free if your Mac is capable of running it (late 2007 IMac's and newer).
    when I try to go into it, it says not responding, try later.
    MobileMe was shut down forever a few years ago, that's why it doesn't work any more.

  • How do we get the plugin to run and not crash flash and shockwave constantly?

    the shockwave and flash players crash constantly in Facebook apps ... every indication is that the plug in container grinds away with extraneous programming down loaded to it without my knowledge or permission. it also slows the over all performance of all systems or apps that i attempt to run for the same reasons. how do i get rid of those unwanted and unneeded programs and prevent their return ?

    You can change the permissions that are stored in the browser in the "about:permissions" page, however if its the plug in container [http://mzl.la/MLXx5x What is a plug in container? ] you can manage the plug in with these [https://support.mozilla.org/en-US/kb/use-plugins-play-audio-video-games instructions] and if you are running into specific issues you can troubleshoot [https://support.mozilla.org/en-US/kb/troubleshoot-issues-with-plugins-fix-problems the plugins with these]
    If you have any specific questions we are happy to help as well. Making them go away would prevent you from being able to watch/play the flash apps
    This also checks if they are up to date [http://www.mozilla.org/en-US/plugincheck/]
    [[Adobe Flash plugin has crashed - Prevent it from happening again]]

  • Disabled Object Gets Focus

    Hi
    I am in the process of migrating from version 1.3 to 1.4.2
    I have a screen on which I I have a button which is disabled when teh screen initializes. There are other items to which I can navigate through TAB.
    If i keep pressing Tab so that the focus comes to the disabled object, then it just stays there...nothing happens in version 1.4 although version 1.3 works for a similar scene and teh control goes to teh next component on the screen
    I have tried setting the focus by checking the status of teh button and have set it to the same value as being enabled or disabled.
    Any help please!
    Thanks
    priya

    If i keep pressing Tab so that the focus comes to the disabled object, then it just stays thereNever seen this behaviour.
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • Mic is disabled. cant get it to enable anywhere. and now, its stuck making this crackling, whining.

    Trying to set up for Google Chat and somehow, turned off MIC ... but the speakers are crackling, kinda whining sound.  WEIRD.  The mic is not responding but then, it didn't respond before!  Running Win 7, 64bit on a HP G-72.  Cannot figure out what to do to a) turn ON mic and b) turn off these speaker sounds that are horrid!  THANKS!

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...
    But... if the Device has been Modified... this will Not necessarily work.

  • How to disable a single cell in a table (and not the whole column)

    Hi there,
    I've got a webdynpro table with a few columns, rows can be created dynamically through a button in the table toolbar.
    Depending on the value of a certain cell I have to disable another cell (in the same row).
    I tried to manipulate the view in the modifyview but no joy. I also tried to manipulate the attribute property through the coding below:
      DATA lv_knttp TYPE knttp.
      lo_nd_kostl = wd_context->path_get_node( path = `MULTIVALUES.KOSTL` ).
      lo_el_kostl = lo_nd_kostl->get_element( ).
      lo_el_kostl->set_attribute_property(
      attribute_name = 'LTEXT'
              property       = lo_el_kostl->e_property-enabled
              value          = ''
    but it disables the whole column!!!! I just need the cell to be disabled (I thought the code above, through the lead selection, would affect a certain cell only - but I was wrong).
    Any ideas?
    Thanks!!!

    Hi,
    using cell variants you can do this.,
    check this article: [Cell Variants in WDA|http://wiki.sdn.sap.com/wiki/display/WDABAP/WebDynproforABAPCellVariants]
    Instead of binding the read only property of table as a whole , just bind the read only property of column group of table., You can do this bu drill down the table and select the required column and bind the read only column.,
    then In onAction Event of button .,
    loop the table, if condition satisfied set the read only property to true else false.,!!
    hope this helps u.,
    Thanks & regards,
    Kiran

  • I have tried downloading about 10 times: every time I fail. When I try to open the the sitre - all I get is the ASK page and not Firefox and therefore cannot cd

    Over the past 8 months I have had problems!
    First a cannot send anything via Thunderbird so erased it because no-one solved the problem for me
    I keep re-downloading Firefox and today again for the tenth time! The trouble is I do NOT get the Firefox start search page but a thing called ASK and it is of no value to me when I want to follow your instructions for Firefox!!!!!what on earth is going on?
    I have Windows 2003 32-bit -I think this is what it says!-because it is easy ti use and I am satisfied with it! Is this relevant?
    So help please because I heard your system is the best.
    thank you
    Dr Harold Fenton

    If there is a problem with the about:home Home page then try to reset the search engine used on the about:home page.
    Reset the browser.startup.homepage_override.mstone pref via the right-click context menu to the default on the about:config page and close and restart Firefox to restore the about:home page to its default.
    * Open the <b>about:config</b> page via the location bar
    * Type in the Filter bar: mstone
    * Right-click the browser.startup.homepage_override.mstone line and select: Reset
    * Close and restart Firefox
    *http://kb.mozillazine.org/about:config

  • Firefox will not let me get on any websites (safe AND not safe), claiming that it "may pose a security threat to your system"; when I try to choose the "proceed unprotected" option, it won't let me.

    My computer's anti-virus software recently expired. A few days later, I went to download a new anti-virus software . . . when I opened up Firefox, I received a warning that claimed Firefox was infected with "Trojan-BNK.Win32.Keylogger.gen", and gave me two options: "Activate XP Security 2011 (recommended)" (this was a $60 charge and required credit card info) or "Continue unprotected (Dangerous)"
    Since I needed to install new anti-virus, I figured I would continue unprotected, download my new software quickly, and remove the virus. But when Firefox opened, it gave me a message saying: "Firefox alert. Visiting this site may pose a security threat to your system!". Gave me three options:
    1. "Get a copy of 'XP Security 2011' to safeguard your PC while surfing the web (RECOMMENDED)"
    2. "Run a spyware, virus and malware scan" (I already did this)
    3. "Continue surfing without any security measures (DANGEROUS)"
    I tried clicking on different links, but the same warning kept showing up, even on verified and safe sites. I tried to choose the third option so that I could download my anti-virus software quickly, but nothing happened when I clicked on it - the page reloads and the warning shows up again.
    My computer is still without anti-virus software because Firefox will not let me surf the internet. Please help!

    It sounds as though your PC is infected with fake antivirus software. The detailed cleanup instructions vary depending on which fake AV you have. However, as a first step, try this:
    Download the following on a different PC, copy them to a USB flash drive or CD, and then run them on the infected PC:
    Malwarebytes Anti-malware : http://www.malwarebytes.org/mbam.php
    SUPERAntiSpyware : http://www.superantispyware.com/
    Hopefully these will get you back online safely. If not, search for clean-up instructions for the specific malware.

  • I want to know why my phone gets really hot in use and not in use.

    I am using a iPhone 3GS 16GB, been using it for over a year now. Recently, it has been heating up regularly. I understand if it on charge. But everytime I use my phone to play games or reply text messages for no longer then 15mins, it gets heated up so much. Occasioanally, it heats up even when its not in use and when I've forced shut down my apps. Why is that so ?

    What iOS version are you running? There have been cases where people have been complaining of their iPhone 3G/3GS overheating. If you have a white version of the 3GS, watch out because this can cause discoloration.

  • Get-MailboxStatistics command to run and not count hidden objects

    I have a script that generates a report on a set of mailboxes in an OU and how many messages are in the Inbox using the following command:
    Get-MailboxFolderStatistics $mailbox -FolderScope Inbox | Where {$_.FolderPath -eq "/Inbox"}
    There is a lot more to this script and it outputs a lot of information, but the count of items in the inbox is always wrong. It seems to be counting a lot of hidden items which users cannot see. From my reading in many forums this is a common problem, and
    so far I have not found a solution.
    Is there a way to fun the Get-MailboxFolderStatistics command and folder out hidden objects?

    `Thank you for the response, but unfortunately I have been tasked to find a way to get this working. I understand that the Get-MailboxStatistics command is unable to filter out hidden items but I need to find a way to make this report possible. I can understand
    the limitations of the command and the technology, but unfortunately the CEO of our company will not accept that as an answer and making this report working is not an option.
    To at least allow the report to function for now, I have created a report which manually adjusts for the hidden objects in each box. This does require the manual effort however of adjusting an input file which keeps track of the number of hidden objects
    in each box. Here is the code that generates the report:
    $mailboxes = @(get-mailbox -OrganizationalUnit "<ORGANIZATION UNIT>")
    $report = @()
    foreach ($mailbox in $mailboxes)
        $inboxstats = Get-MailboxFolderStatistics $mailbox -FolderScope Inbox | Where {$_.FolderPath -eq "/Inbox"}
        $MailboxInfo = Get-MailboxStatistics $mailbox | Select LastLoggedOnUserAccount,LastLogonTime,LastLogoffTime
        $inboxstatCount = Get-MailboxFolderStatistics $mailbox -FolderScope Inbox | Where {$_.ItemsInFolder -gt 0 -and $_.FolderType -like "Inbox"}
        $RawInboxCount = $inboxstatCount.ItemsInFolder
        if ($mailbox.DisplayName -like "BillingFaxes")
            $CurrentHiddenCount = "$HiddenCountBillingFaxes"
        If ($mailbox.DisplayName -eq "callcenter")
            $CurrentHiddenCount = $HiddenCountcallcenter
        If ($mailbox.DisplayName -eq "lab")
            $CurrentHiddenCount = $HiddenCountcathlab
        If ($mailbox.DisplayName -eq "cviholter")
            $CurrentHiddenCount = $HiddenCountcviholter
        If ($mailbox.DisplayName -eq "medrecs")
            $CurrentHiddenCount = $HiddenCountmedrecs
        If ($mailbox.DisplayName -eq "appointments")
            $CurrentHiddenCount = $HiddenCountNFRappointments
        If ($mailbox.DisplayName -eq "pharmacy")
            $CurrentHiddenCount = $HiddenCountpharmacy
        If ($mailbox.DisplayName -eq "referrals")
            $CurrentHiddenCount = $HiddenCountreferrals
        If ($mailbox.DisplayName -eq "research")
            $CurrentHiddenCount = $HiddenCountresearch
        #else
        #{ $CurrentHiddenCount = "No Value" }
        #DIAGNOSTIC VALUES OUTPUT
        Write-Host "--------------------------------------------------------------"
        Write-Host "Current Mailbox" $mailbox.DisplayName
        Write-Host "Current Inbox Count from the report=" $RawInboxCount
        Write-Host "Current Hidden Count Number" $CurrentHiddenCount
        Write-Host "The Math should equal " ($RawInboxCount - $CurrentHiddenCount)
        $mbObj = New-Object PSObject
        $mbObj | Add-Member -MemberType NoteProperty -Name "Display Name" -Value $mailbox.DisplayName
        $mbObj | Add-Member -MemberType NoteProperty -Name "Inbox Size (Mb)" -Value $inboxstats.FolderSize.ToMB()
        $mbObj | Add-Member -MemberType NoteProperty -Name "Inbox Items" -Value ($RawInboxCount - $CurrentHiddenCount)
        $mbObj | Add-Member -MemberType NoteProperty -Name "Last User to Log On" -Value $MailboxInfo.LastLoggedOnUserAccount
        $mbObj | Add-Member -MemberType NoteProperty -Name "Time User was last logged in" -Value $MailboxInfo.LastLogonTime
        $mbObj | Add-Member -MemberType NoteProperty -Name "Time User last logged off" -Value $MailboxInfo.LastLogoffTime
        $report += $mbObj
    All $Hidden----- variables are set to values from an imported file that must be updated regularly. It's messy, but at least it is getting the information we need to those that need it. If anyone can suggest a way to make this work without the constant need
    to adjust the numbers for hidden items please let me know.

  • HT201365 disabled iphone 5s due to changing password and not remembering-need help

    I changed my password on my new iphone 5s and don't remember it. after trying a few times it disabled itself and is referring me itunes. I have never used itunes but I do have icloud and an apple ID

    http://support.apple.com/kb/HT1212

  • HT1518 how do we get back to normal writing and not using unicode?

    My laptop is writing in uni code and it won't go back to English someone please help its urgent!

    Are you using an external keyboard at all? If so, it sounds like it needs remapping. Go to
     > System Preferences > Keyboard to set it up.
    In any case, there should be a flag (national flag or some other icon) in the menubar, probably between the battery/power indicator and the volume icon. Click on it and select 'English'.
    You can set up a keyboard hotkey for this, if you look in
     > System Preferences > Language & Text | Input Sources
    on the right of the window you should see 'Input source shortcuts'. There should be a hotkey for
    'Select previous input source' and
    'Select next input source in the menu'
    If the second one is greyed out, click the 'Keyboard Shortcuts' button underneath and set it up as
    'option-command-spacebar'.
    Now use this hotkey to toggle through to English.

Maybe you are looking for

  • ITunes Not Working After I Restored My iPod Touch

    I went on iTunes and clicked "restore" which caused some error message to pop up that told me to re install iTunes. Thus putting me on the currently 4 hour path of trying to get iTunes to work. First it said I needed avfoundationcf.dll or something.

  • Spread Data Over Multiple Months & Years with Data from Multiple Years

    Hello Everyone, I have a complex calculation for spreading values over several months spanning mulitle years. Because we have a 36 month rolling Forecast, a more sophisticated calc is required as opposed to hard coding months or years. Heres the desc

  • Step - "Sequence Call Name" usage

    I wrote a program that uses teststand API calls to delete specific DLL calls and replace these with a VI call, unfortunately this method does not copy step settings (preconditions etc. ) Right hand file shown in attachment. I later found that it was

  • Updates won't upload to FTP host

    Hi, I have a live website already and just want to add some updates to it, but every time I go to upload to ftp host, it goes through the process of uploading everything (the box with the blue bar) but when the website loads after the upload is finis

  • What to download?(New to Java)

    Hi. Im taking a Java class this year and I need to download it on my home computer. YOu can download it on this site, but I dont know what to download. There is: NetBeans IDE + J2SE SDK J2EE 1.4 J2SE v 1.4.2_05 SDK includes the JVM technology J2SE v