How do I make a button NOT take focus when it is clicked?

I am trying to create a virtual keypad and the problem is that when I have a Robot make a KeyEvent for a certain number when a certain button is pressed, the TextField loses focus and the focus is placed on the button that was pressed, so nothing appears in the TextField.
How can I make a button NOT take the focus when it is pressed?
Edited by: tox0tes on Nov 28, 2008 8:06 PM

great. another way is to have a call to myTextField.requestfocus() in the button's actionlistener actionPerformed method, but that leads to tight coupling.

Similar Messages

  • How to make A JButton not look disabled when it is  setEnabled(false);

    how do i make a jbutton not look disabled when i setEnabled(false) because when u disabled abutton it changes and takes away the frame of the button it self..is there a way to make it make a sound when its disabled and not take the frame away...example look at windows calculator when u have an answer for example 2 + 2 when the answer is displayed if u try to click the backspacebutton at this point it makes a sound..is this possible in java thanks

    Why did you repost this question??????
    You where given an answer in the other posting. You have not explained why the solution won't work and you haven't provided any further information about your question.
    You also haven't listened to the other advice, you just reposted the question word for word.

  • How to make a button not clickable???

    i wanna make a button not clickable, once it is clicked... help me to do this
    Thanks
    Rubin

    you can either call setEnabled(false) or remove the listenerFor sake of GUI ergonomics, I'd suggest the first solution.
    If you implement the second solution, you'll have the user clicking on the button again and again and asking himself why nothing happens.

  • How can you make one button preform different actions in Xcode?

    How can you make one button "preform a click" and "orderfront"? Is that possible? Because what I am doing is making a welcome window to my application for Mac OS X 10.6, and I have two buttons in that window, one says "Connect" which connects a a WebView to a url and the other button opens up the main window. So how can I a make a button do multiple things at once??

    Ah - If you are just using bindings between various objects from Interface Builder, you can reduce your application code a bit (sometimes quite a bit), but there is only so far you can go. Typically variables and routines are defined in your application that Interface Builder hooks into, so that your application code (usually Objective-C, but can be others) can use these variables and routines to determine what is happening in the user interface.
    I'm not sure how up-to-date the project code is (or what programming code you are familiar with), but you can take a look at Apple's Cocoa Application Tutorial to see what is (usually) involved in creating an application.

  • How i can make multilanguage application .. take his vlues from database

    How i can make multilanguage application .. take his values from database
    and can change labels of massages , buttons ,text fields and name of columns in run time
    in jdevelpoer11g
    great thank

    Hi,
       I think that there is not a standard support for retrieving multilanguage texts from database in ADF. What we did is to implement our own ResourceBundle that retrieves the translated text from custom database tables. We also introduced a cache for optimizing the access to the translations.
    I hope this can help,
    Juanjo

  • How do I make a button onj the form which will submit and send the pdf as an email?

    how do I make a button on the form which will submit and send the pdf as an email?

    You can set up a button with a "Submit a form" action and use a mailto type URL to specify the email address you want the forms sent do. If you want to send the entire PDF, select that option and not FDF or anything else. The mailto URL should not include any spaces and the "mailto" part should be lowercase, like:
    mailto:[email protected]
    This will attempt to initiate an email using the users default email client. If the user does not have one set up or there is some other problem, the email might not get initiated. If it needs to work with Reader versions prior to 11, then the form needs to be Reader-enabled, which you do in Acrobat 11 by selecting: File > Save As Other > Reader Extended PDF > Enable More Tools

  • How can I make a button that on press the object appears and on second press the object to disappear

    Hello,
    I'm quite new to flash programing, and I don't know how can I make a button that will make the object appear and disappear.Till now I have this code for the appear:
    on (press)
        _root.top1.gotoAndStop(2);
        _root.topp.gotoAndStop(2);
        _root.mm1.gotoAndStop(2);
              _root.m1.gotoAndStop(2);
    but from here I'm stuck.
    Thank you for your help

    What you can do is use the _visible property of the object to make it appear and disappear, or more correctly, use the opoosite of the _visible property.  You should not put code "on" objects, keep it in the timeline.
    If "object" is the instance name of the object you want to toggle, then in the timeline code you can use...
    object._visible = false;  // start with the object being invisible
    yourButtonName.onRelease = function(){
        object._visible = !object._visible;
    That one line in the function sets the object's _visible property to be the opposite of what it currently is.

  • How can I make my buttons be gone forever?

    Just starting out with Flash and have run into a problem. I have several scenes with buttons that can be pressed once and then they disappear using:
    myBtn1.onRelease = function(){ this._visible=false}
    But when I go back to the scene the buttons reappear. How can I make my buttons be gone forever?

    if you have more than 1 button that should be made not visible at any given time, you'll need to use an array to store those button references.  otherwise, you can use:
    var alreadyRemoved:Boolean;
    if(alreadyRemoved){
    myBtn1._visible=false;
    myBtn1.onRelease=function(){
    this._visible=false;
    alreadyRemoved=true;

  • On my Mac desktop I must have changed a setting so that now when I move the mouse the open windows fly off to the sides and I can't see them. They come back when I move the mouse, but it is so annoying. How can I make the windows not disappear like that?

    On my Mac desktop I must have changed a setting so that now when I move the mouse the open windows fly off to the sides and I can't see them. They come back when I move the mouse, but it is so annoying. How can I make the windows not disappear like that?

    Click on the Hot Corners..  button and look at the four definitions.  In the picture below, if you moved the cursor to the right top of the screen, it would slide all the applications off the screen as you describe and show the desktop.  Set it to "-" to deactivate.

  • How can i make my keyboard not to appear on my i pad, how can i make my keyboard not to appear on my i pad

    how can i make my keyboard not to appear on my i pad, how can i make my keyboard not to appear on my i pad? couse i want to play a game and is coming on the screen is really iritating ..

    You cannot have the keyboard gone altogether, because it has to come up when an app needs input. The best way to do what you want to do is make sure that no apps are running when you are to go gaming: double click the Home button, swipe up all pages that show (not the app icon but the app page). then start the gaming. It it then still comes up, you look at what app is asking for it and set push notifiactions and autotarting off for that app in the settings.

  • How can I make a button "react"?

    This is probably a super silly question, but you know how it is, sometimes we sit on the answer and still can't find it... How can I make a button react to a click? I just want the simple effect of the button changing colors or looking like the user pushed it. Right now it's just the same old plain button, no matter if I click it or not, you can't really tell the difference. How can I give it the "pushing the button" effect? Thanks guys!

    You can choose image button and then choose from the available image buttons, or click on the folder icon when you select the image button and choose from the Gallery of Captivate 6.
    Few image buttons change color on hover or onclicked, these effects are predefined in them.
    Or you can edit that button on which you are working, from properties Panel.
    The Post and Cancel button on this thread seems like a transparent button in Captivate with different fill and stroke color, and transparency is also less, and with corner radius of 0.
    You will find these all optionns, when you will click on that button and then click on the properties panel.
    Thanks.

  • Trying to install cs6 on new make but will not take activation code, i think it is because i didnt deactive on old comp

    trying to install cs6 on new make but will not take activation code,

    how do I fix the issue

  • How will u make the file not to be process by other?

    how will u make the file not to be process by other? thanq

    Hi Krishna,
    File locking is not supported.
    Look at the OSS note 821267 for File Locking / Incomplete Processing.
    Regards
    San
    Remember to set the thread to solved when you have received a solution there is a Way.

  • How to make a JScrollPane not getting Focus?

    How to make a JScrollPane not getting Focus?
    When i tab out from a textfield inside a scroll pane focus is going to ScrollPane .And if i press tab once more then only focus is going to other textField which is outside the scrollpane.
    For me when i press tab from a text field inside a scrollPane ,i should go to textfield out side the scroll pane.
    satish

    Hi,
    I've the same problem, that I have to double click on tab
    to step from a textfield with a scrollpane to the next textfield in my panel.
    I tried to implement a FocusListener on my JScrollPane, but without success.
    Can you tell me in detail how to implement this listener ?
    Kind regards
    Andy Kanzlers

  • How can I make extra storage on my phone when I have deleted any all data, pictures and files that I couldn't store in a dropbox and not have purchase additional storage?

    how can I make extra storage on my phone when I have deleted any all data, pictures and files that I couldn't store in a dropbox and not have purchase additional storage?

    Purchasing additional storage only applies to iCloud, not to the phone itself. You cannot purchase additional storage for the phone, only purchase a larger capacity phone. If you have deleted all of the content that you can, then that is all of the space that you have. What is it exactly that you are trying to do? Does this have to do with space for performing an OTA update of the iOS?

Maybe you are looking for

  • 2012 iMac vs. 2008 iMac - how much faster overall?

    My 2008 24" iMac (Intel Core 2 Duo, 2.8 GHz, 4GB RAM) still serves me well -- Final Cut Pro, internet, music and everything else.  If I take the plunge and upgrade to the new 27" iMac for $2,199 (3.4GHz Quad-core Intel Core i7, Turbo Boost up to 3.9G

  • It will not open and sends an error message to send to micro sdft

    firefox came up with some up grades after i did them it kept giving me and error and would not open

  • Cellular Data page- wrong status

    Hi. My 3G account works fine, but when I log into my Cellular Data Account dialog box (Setting > Cellular Data > View Account), the status shows "You have no domestic data left" and is stuck showing an old billing period (November 2010). My detailed

  • Problems with colors on dock.

    I noticed today that when I look at the dock the colors seem to be messed up. The finder icon is a yellow color and instead of white dots under what is open, it is now yellow. Also in Safari, when a page loads the loading graphic in the address bar i

  • Invoke-command takes 20-90 seconds to complete

    all servers I'm testing with is server 2008r2 with powershell 4.  I have a text file with 100 servers that are online and with PS remoting enabled. When I run this command: # this takes about 20-30 seconds to complete Invoke-Command -ScriptBlock {get