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

Similar Messages

  • How to make a thread NOT get interrupted by the CPU?

    Hello.
    Ok, maybe this might sound trivial, or may expose a fundamental lack in my understand of concurrency... But heres my problem.
    I have 2 threads running, both of the same type.
    After hours of breaking my head, I found out that the reason my program wasnt working is because the CPU was prematurely interrupting one of the threads before it could set a boolean flag to true.
    Basically, my question is this...
    Is there a way I can somehow enclose some of my code such that the CPU should never interrupt the thread while it is running within that enclosed section.

    Hello.
    Ok, maybe this might sound trivial, or may expose a
    fundamental lack in my understand of concurrency...
    But heres my problem.
    I think you nailed it there.
    If you want to notify another thread that is waiting look at the methods.. wait and notify.
    If you need to gaurantee only one thread is running x at one time then use synchronized.

  • How to make iTunes Match not convert my files ALACs in 256 kbps (VBR)? How to get iTunes to convert CDs to Apple loselss?

    How to make iTunes Match not convert my files ALACs in 256 kbps (VBR)? How to get iTunes convert CDs in Apple loselss? The difference between 256 (VBR) and Apple Losless is very clear...

    Dear Michael, good day!
    1. As per your instruction, I turned off iTM.
    Small discrepancy – where are two screens with iTM switch:
    -Settings > iTunes & App Store. 
    -Settings > Music
    I switched OFF in both.
    NB: I turned device to English for convenience.
    2. My next step was Setting > General > Usage – tapped {Music};
    {All music} screen appeared; I swiped it and taped Delete. 
    3. I performed “hard reset” …………………………………..
    4. Switched back On iTM
    5. Taped Music app on Home screen
    iTM has started –  (it took 18 minutes  to completed, 60 mbps Wi-Fi speed )
    Regret to inform… All the same:
    Erase and reset to factory default? Or I did smf wrong?

  • Toolbar icons are not getting focus

    The buttons on the toolbar are not getting focus when I move the mouse over the buttons. I am facing this problem if I use JRE 1.5.0_15 but it is working fine in JRE 1.6.0_6.
    But I need solution in JRE1.5.0_15.
    Can anybody please help me out is there any work around in JRE 1.5.0_15.
    Regards
    Venkat

    I found the solution, We need to change
    some coding style by giving conditions for particular version , foe example we should make changes in color initialisation. Insteatof color.red , use [RGB,1,0,0] and many.........

  • How to make "payment terms" not modifiable in sales order

    Hello every 1,
    please help, i want to know:
    how to make "payment terms" not modifiable in a sales order , as we know it comes directly from CMR and client wants "PAYMENT TERMS" to be not modifiable.
    Look forward for your response.
    Thanks in Advance,
    Deepak

    You need to use SHD0 or userexit chnages, like always determine from customer master, if user changes, give message like not modifiable  or ask abaper to make non modifable field

  • How to make labview program to get average value of 200 reading from multimeter (by using loop)

    Hello
    How to make labview program to get average value of 200 reading from multimeter (I using using loop) to read voltage from mulmeter  but I like to get average value of all of 200 reding how can I do that?
    Thanks
    Wee
    Solved!
    Go to Solution.

    Another idea with less programming - take advantage of the "free" array that comes with a Chart - i.e. the  History Data.
    1) Wire your DMM data to a Chart. (You can set the chart to invisible if you don't plan on using it in the GUI).
    2) Set the Chart History Length to 200 (right click on the chart, click on Chart History Length...)
    3) On the block diagram, use the History Data Property Node, wire it to Mean.vi, and you're done.
    Easiest running average ever.
    Message Edited by Broken Arrow on 04-07-2010 11:36 AM
    Richard
    Attachments:
    EasyAvg.jpg ‏8 KB

  • How to make dyn/admin not to prompt for username and password?

    Hello all
    How to make dyn/admin not to prompt for username and password? I am writing a selenium job to automate cache invalidation to load test a production issue we are facing. Selenium is opening a fresh firefox session and prompting for username and password every time. I am also trying to modify my script such that it will use the same session again and not prompt for username and password. But I thought of asking this question in the group.
    Your inputs will help a lot.
    Thanks,
    Sundar

    Hi,
    You can set enabled property of /atg/dynamo/servlet/adminpipeline/AuthenticationServlet/ to false. It will not prompt for authentication.
    Gopi

  • Tab not getting focus on left-click after suspend in Windows 7 64-bit.

    When I left-click on a tab in Firefox 4 rc 2 after my pc wakes up from suspend in Windows 7 64-bit the tab is not getting focus. I have to use the hotkeys in order to move to that tab. My mouse works fine in other programs.

    I have an imac
    I have an magic pad (same thing as the touch pad on a macbook really)
    I have an usb mouse I use both in windows and osx
    if your trackpad somehow was registered as actived for some reason it would seem as if it was the mouse
    had some *** situations both in windows and osx when my cat sit on the magicpad

  • Swing JTextFeild is not getting focus -  Using jdk-7u17-windows-i586

    Hi All
    Recently I upgraded my Application with Java 1.7 (using jdk-7u17-windows-i586) from java 1.6. Swing component JTextfeilds used to get focus when using java1.6. But after up-gradation to Java 1.7 in few scenarios JTextFeild is not getting focus and I am unable to do any thing with keyboard. Again I have to click on some button with Mouse and need to keep focus using mouse in the textfeild.
    OS : Windows
    Used Java Version : jdk-7u17-windows-i586
    Issue : JTextFeild is not getting focus

    993277 wrote:
    Hi All
    Recently I upgraded my Application with Java 1.7 (using jdk-7u17-windows-i586) from java 1.6. Swing component JTextfeilds used to get focus when using java1.6. But after up-gradation to Java 1.7 in few scenarios JTextFeild is not getting focus and I am unable to do any thing with keyboard. Again I have to click on some button with Mouse and need to keep focus using mouse in the textfeild.
    OS : Windows
    Used Java Version : jdk-7u17-windows-i586
    Issue : JTextFeild is not getting focusThat's an incomplete bug report, not a question. This is a forum, not a bug tracking system. Try bugs.sun.com. And you may want to include a small sample program in the bug report that demonstrates the problem.

  • [OpenBox] Window not getting focus if skip_taskbar is set to 'yes'

    I have bound gmrun to ALT-F2. When I have skip_taskbar set to yes in rc.xml, gmrun does not get focus. This is quite annoying as I have manually click on it to get the focus.
    <application name="gmrun">
    <position>
    <x>center</x>
    <y>center</y>
    </position>
    <focus>yes</focus>
    <layer>above</layer>
    <skip_taskbar>yes</skip_taskbar>
    </application>
    If, however, I remove skip_taskbar as shown below, gmrun get its focus when launched.
    <application name="gmrun">
    <position>
    <x>center</x>
    <y>center</y>
    </position>
    <focus>yes</focus>
    <layer>above</layer>
    </application>
    * Same issue with mplayer/terminal - Doesn't get focus when skip_taskbar is set to 'yes'.
    Last edited by keerthi (2008-10-03 19:45:36)

    I have the same problem, but, and this part is really bad, I also mostly don't have this issue.
    So I can't help except to say I run OB 3.4.7.2 and [sometimes!] have the same issue as you.
    -dav7
    Last edited by dav7 (2008-10-04 03:49:06)

  • 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.

  • How to make an itemrenderer not selectable for TileList

    Hey everyone,
                          I have a custom renderer foe a TileList which displays a 3x3 grid. The items get be moved around to sort the list. Sometimes the collection may have only 7 items so I need to to create 2 more additional renderers which represent the empty state of the itemrenderer. What I am trying to achieve is that when the user clicks the empty items the previous or current selected item does not loose focus, so in othe words I need to make the empty items not selectable so that the user can also not drag these items around.
    | X | X | X |
    | X | X | X |
    | X | O | O|
    Currently the way I detect if the item is selected or not by
    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
       if(ListBase(owner).isItemSelected(data))
         //Show selected state
       else
         //Hide
    Thanks,
    Firdosh

    Take a look at the Disabling List Selection post on my blog.  It might help here.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Why my textfield can not get focus?

    I put a textfield on the first tab of a tabbed panel. I need this textfield to get the focus when I open the first tab. I tried to use grabfocus() method in the constructor of class, but it does not work. Does anybody know why? and how can I solve it?
    Thanks!

    No, I didn't call grab/requestFocus on the event thread.
    My code is like this:
    public class GeneralPane extends JPanel {
    JPanel ltPane;
    private JTextField txtCountry;
    public GeneralPane() {
    initComponents();
    private void initComponents(){
    setLayout(new BorderLayout());
    //Add another Panel to contain Labels and Text fileds
    ltPane = new JPanel();
    FocusListener mFL = new FL();
    txtCountry = new JTextField("US", 20);
    //this listener is used to store the data in the textfield into a variable
    txtCountry.addFocusListener(mFL);
    // add the textfield into ltPane
    mUtil.insertTextPane(txtCountry,ltPane);
    //txtCountry got focus
    //txtCountry.setFocusable(true);
    ltPane.requestFocus();
    //txtCountry.requestFocusInWindow();
    Then in the main program, I create an instance of this class and then use addTab(...) function into the my tabbedPanel.
    The logic is simple, but the textfield still couldn't get focus when I open the tabbedPanel.

  • Custom TextInput itemEditor not getting focus.

    I have an AdvancedDataGrid that has a custom itemEditor on an amounts field. If I do an inline textInput itemEditor everything works fine, but if I separate out the textInput itemEditor into it's own component then when I click on the amounts column it doesn't seem to get focus. What happens is I click once and it appears like the text box has appeared, but there is not cursor, so I can't start typing my amount. I need to click a second time in the cell for the cursor to appear.
    Here are my datagrid columns:
    <datagrids:columns>
            <mx:AdvancedDataGridColumn dataField="Customer" headerText="Cust" editable="false"/>
            <mx:AdvancedDataGridColumn dataField="Balance" headerText="Bal" editable="false"/>
            <mx:AdvancedDataGridColumn dataField="paymentAmountString" headerText="Amount"
                               editable="true" textAlign="right"
                               editorDataField="amountText" itemEditor="com.ihcfs.flex.renderers.AdvancedAmountTextInputRenderer">
            </mx:AdvancedDataGridColumn>
        </datagrids:columns>
    Here is my custom renderer/editor, I've tried both a spark TextInput and an mx:TextInput. They both have the same behavior.
    <?xml version="1.0" encoding="utf-8"?>
    <s:MXAdvancedDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                      xmlns:s="library://ns.adobe.com/flex/spark"
                                      xmlns:mx="library://ns.adobe.com/flex/mx"
                                      focusEnabled="true">
        <fx:Script>
            <![CDATA[
                public var amountText:String;
            ]]>
        </fx:Script>
        <s:TextInput id="amountTextInput"
                     width="100%" height="100%"
                     textAlign="right"
                     change="amountText = amountTextInput.text;"
                     focusEnabled="true"
                     editable="true"
                     restrict="[0-9][.]"/>
    </s:MXAdvancedDataGridItemRenderer>
    If I do an inline item editor it works just fine, it's when I move it out to a reusable component that this behavior happens.
    Inline:
    <datagrids:columns>
            <mx:DataGridColumn dataField="customer" headerText="Cust"
                               editable="false" textAlign="center"/>
            <mx:DataGridColumn dataField="balance" headerText="Bal"
                               editable="false" textAlign="center"/>
            <mx:DataGridColumn dataField="paymentAmountString" headerText="Amount"
                               editable="true" editorDataField="text" textAlign="right">
                <mx:itemEditor>
                    <fx:Component>
                        <mx:TextInput width="100%" height="100%" textAlign="right"
                                      focusOut="textinput1_focusOutHandler(event)"
                                      focusIn="textinput1_focusInHandler(event)">
                            <fx:Script>
                                <![CDATA[
                                    import mx.controls.Alert;
                                    import mx.controls.Text;
                                    import mx.events.FlexEvent;
                                    import mx.formatters.CurrencyFormatter;
                                    [Bindable]
                                    private var originalAmount:Number;
                                    private var amountFormatter:CurrencyFormatter = new CurrencyFormatter();
                                    protected function textinput1_focusOutHandler(event:FocusEvent):void
                                        var e:TextEvent = new TextEvent("amountEntered", true);
                                        var textField:TextField = event.target as TextField;
                                        var newAmount:Number = 0;
                                        if(!isNaN(parseFloat(textField.text))){
                                            newAmount = parseFloat(textField.text);
                                        e.text = new String((newAmount - originalAmount) + "");
                                        dispatchEvent(e);
                                    protected function textinput1_focusInHandler(event:FocusEvent):void
                                        var textfield:TextField = event.target as TextField;
                                        if(!isNaN(parseFloat(textfield.text))){
                                            originalAmount = parseFloat(textfield.text);
                                        } else {
                                            originalAmount = 0;
                                ]]>
                            </fx:Script>
                        </mx:TextInput>
                    </fx:Component>
                </mx:itemEditor>
            </mx:DataGridColumn>
        </datagrids:columns>
    Thanks for the help!

    I attempted to do as you said using the following code:
    override public function setFocus():void{
         stage.focus = amountTextInput;
         amountTextInput.setFocus();
    I also tried adding an event handler to my renderer to capture the focus in event and try the same thing:
    <s:MXAdvancedDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                      xmlns:s="library://ns.adobe.com/flex/spark"
                                      xmlns:mx="library://ns.adobe.com/flex/mx"
                                      focusEnabled="true"
                                      focusIn="mxadvanceddatagriditemrenderer1_focusInHandler(event)">
    protected function mxadvanceddatagriditemrenderer1_focusInHandler(event:FocusEvent):void
         amountTextInput.setFocus();
    Neither of these solutions work. I could just go back to using the inline code, but I'd prefer to not copy and paste that code into several different grids.
    Thanks again for the help.

  • How to make a JFrame not shown in taskbar

    i want to make a frame not shown in taskbar (similiar to jdialog) when clicking a button how can i make it.

    The main containers are JFrame, JDialog, JWindow.
    JFrame shows up on the Task Bar, JDialog and JWindow don't.
    You can't change the basic behaviour in Java code. Maybe you could using JINI, but I not nothing about that.

Maybe you are looking for

  • My 27' iMac goes dim for a few minutes on highest brightness

    My 27' 2011 model iMac goes dim for a few minutes on highest brightness setting then returns, and brifely flickers very faintly for a split second at a time, its driving me crazy, never downloaded anything i shouldnt of, its plugs are all securley in

  • Problem with placing self-signed certificate in trust store on WLS 10.3

    I have had some problems setting up two-way SSL on WLS 10.3.2. 1. I have not been able to use the java properties listed on http://weblogic-wonders.com/weblogic/2010/11/09/enforce-weblogic-to-use-sun-ssl-implementation-rather-than-certicom/ to use th

  • IPOD NANO 5TH GEN Broken Because of Water Damage

    IPOD NANO 5TH GEN water damage, it worked untill i put it on the charger, and it wont start again, Is there anyway to save this IPOD NANO PLEASE HELP

  • Premiere Pro 1.5 AVI Files Not Recognized in CS4

    The AVI files were captured using Adobe Premiere 1.5 from a Canon XH-A1 camcorder. The same AVI files work fine in Pinnacle Studio 14 as well as Adobe Premiere 1.5. Tim

  • CS5 layers error

    Whenever I try to add an adjustment layer to my photo, CS5 won't allow me to use the brush tool. I get either an error saying that the layer is not the same size as the original (and I haven't resized anything) or "could not use the history brush bec