Input textfield focus problem

Hello
I'm developing a series of learning aids and the final screen requires the user to input some text.
I have it working correctly but now need to make it a little more user friendly.
At the moment the only way for the user to input the text is to click in each box. There are a total of 6 input text boxes.
I would like to direct the user to a particular input text and then have them be able to use the tab key or the enter key or mouse clicks to proceed.
As the first step I added the stage.focus = inputStarName1. See code below. As soon as I added the stage.focus = inputStarName1 line I get the dredded error 1009 when the code invokes TypeNames.
What do I need to do to get rid of this error?
Any help will be greatly appreciated.
package
    import flash.display.*;
    import flash.text.*;
    import flash.events.*;
    public class TypeNames extends MovieClip
        public function TypeNames()
            addEventListener(Event.ADDED_TO_STAGE, addedHandler);
            addEventListener(Event.REMOVED_FROM_STAGE, removedHandler);
            backBtn.buttonMode = true;
            resetBtn.buttonMode = true;
            scoreBtn.buttonMode = true;
            backBtn.addEventListener(MouseEvent.CLICK, back);
            resetBtn.addEventListener(MouseEvent.CLICK, reset);
            scoreBtn.addEventListener(MouseEvent.CLICK, mark);
            scoreBtn.alpha = 1;
            feedback.alpha = 0;
            correct1.alpha = 0;
            correct2.alpha = 0;
            correct3.alpha = 0;
            correct4.alpha = 0;
            correct5.alpha = 0;
            correct6.alpha = 0;
            var score:uint = 0;// sets score variable to zero
            // Defines Input text format
            var inputFormat:TextFormat = new TextFormat();
            inputFormat.font = "Arial Bold";
            inputFormat.size = 14;
            inputFormat.align = "center";
            inputFormat.color = 0xffff00;
            //Defines and adds text input boxes for star names
            var inputStarName1:TextField = new TextField();
            inputStarName1.type = "input";
            inputStarName1.defaultTextFormat = inputFormat;
            inputStarName1.x = 12;
            inputStarName1.y = -38;
            inputStarName1.height = 18;
            inputStarName1.width = 70;
            inputStarName1.background = true;
            inputStarName1.border = true;
            inputStarName1.backgroundColor = 0x555555;
            inputStarName1.borderColor = 0xffff00;
            addChild(inputStarName1);
            stage.focus = inputStarName1;

Hi Kglad
Thanks for the prompt response. I tried your suggestion but got error 1120.
The addedHandler function is presently only used to center the screens created by the class packages.
I tried moving the addedHandler function before the constructor but it made no difference.
Just in case there is something else in my code that's messing things up I have copied it in its entirety below.
As you will see I still need to learn how to use arrays and for loops to shorten up my code but I needed to get this operational in a hurry hence the brute force approach.
Thanks again for your help
package
    import flash.display.*;
    import flash.text.*;
    import flash.events.*;
    public class TypeNames extends MovieClip
        public function TypeNames()
            addEventListener(Event.ADDED_TO_STAGE, addedHandler);
            addEventListener(Event.REMOVED_FROM_STAGE, removedHandler);
            backBtn.buttonMode = true;
            resetBtn.buttonMode = true;
            scoreBtn.buttonMode = true;
            backBtn.addEventListener(MouseEvent.CLICK, back);
            resetBtn.addEventListener(MouseEvent.CLICK, reset);
            scoreBtn.addEventListener(MouseEvent.CLICK, mark);
            scoreBtn.alpha = 1;
            feedback.alpha = 0;
            correct1.alpha = 0;
            correct2.alpha = 0;
            correct3.alpha = 0;
            correct4.alpha = 0;
            correct5.alpha = 0;
            correct6.alpha = 0;
            var score:uint = 0;// sets score variable to zero
            // Defines Input text format
            var inputFormat:TextFormat = new TextFormat();
            inputFormat.font = "Arial Bold";
            inputFormat.size = 14;
            inputFormat.align = "center";
            inputFormat.color = 0xffff00;
            //Defines and adds text input boxes for star names
            var inputStarName1:TextField = new TextField();
            inputStarName1.type = "input";
            inputStarName1.defaultTextFormat = inputFormat;
            inputStarName1.x = 12;
            inputStarName1.y = -38;
            inputStarName1.height = 18;
            inputStarName1.width = 70;
            inputStarName1.background = true;
            inputStarName1.border = true;
            inputStarName1.backgroundColor = 0x555555;
            inputStarName1.borderColor = 0xffff00;
            addChild(inputStarName1);
            var inputStarName2:TextField = new TextField();
            inputStarName2.type = "input";
            inputStarName2.defaultTextFormat = inputFormat;
            inputStarName2.x = -270;
            inputStarName2.y = -98;
            inputStarName2.height = 18;
            inputStarName2.width = 80;
            inputStarName2.background = true;
            inputStarName2.border = true;
            inputStarName2.backgroundColor = 0x555555;
            inputStarName2.borderColor = 0xffff00;
            addChild(inputStarName2);
            var inputStarName3:TextField = new TextField();
            inputStarName3.type = "input";
            inputStarName3.defaultTextFormat = inputFormat;
            inputStarName3.x = 75.3;
            inputStarName3.y = 38.3;
            inputStarName3.height = 18;
            inputStarName3.width = 70;
            inputStarName3.background = true;
            inputStarName3.border = true;
            inputStarName3.backgroundColor = 0x555555;
            inputStarName3.borderColor = 0xffff00;
            addChild(inputStarName3);
            var inputStarName4:TextField = new TextField();
            inputStarName4.type = "input";
            inputStarName4.defaultTextFormat = inputFormat;
            inputStarName4.x = 227.45;
            inputStarName4.y = 99.26;
            inputStarName4.height = 18;
            inputStarName4.width = 70;
            inputStarName4.background = true;
            inputStarName4.border = true;
            inputStarName4.backgroundColor = 0x555555;
            inputStarName4.borderColor = 0xffff00;
            addChild(inputStarName4);
            var inputStarName5:TextField = new TextField();
            inputStarName5.type = "input";
            inputStarName5.defaultTextFormat = inputFormat;
            inputStarName5.x = 94.45;
            inputStarName5.y = -72;
            inputStarName5.height = 18;
            inputStarName5.width = 70;
            inputStarName5.background = true;
            inputStarName5.border = true;
            inputStarName5.backgroundColor = 0x555555;
            inputStarName5.borderColor = 0xffff00;
            addChild(inputStarName5);
            var inputStarName6:TextField = new TextField();
            inputStarName6.type = "input";
            inputStarName6.defaultTextFormat = inputFormat;
            inputStarName6.x = 211;
            inputStarName6.y = 29.5;
            inputStarName6.height = 18;
            inputStarName6.width = 70;
            inputStarName6.background = true;
            inputStarName6.border = true;
            inputStarName6.backgroundColor = 0x555555;
            inputStarName6.borderColor = 0xffff00;
            addChild(inputStarName6);
            function mark(event:MouseEvent):void
                if (inputStarName1.text.toUpperCase() == "POLARIS"
                    && inputStarName2.text.toUpperCase() == "SCHEDAR"
                    && inputStarName3.text.toUpperCase() == "KOCHAB"
                    && inputStarName4.text.toUpperCase() == "ALKAID"
                    && inputStarName5.text.toUpperCase() == "DUBHE"
                    && inputStarName6.text.toUpperCase() == "ALIOTH")
                    MovieClip(parent).gotoReward();
                else
                    feedback.alpha = 1;
                if (inputStarName1.text.toUpperCase() !== "POLARIS")
                    correct1.alpha = 1;
                    correct1.text = "Polaris";
                if (inputStarName2.text.toUpperCase() !== "SCHEDAR")
                    correct2.alpha = 1;
                    correct2.text = "Schedar";
                if (inputStarName3.text.toUpperCase() !== "KOCHAB")
                    correct3.alpha = 1;
                    correct3.text = "Kochab";
                if (inputStarName4.text.toUpperCase() !== "ALKAID" )
                    correct4.alpha = 1;
                    correct4.text = "Alkaid";
                if (inputStarName5.text.toUpperCase() !== "DUBHE" )
                    correct5.alpha = 1;
                    correct5.text = "Dubhe";
                if (inputStarName6.text.toUpperCase() !== "ALIOTH")
                    correct6.alpha = 1;
                    correct6.text = "Alioth";
        private function reset(event:MouseEvent):void
            MovieClip(parent).gotoType();
        private function addedHandler(event:Event):void
            this.x = stage.stageWidth / 2;
            this.y = stage.stageHeight / 2;
        private function removedHandler(event:Event):void
        private function back(event:MouseEvent):void
            MovieClip(parent).gotoLearn();

Similar Messages

  • Weird focus problems (& 1 workaround)

    I am building a wizard with an extension of JDialog. Based on earlier input, I create the JDialog with a bunch of JPanels each with a combobox and a textfield. I have a next, cancel, and back button at the bottom on its own panel. I also have a "Finish" button when I reach the last panel. So I have to change the buttonPanel by putting the finish button on at the end and I put the next button back on when coming back from the last panel.
    The problems I have been running into involve getting focus to one of the JTextfields mentioned above. I had a problem when I built my JDialog after clicking the next button. I removed everything from my ContentPane (cp) using cp.removeAll(). After building my JDialog, my code trys to give focus to the first text field. It wouldn't. I tested the text field and it is indeed focusable, visible, and displayable.
    The fix was removing each individual component from the content pane instead of doing the removeAll(). Then, after adding everything to the content pane, my textfield could grab the focus.
    The only problem that remains is with the back button. When I move back from the final panel the following code is executed:
    buttonPanel.removeAll();
    //buttonPanel.remove(backButton);
    //buttonPanel.remove(finalButton);
    //buttonPanel.remove(cancelButton);
    buttonPanel.add(backButton);
    buttonPanel.add(nextButton);
    buttonPanel.add(cancelButton);
    Then, as in other cases, the buttonPanel object is added to the content pane. This causes the textfield to be unable to grab focus. I commented out the code and the focus worked fine (but of course my buttonPanel was not correct).
    This is happening with 1.4.1 on windows 2000. I don't have another computer to test this one.
    Am I doing something inherently wrong or is this a bug?
    I've looked around and there are a lot of problems reported with focus and swing, but I wasn't sure if this was a symptom of those problems or if this is something different.
    I appreciate any help you can give.
    thanks,
    Geoff

    I won't throw everything at you but this should be plenty. If anyone needs any explanations I am not going anywhere. I'm trying to figure out if the problem is a bug or not.
    The workaround is mentioned in a comment for the action listener of nextButton. The problem piece of code that is mentioned at the top of this thread is also commented and it is part of the action listener for backButton.
    There are some declarations I have left out and I've left out some helper functions and some private classes, but I looked at it closely. There shouldn't be anything that is a mystery here. But, again, if anything is unclear just give a shout.
    thanks in advance,
    Geoff
    public InfoDialog(JFrame owner, int[] results)
         super(owner, "Wizard", true);
         cp = getContentPane();
         this.owner = owner;
         answers = results;
         lastPanel = answers.length-1;
         //figure out number of panels and last one greater than 0
         for(int i =0; i<answers.length; i++)
              numPanels++;
              if(answers>0)
                   lastPanel = i;
         if(numPanels==0)
              return;
         nameVectors = new Vector[answers.length];
         typeVectors = new Vector[answers.length];
         while(answers[currentPanel]<=0 && currentPanel<answers.length)
              currentPanel++;
         firstPanel = currentPanel;
         inputLabel = new JLabel();
         inputLabel.setAlignmentX(Component.CENTER_ALIGNMENT);
         inputLabel.setText(getInputLabelText(currentPanel));
         panelArray = new JPanel[answers[currentPanel]];
         nameVectors[currentPanel] = new Vector();
         typeVectors[currentPanel] = new Vector();
         comboArray = new ClassComboBox[answers[currentPanel]];
         textArray = new StringTextField[answers[currentPanel]];
         for(int i=0; i<panelArray.length; i++)
              panelArray[i] = new JPanel();
              panelArray[i].setLayout(new BoxLayout(panelArray[i], BoxLayout.X_AXIS));
              comboArray[i] = new ClassComboBox();
              panelArray[i].add(comboArray[i]);
              textArray[i] = new StringTextField(new String(""));
              panelArray[i].add(textArray[i]);
         cp.setLayout(new BoxLayout(cp, BoxLayout.Y_AXIS));
         //cp.add(infoPanel);
         cp.add(inputLabel);
         for(int i=0; i<panelArray.length; i++)
              cp.add(panelArray[i]);
         //infoPanel = new JPanel();
         //infoPanel.setLayout(new BoxLayout(infoPanel, BoxLayout.X_AXIS));
         //infoPanel.add(new ClassComboBox());
         //infoPanel.add(new StringTextField(new String("")));
         //cp.add(infoPanel);
         backButton = new JButton("Back");
         backButton.setEnabled(false);
         backButton.addActionListener(new ActionListener(){
              public void actionPerformed(ActionEvent ae){
                   //save values of previous panel into vector
                   typeVectors[currentPanel] = null;
                   nameVectors[currentPanel] = null;
                   typeVectors[currentPanel] = new Vector();
                   nameVectors[currentPanel] = new Vector();
                   for(int i=0; i<panelArray.length; i++)
                        typeVectors[currentPanel].add((String)comboArray[i].getSelectedItem());
                        nameVectors[currentPanel].add(textArray[i].getText());
                   //remove everything from JDialog
                   //cp.removeAll();
                   cp.remove(inputLabel);
                   for(int i=0; i<panelArray.length; i++)
                        cp.remove(panelArray[i]);
                   cp.remove(buttonPanel);
                   //store last panel, figure out what the new currentPanel val is
                   int previousPanel = currentPanel;
                   currentPanel--;
                   while(answers[currentPanel]<=0 && currentPanel >= firstPanel)
                        currentPanel--;
                   //go through panelArray getting rid of its subcomponents
                   for(int i=0; i<panelArray.length; i++)
                        panelArray[i].removeAll();
                   panelArray = null;
                   comboArray = null;
                   textArray = null;
                   //arrays will be initialized to the appropriate length for the currentPanel
                   panelArray = new JPanel[answers[currentPanel]];                    
                   comboArray = new ClassComboBox[answers[currentPanel]];
                   textArray = new StringTextField[answers[currentPanel]];
                   //inputLabel.setText(pinTypes[currentPanel]);
                   inputLabel.setText(getInputLabelText(currentPanel));
                   cp.add(inputLabel);
                   for(int i=0; i<panelArray.length; i++)
                        panelArray[i] = new JPanel();
                        panelArray[i].setLayout(new BoxLayout(panelArray[i], BoxLayout.X_AXIS));
                        comboArray[i] = new ClassComboBox();
                        comboArray[i].setSelectedItem(typeVectors[currentPanel].get(i));
                        panelArray[i].add(comboArray[i]);
                        //textArray[i] = new StringTextField(new String(""));
                        textArray[i] = new StringTextField((String)nameVectors[currentPanel].get(i));
                        panelArray[i].add(textArray[i]);
                        cp.add(panelArray[i]);
                   //focus problem is caused by this block of code
                   //moving back from last panel
                   if((currentPanel == lastPanel-1) && previousPanel==lastPanel)
                        buttonPanel.removeAll();
                        //the following code did not fix the problem
                        //buttonPanel.remove(backButton);
                        //buttonPanel.remove(finalButton);
                        //buttonPanel.remove(cancelButton);
                        buttonPanel.add(backButton);
                        buttonPanel.add(nextButton);
                        buttonPanel.add(cancelButton);
                   if(currentPanel==firstPanel)
                        backButton.setEnabled(false);
                   cp.add(buttonPanel);
                   //System.out.println();
                   //System.out.println("textArray[0].isVisibile: " + textArray[0].isVisible());
                   //System.out.println("textArray[0].isDisplayable: " + textArray[0].isDisplayable());
                   //System.out.println("textArray[0].isFocusable: " + textArray[0].isFocusable());
                   //textArray[0].grabFocus();
                   pack();
                   //repaint();
                   System.out.println();
                   System.out.println("textArray[0].isVisibile: " + textArray[0].isVisible());
                   System.out.println("textArray[0].isDisplayable: " + textArray[0].isDisplayable());
                   System.out.println("textArray[0].isFocusable: " + textArray[0].isFocusable());
                   textArray[0].grabFocus();
         nextButton = new JButton("Next");
         nextButton.addActionListener(new ActionListener(){
              public void actionPerformed(ActionEvent ae){
                   //logic to grab information from JComboBox and JTextField
                   typeVectors[currentPanel] = null;
                   nameVectors[currentPanel] = null;
                   typeVectors[currentPanel] = new Vector();
                   nameVectors[currentPanel] = new Vector();
                   for(int i=0; i<panelArray.length; i++)
                        typeVectors[currentPanel].add((String)comboArray[i].getSelectedItem());
                        nameVectors[currentPanel].add(textArray[i].getText());
                   //here is the code that didn't work and the subsequent code
                   //that fixed the problem
                   //cp.removeAll();
                   cp.remove(inputLabel);
                   for(int i=0; i<panelArray.length; i++)
                        cp.remove(panelArray[i]);
                   cp.remove(buttonPanel);
                   currentPanel++;
                   //System.out.println("currentPanel prior to processing: " + currentPanel);
                   if(currentPanel<(answers.length-1))
                        while(answers[currentPanel]<=0 && currentPanel<lastPanel)
                             currentPanel++;
                   for(int i=0; i<panelArray.length; i++)
                        panelArray[i].removeAll();
                        //comboArray[i].removeAll();
                        //textArray[i].removeAll();
                   panelArray = null;
                   comboArray = null;
                   textArray = null;
                   panelArray = new JPanel[answers[currentPanel]];
                   inputLabel.setText(getInputLabelText(currentPanel));
                   cp.add(inputLabel);
                   //test to see if this is the first time reaching this point
                   //if you haven't reached this point before, vector will be null
                   boolean firstTime = false;
                   if(nameVectors[currentPanel]==null)
                        firstTime = true;
                   if(firstTime)
                        nameVectors[currentPanel] = new Vector();
                        typeVectors[currentPanel] = new Vector();
                   comboArray = new ClassComboBox[answers[currentPanel]];
                   textArray = new StringTextField[answers[currentPanel]];
                   //establish the proper # of combo boxes & text fields
                   int len = panelArray.length;
                   for(int i=0; i<len; i++)
                        panelArray[i] = new JPanel();
                        panelArray[i].setLayout(new BoxLayout(panelArray[i], BoxLayout.X_AXIS));
                        comboArray[i] = new ClassComboBox();
                        if(!firstTime)
                             comboArray[i].setSelectedItem(typeVectors[currentPanel].get(i));
                        panelArray[i].add(comboArray[i]);
                        textArray[i] = new StringTextField();
                        if(!firstTime)
                             textArray[i].setText((String)nameVectors[currentPanel].get(i));
                        panelArray[i].add(textArray[i]);
                        cp.add(panelArray[i]);
                   if(currentPanel==lastPanel)
                        buttonPanel.removeAll();
                        buttonPanel.add(backButton);
                        buttonPanel.add(finalButton);
                        buttonPanel.add(cancelButton);
                   backButton.setEnabled(true);
                   cp.add(buttonPanel);
                   //textArray[0].requestFocus();
                   //System.out.println();
                   //System.out.println("textArray[0].isVisibile: " + textArray[0].isVisible());
                   //System.out.println("textArray[0].isDisplayable: " + textArray[0].isDisplayable());
                   //System.out.println("textArray[0].isFocusable: " + textArray[0].isFocusable());
                   //textArray[0].grabFocus();
                   pack();
                   //System.out.println();
                   //System.out.println("textArray[0].isVisibile: " + textArray[0].isVisible());
                   //System.out.println("textArray[0].isDisplayable: " + textArray[0].isDisplayable());
                   //System.out.println("textArray[0].isFocusable: " + textArray[0].isFocusable());
                   textArray[0].grabFocus();
         setLocationRelativeTo(owner);
         setVisible(true);          

  • TextField Focus

    Hello there,
    I am new to AS3 and trying to figure out how to set a focus to a textfield on the stage. I found out that if I use
    stage.focus = tf; then the tf get the focus and it does, when I type letters they go directly to this textfield.
    Problems are,
    I don't have a blinking cursor in the textfield.
    I added event listener to catch up when the user press the  ENTER  key but it catches the ENTER key ONLY after I click the textfield with the mouse and having a blinking cursor in that textfield.
    Any idea ?
    regards,

    Are you seeing this behavior in the testing environment or when you put the flash into an html page?
    In the testing environment you might want to go to the Control menu and select Disable keyboard shortcuts. That will give you a better representation of how things will actually work when they are standing on their own.
    Also there is some kind of issue around setting the focus. The swf object has to have already received a click before it can set the blinking I-beam into an input text field. It is a "security" type of thing. To prevent a malicious swf from looking like some kind of interactive password field and grabbing someone's password or the like.
    Depending upon what you are doing you can have a "Start" button or something to make sure that the user has clicked the flash before flash can be able to set the focus.

  • Calling1.4.1 signed applet from Javascript causes keyboard/focus problems

    Pretty sure there's a JRE bug here, but I'm posting to forums before I open one in case I'm missing something obvious :-)
    This issue may be specific to IE, I haven't tested elsewhere yet. Our web application is centered around a signed applet that is initialized with XML data via Javascript. We first noticed the problem when our users started upgrading from the 1.3.x plug-in to the 1.4.x plug-in. The major symptom was that shortcut keys stopped working. I debugged the problem off and on for about a month before I boiled it down to a very simple program that demonstrates the issue (included below). Basically, the program has a function that adds a JButton to a JPanel and registers a keyboard listener (using the new DefaultKeyboardFocusManager class) that prints a message to the console. This function is called by the applet's init() method, as well as by a public method that can be called from Javascript (called callMeFromJavascript()). I also included a very simple HTML file that provides a button that calls the callMeFromJavascript() method. You can test this out yourself: To recreate, compile the class below, JAR it up, sign the JAR, and put in the same dir with the HTML file. Load the HTML file in IE 5.0 or greater, and bring the console up in a window right next to it. Now click the button that says init--you should see the small box appear inside the button that indicates it has the focus. Now press some keys on your keyboard. You should see "KEY PRESSED!!!" appearing in the console. This is proper behavior. Now click the Init Applet from Javascript button. It has removed the button called init, and added one called "javascript". Press this button. Notice there is no focus occurring. Now press your keyboard. No keyboard events are registered.
    Where is gets interesting is that if you go back and make this an unsigned applet, and try it again, everything works fine. This bug only occurs if the applet is signed.
    Furthermore, if you try it in 1.3, signed or unsigned, it also works. So this is almost certainly a 1.4 bug.
    Anyone disagree? Better yet, anyone have a workaround? I've tried everything I could think of, including launching a thread from the init() method that sets up the components, and then just waits for the data to be set by Javascript. But it seems that ANY communication between the method called by Javascript and the code originating in init() corrupts something and we don't get keyboard events. This bug is killing my users who are very reliant on their shortcut keys for productivity, and we have a somewhat unique user interface that relies on Javascript for initialization. Any help or suggestions are appreciated.
    ================================================================
    Java Applet (Put it in a signed JAR called mainapplet.jar)
    ================================================================
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MainApplet extends JApplet implements KeyEventDispatcher
        JPanel test;
        public void init()
            System.out.println("init called");
            setUp("init");
        public void callMeFromJavascript()
            System.out.println("callMeFromJavascript called");
            setUp("javascript");
        private void setUp(String label)
            getContentPane().removeAll();
            test = new JPanel();
            getContentPane().add( test );
            JButton button = new JButton(label);
            test.add( button );
            test.updateUI();
            DefaultKeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this);
        public boolean dispatchKeyEvent(KeyEvent e)
            System.out.println("== KEY PRESSED!!! ==");
            return false;
    }================================================================
    HTML
    ================================================================
    <form>
    <APPLET code="MainApplet" archive="mainapplet.jar" align="baseline" id="blah"
         width="200" height="400">
         No Java 2 SDK, Standard Edition v 1.4.1 support for APPLET!!
    </APPLET>
    <p>
    <input type="button" onClick="document.blah.callMeFromJavascript();" value="Init Applet via Javascript">
    </form>

    I tried adding the requestFocus() line you suggested... Same behavior.
    A good thought, but as I mention in my description, the applet has no trouble gaining the focus initially (when init() is called). From what I have seen, it is only when the call stack has been touched by Javascript that I see problems. This is strange though: Your post gave me the idea of popping the whole panel into a JFrame... I tried it, and the keyboard/focus problem went away! It seems to happen only when the component hierarchy is descended from the JApplet's content pane. So that adds yet another variable: JRE 1.4 + Signed + Javascript + components descended from JApplet content pane.
    And yes, signed or unsigned DOES seem to make a difference. Don't ask me to explain why, but I have run this little applet through quite a few single variable tests (change one variable and see what happens). The same JAR that can't receive keyboard events when signed, works just fine unsigned. Trust me, I'm just as baffled as you are.

  • Focus problem since jre 1.4.2_11

    Hi,
    I have a awkward focus problem with my java applet. Everything is working fine for jre 1.4.2_10 and all older jre.
    The applet is embedded in a large DHTML application running in a shell which uses the internet explorer for rendering. The applet communicates with the sorrounding java script via LiveConnect (JSObjects). We do use the static versioning, in order to determine the adaequate vm version. The controls are all based upon the swing controls, some are a bit modified.
    Since the introduction of jre 1.5 update 6 the static versioning does no longer work properly. So, when I run my applet with 1.4.2_11 and all the predecessors a strange focus problem occurs.
    When I click outside the applet (focus lost) and the click on a jscript control to get back the focus to the applet, the keyboard input does not reach the applet. The comboboxes do not work anymore. A mouse click is recognized, but the data-list which should appear is only flickering for a moment.
    The only way to get the focus back, is to make a mouseclick on a selfmade datepicker (based on swing, implemeted like a popup-window). For sure, the large DHTML application is guilty, but definitely diffrent VM versions do behave differntly.
    Does anyone has an idea, has seen similar effects or knows what has been changed in the jre between 1.4.2_10 and 1.4.2_11 ??
    Any hint is appeciated! I am lost :-(((
    cheers thorsten

    Two things: Is there a document detailing manual removal of this JRE (and indeed others); you mention different 'builds' of the same JRE, this is the first time I have read that there are sub-versions/releases of a JRE. Where do I find out the available builds of this JRE and others and how they differ?

  • Setting the background color of the selection when text selected (input TextField)

    My input TextField has a black background. The problem is,
    when some text is enter and then selected, the selection background
    color remains black and the selected text remains white. Because of
    this it's imposible to tell that the text has been selected. Is
    there a way to change the selection background color, or do I
    really have to write a custom textfield? :(

    Yes, I do have an additional attribute called "identity" which is set to the original table where it came from. The problem is that I do not know how to check for it in my renderer. I will post my renderer code here
    public class myTableRenderer extends DefaultTableCellRenderer{
    public Component getTableCellRendererComponent( JTable table,Object value,boolean isSelected,boolean hasFocus,int row,int column) {
    final Component component = super.getTableCellRendererComponent(table, value,isSelected,hasFocus, row, column);
    if ( value != null ) {
    if ( value instanceof String ) {
    String val = value.toString();
    if ( val.compareTo("DisplayKnown") == 0 ) {
    component.setBackground(Color.CYAN);
    else
    component.setBackground(Color.LIGHT_GRAY);
    } // end if value not null
    return component;
    } // end mytablerenderer
    What happens here, is that only the column with the identity value "DisplayKnown" gets the color blue. I would like to color the whole row with that column value to be Blue.
    Does this make sense??
    Thanks,
    npatel

  • Input textfields for arabic language with Flex

    Hi!
    I would like to know how flex work with arabic language. Does
    it permet to write text correctly in input textfield, or is ti the
    same problem as in Flash 8 Pro ?
    Thanks for your help
    Damien

    The Flash Player itself does not easily support right-to-left
    text manipulation.
    We all hope this will be addressed in an early future
    version, but there have been no announcements.
    Tracy

  • Textfield-focus within a tabbedpane

    Hi all,
    I have the following focus-problem.
    I have a tabbed-pane with 4-register-cards. First I'm intit the first at last the fourth.
    Now I want that a text-field on the first register-card have the focus. I try it to do it this way:
    public void stateChanged(ChangeEvent event) {
         if (tabbedPane.getSelectedIndex()==3) {
              if (textFieldUser!=null){
                   textFieldUser.setText(" This text-output works well ! ");
                   textFieldUser.requestFocus();
    Now the textfield display the output-text, but the field themselves have no focus?
    If I click on the tab No 2 and go back to No. 1 the field have the focus in the way that I want !?

    Archana1604 wrote:
    You need not use requestFocusInWindow to set the focus for a component. You can simple use requestFocus() inorder to set the focus.Please read the API and don't post bad advice.
    JComponent#requestFocus
    Note that the use of this method is discouraged because its behavior is platform dependent. Instead we recommend the use of requestFocusInWindow(). If you would like more information on focus, see [How to Use the Focus Subsystem|http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html], a section in The Java Tutorial.
    db

  • Focus Problem on Solaris with jdk 1.3.1

    Hi all,
    We are having a focus problem on Solaris. The same code works fine on Windows without any problem.
    I am sending the test code and run steps below which you can compile and repeat the problem.
    NOTE: When we put a comment on the line "f1.requestFocus();" in TestFocus.java it works OK.
    Run Steps :
    1. Run TestFocus.class
    2. A JFrame appears with 2 text field and a button
    3. Try to write something on the text fields. It works OK.
    4. Click the button to open a new JFrame
    5. A new JFrame opens with a single text field and a button.
    6. Click the button to close the second frame
    7. You are now on the main JFrame
    8. Try to write something on the text fields. It works OK.
    9. Repeat the steps 4-7
    10. Try to write something on the text fields. You are able to focus and write on the first field. BUT you cannot select or write the second Field!
    JAVA SOURCE FILES :
    PenHesapListener.java :
    public interface PenHesapListener extends java.util.EventListener {
    void tamam_actionPerformed(java.util.EventObject newEvent);
    void iptal_actionPerformed(java.util.EventObject newEvent);
    ------PenHesapLisEventMulticaster.java----------------------------------
    public class PenHesapLisEventMulticaster extends java.awt.AWTEventMulticaster implements PenHesapListener {
    * Constructor to support multicast events.
    * @param a java.util.EventListener
    * @param b java.util.EventListener
    protected PenHesapLisEventMulticaster(java.util.EventListener a, java.util.EventListener b) {
         super(a, b);
    * Add new listener to support multicast events.
    * @return muhasebe.HesappenListener
    * @param a muhasebe.HesappenListener
    * @param b muhasebe.HesappenListener
    public static PenHesapListener add(PenHesapListener a, PenHesapListener b) {
         return (PenHesapListener)addInternal(a, b);
    * Add new listener to support multicast events.
    * @return java.util.EventListener
    * @param a java.util.EventListener
    * @param b java.util.EventListener
    protected static java.util.EventListener addInternal(java.util.EventListener a, java.util.EventListener b) {
         if (a == null) return b;
         if (b == null) return a;
         return new PenHesapLisEventMulticaster(a, b);
    * @return java.util.EventListener
    * @param oldl muhasebe.HesappenListener
    protected java.util.EventListener remove(PenHesapListener oldl) {
         if (oldl == a) return b;
         if (oldl == b) return a;
         java.util.EventListener a2 = removeInternal(a, oldl);
         java.util.EventListener b2 = removeInternal(b, oldl);
         if (a2 == a && b2 == b)
              return this;
         return addInternal(a2, b2);
    * Remove listener to support multicast events.
    * @return muhasebe.HesappenListener
    * @param l muhasebe.HesappenListener
    * @param oldl muhasebe.HesappenListener
    public static PenHesapListener remove(PenHesapListener l, PenHesapListener oldl) {
         if (l == oldl || l == null)
              return null;
         if(l instanceof PenHesapLisEventMulticaster)
              return (PenHesapListener)((PenHesapLisEventMulticaster) l).remove(oldl);
         return l;
    public void tamam_actionPerformed(java.util.EventObject newEvent) {
         ((PenHesapListener)a).tamam_actionPerformed(newEvent);
         ((PenHesapListener)b).tamam_actionPerformed(newEvent);
    public void iptal_actionPerformed(java.util.EventObject newEvent) {
         ((PenHesapListener)a).iptal_actionPerformed(newEvent);
         ((PenHesapListener)b).iptal_actionPerformed(newEvent);
    ---------TestFocus2.java-----------------------------------------
    import javax.swing.*;
    import javax.swing.JOptionPane;
    import java.awt.event.WindowAdapter;
    import java.awt.event.KeyListener;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowEvent;
    import java.awt.event.ActionListener;
    import java.util.ArrayList;
    import java.util.StringTokenizer;
    import java.text.SimpleDateFormat;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.Color;
    import java.util.Locale;
    import java.util.ResourceBundle;
    public class TestFocus2 extends JFrame implements ActionListener
         protected transient PenHesapListener PenhListener = null ;
         JTextField f10 = null;
         JButton b10= null ;
         JTextField f1 = new JTextField() ;
         JButton b1 = new JButton() ;
         JFrame f20 = null;
         public TestFocus2()
              getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
              getContentPane().add(f1);
              getContentPane().add(b1);
              pack();
              setVisible(true);
              b1.addActionListener(this);
         public void actionPerformed(ActionEvent e)
              if(e.getSource() == b1)
                   fireTamam_actionPerformed(e);
         public void addPenHesapListener(PenHesapListener newListener)
              PenhListener = PenHesapLisEventMulticaster.add(PenhListener, newListener);
              return;
         protected void fireTamam_actionPerformed(java.util.EventObject newEvent) {
              PenhListener.tamam_actionPerformed(newEvent);
              this.setVisible(false);
         protected void fireiptal_actionPerformed(java.util.EventObject newEvent) {
              PenhListener.iptal_actionPerformed(newEvent);
         public static void main(String x[])
              TestFocus2 gen01 = new TestFocus2();
    --------TestFocus.java-----------------------------------
    import javax.swing.*;
    import javax.swing.JOptionPane;
    import java.awt.event.WindowAdapter;
    import java.awt.event.KeyListener;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowEvent;
    import java.awt.event.ActionListener;
    import java.util.ArrayList;
    import java.util.StringTokenizer;
    import java.text.SimpleDateFormat;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.Color;
    import java.util.Locale;
    import java.util.ResourceBundle;
    import java.awt.Container;
    public class TestFocus extends JFrame implements ActionListener
         PenKreKart aPenKreKart = null ;      
         Container ctn = null;
         JTextField f10 = null;
         JButton b10= null ;
         JTextField f1 = new JTextField() ;
         JTextField f2 = new JTextField() ;
         JButton b1 = new JButton() ;
         JFrame f20 = null;
         public TestFocus()
              //aPenKreKart = new PenKreKart(true);
              //aPenKreKart.aTemelPencere.setVisible(false);
              getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
              getContentPane().add(f1);
              getContentPane().add(f2);
              getContentPane().add(b1);
              pack();
              setVisible(true);
              b1.addActionListener(this);
         public void actionPerformed(ActionEvent e)
              if(e.getSource() == b1)
                   pencere_islemi();
         // pencere koyma k?sm? .. begin                               
         public void pencere_islemi() {     
              ctn = this;
              ctn.setEnabled(false);
              TestFocus2 fpen = new TestFocus2();
              //aPenKreKart.aTemelPencere.setVisible(true); //buras?          
              //aPenKreKart.aTemelPencere.addPenHesapListener(new PenHesapListener() {
              fpen.addPenHesapListener(new PenHesapListener() {
                        // metod      tamam_actionPerformed begin...          
                        public void tamam_actionPerformed(java.util.EventObject newEvent) {
                             ctn.setEnabled(true);
                             ctn.requestFocus();
                             // Problem is when we comment the below line it works .....
                             f1.requestFocus();
                             System.out.println("tamam");
                        // metod      tamam_actionPerformed end...          
                        // metod      iptal_actionPerformed begin...          
                        public void iptal_actionPerformed(java.util.EventObject newEvent) {
                             ctn.setEnabled(true);
                             ctn.requestFocus();
                             System.out.println("iptal");
                        // metod      iptal_actionPerformed begin...          
         // pencere koyma k?sm? .. end                               
         public static void main(String x[])
              TestFocus gen01 = new TestFocus();

    Hi all,
    We are having a focus problem on Solaris. The same code works fine on Windows without any problem.
    I am sending the test code and run steps below which you can compile and repeat the problem.
    NOTE: When we put a comment on the line "f1.requestFocus();" in TestFocus.java it works OK.
    Run Steps :
    1. Run TestFocus.class
    2. A JFrame appears with 2 text field and a button
    3. Try to write something on the text fields. It works OK.
    4. Click the button to open a new JFrame
    5. A new JFrame opens with a single text field and a button.
    6. Click the button to close the second frame
    7. You are now on the main JFrame
    8. Try to write something on the text fields. It works OK.
    9. Repeat the steps 4-7
    10. Try to write something on the text fields. You are able to focus and write on the first field. BUT you cannot select or write the second Field!
    JAVA SOURCE FILES :
    PenHesapListener.java :
    public interface PenHesapListener extends java.util.EventListener {
    void tamam_actionPerformed(java.util.EventObject newEvent);
    void iptal_actionPerformed(java.util.EventObject newEvent);
    ------PenHesapLisEventMulticaster.java----------------------------------
    public class PenHesapLisEventMulticaster extends java.awt.AWTEventMulticaster implements PenHesapListener {
    * Constructor to support multicast events.
    * @param a java.util.EventListener
    * @param b java.util.EventListener
    protected PenHesapLisEventMulticaster(java.util.EventListener a, java.util.EventListener b) {
         super(a, b);
    * Add new listener to support multicast events.
    * @return muhasebe.HesappenListener
    * @param a muhasebe.HesappenListener
    * @param b muhasebe.HesappenListener
    public static PenHesapListener add(PenHesapListener a, PenHesapListener b) {
         return (PenHesapListener)addInternal(a, b);
    * Add new listener to support multicast events.
    * @return java.util.EventListener
    * @param a java.util.EventListener
    * @param b java.util.EventListener
    protected static java.util.EventListener addInternal(java.util.EventListener a, java.util.EventListener b) {
         if (a == null) return b;
         if (b == null) return a;
         return new PenHesapLisEventMulticaster(a, b);
    * @return java.util.EventListener
    * @param oldl muhasebe.HesappenListener
    protected java.util.EventListener remove(PenHesapListener oldl) {
         if (oldl == a) return b;
         if (oldl == b) return a;
         java.util.EventListener a2 = removeInternal(a, oldl);
         java.util.EventListener b2 = removeInternal(b, oldl);
         if (a2 == a && b2 == b)
              return this;
         return addInternal(a2, b2);
    * Remove listener to support multicast events.
    * @return muhasebe.HesappenListener
    * @param l muhasebe.HesappenListener
    * @param oldl muhasebe.HesappenListener
    public static PenHesapListener remove(PenHesapListener l, PenHesapListener oldl) {
         if (l == oldl || l == null)
              return null;
         if(l instanceof PenHesapLisEventMulticaster)
              return (PenHesapListener)((PenHesapLisEventMulticaster) l).remove(oldl);
         return l;
    public void tamam_actionPerformed(java.util.EventObject newEvent) {
         ((PenHesapListener)a).tamam_actionPerformed(newEvent);
         ((PenHesapListener)b).tamam_actionPerformed(newEvent);
    public void iptal_actionPerformed(java.util.EventObject newEvent) {
         ((PenHesapListener)a).iptal_actionPerformed(newEvent);
         ((PenHesapListener)b).iptal_actionPerformed(newEvent);
    ---------TestFocus2.java-----------------------------------------
    import javax.swing.*;
    import javax.swing.JOptionPane;
    import java.awt.event.WindowAdapter;
    import java.awt.event.KeyListener;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowEvent;
    import java.awt.event.ActionListener;
    import java.util.ArrayList;
    import java.util.StringTokenizer;
    import java.text.SimpleDateFormat;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.Color;
    import java.util.Locale;
    import java.util.ResourceBundle;
    public class TestFocus2 extends JFrame implements ActionListener
         protected transient PenHesapListener PenhListener = null ;
         JTextField f10 = null;
         JButton b10= null ;
         JTextField f1 = new JTextField() ;
         JButton b1 = new JButton() ;
         JFrame f20 = null;
         public TestFocus2()
              getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
              getContentPane().add(f1);
              getContentPane().add(b1);
              pack();
              setVisible(true);
              b1.addActionListener(this);
         public void actionPerformed(ActionEvent e)
              if(e.getSource() == b1)
                   fireTamam_actionPerformed(e);
         public void addPenHesapListener(PenHesapListener newListener)
              PenhListener = PenHesapLisEventMulticaster.add(PenhListener, newListener);
              return;
         protected void fireTamam_actionPerformed(java.util.EventObject newEvent) {
              PenhListener.tamam_actionPerformed(newEvent);
              this.setVisible(false);
         protected void fireiptal_actionPerformed(java.util.EventObject newEvent) {
              PenhListener.iptal_actionPerformed(newEvent);
         public static void main(String x[])
              TestFocus2 gen01 = new TestFocus2();
    --------TestFocus.java-----------------------------------
    import javax.swing.*;
    import javax.swing.JOptionPane;
    import java.awt.event.WindowAdapter;
    import java.awt.event.KeyListener;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowEvent;
    import java.awt.event.ActionListener;
    import java.util.ArrayList;
    import java.util.StringTokenizer;
    import java.text.SimpleDateFormat;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.Color;
    import java.util.Locale;
    import java.util.ResourceBundle;
    import java.awt.Container;
    public class TestFocus extends JFrame implements ActionListener
         PenKreKart aPenKreKart = null ;      
         Container ctn = null;
         JTextField f10 = null;
         JButton b10= null ;
         JTextField f1 = new JTextField() ;
         JTextField f2 = new JTextField() ;
         JButton b1 = new JButton() ;
         JFrame f20 = null;
         public TestFocus()
              //aPenKreKart = new PenKreKart(true);
              //aPenKreKart.aTemelPencere.setVisible(false);
              getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
              getContentPane().add(f1);
              getContentPane().add(f2);
              getContentPane().add(b1);
              pack();
              setVisible(true);
              b1.addActionListener(this);
         public void actionPerformed(ActionEvent e)
              if(e.getSource() == b1)
                   pencere_islemi();
         // pencere koyma k?sm? .. begin                               
         public void pencere_islemi() {     
              ctn = this;
              ctn.setEnabled(false);
              TestFocus2 fpen = new TestFocus2();
              //aPenKreKart.aTemelPencere.setVisible(true); //buras?          
              //aPenKreKart.aTemelPencere.addPenHesapListener(new PenHesapListener() {
              fpen.addPenHesapListener(new PenHesapListener() {
                        // metod      tamam_actionPerformed begin...          
                        public void tamam_actionPerformed(java.util.EventObject newEvent) {
                             ctn.setEnabled(true);
                             ctn.requestFocus();
                             // Problem is when we comment the below line it works .....
                             f1.requestFocus();
                             System.out.println("tamam");
                        // metod      tamam_actionPerformed end...          
                        // metod      iptal_actionPerformed begin...          
                        public void iptal_actionPerformed(java.util.EventObject newEvent) {
                             ctn.setEnabled(true);
                             ctn.requestFocus();
                             System.out.println("iptal");
                        // metod      iptal_actionPerformed begin...          
         // pencere koyma k?sm? .. end                               
         public static void main(String x[])
              TestFocus gen01 = new TestFocus();

  • Premiere Pro 2.0 and Windows 7 - Direct Sound Input soundcard driver problem

    My XP machine crashed, I reinstalled Premiere Pro 2.0 with Windows 7, and I got the following error: 'The Currently installed soundcard driver does not support Direct Sound Input. Recording audio is not possible.' The soundcard drivers are updated. Any ideas? Here's what I have: AMD Phenom II X4 965 Processor  3.40 GHz 8 GB, 64 bit. Thank you for looking.

    Thanks! Though I upgraded to solve the problem, this is good to know.
    Bob
    Date: Wed, 9 Nov 2011 04:45:42 -0700
    From: [email protected]
    To: [email protected]
    Subject: Premiere Pro 2.0 and Windows 7 - Direct Sound Input soundcard driver problem
    Re: Premiere Pro 2.0 and Windows 7 - Direct Sound Input soundcard driver problem created by Steve-Italy in Premiere Pro CS4 & Earlier - View the full discussion
    VERY VERY VERY EASY (now, when I solved the problem, not before...!!!)
    Insert Micropone or any jack in Micropone Input or Aux Input, on your sound card or motherboard !
    AND NOW YOU CAN USE PREMIERE PRO 2.0
    Enjoy
    Steve - Italy
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4015730#4015730
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4015730#4015730. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Premiere Pro CS4 & Earlier by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • 10.3.183.7 | Win7-64bit | Input-Textfield

    Hi,
    i recently updated to 10.3.183.7 (Chrome) and have a big bug now with the input-textfields, i can't use the "@"-Symbol anymore. If i use it, the input-field gets broken and i can't type anymore in it.
    Try it yourself with some example tutorial pages i found :
    http://www.tizag.com/pics/flash/form1easy.swf
    http://www.ilike2flash.com/2008/07/using-input-text.html
    Will there come a fix, or is there a known way to fix this. On 32 bit it works!
    regards

    Hi,
    I think you see same issue reported in here: https://bugbase.adobe.com/index.cfm?event=bug&id=2957490
    Please vote on the bug with your comment if your issue is same with that bug.  It must be a Flash Player bug that was introduced in recent release. I try accelerating this investigation. Thank you for your patience.
    thanks,
    Hitomi

  • Input Textfields not working in fullscreen mode

    Input Textfields not working in fullscreen mode any one help me.

    Quotes from Adobe:
    "Users cannot enter text in text input fields while in full-screen mode. All keyboard input and key-related ActionScript is disabled while in full-screen mode, with the exception of the keyboard shortcuts that take the viewer out of full-screen mode."
    Check with this article to know more: http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html

  • INPUT textfield does not show non-English letters with transparent mode

    INPUT textfield does not show non-English letters when i
    type, if transparent mode turn on
    this is bug of Flash Player 9?
    will this bug had be fixed?

    I just tested Firefox and Chrome on linux, i doesn't work either, but i get different weird chars: éèça
    However, on both mac and linux, if i copy the chars and paste them in the input field, it passes.

  • Significant Computer Window Focus Problem With Verizon Access Manager 7.7.1.0 (2707e)

    With the newly released Verizon Access Manager 7.7.1.0 (2707e) there is a significant computer focus problem with it.
    What I mean by this is that if I am using ANY application on my computer with the Verizon Access Manager minimized to the Windows System Tray, something will go on with the Verizon Access Manager and it steals the window focus - I am unable to work in the other application unless I click on the application to use it again.  
    An example of this would be my typing to post a message in this forum.  Something occurs in the Verizon Access Manager and my typing is rendered useless unless I click with my mouse on the browser window to be able to use it again.
    I'm highly suspecting whenever networks are coming and going in the Access Manager is when the problem occurs.
     This problem did not exist in the previous version of the Access Manager I was using.
    This is extremely annoying - please issue a fix for this ASAP!

    I have found by not minimzing the Verizon Access Manager 7.7.1.0 (2707e) the focus problem does not occur - it appears to be a problem when the app is minimzed to the system tray.

  • Focus Problem on the t3i

    My t3i is having focusing problems. What can be the cause?  Can I fine to the focus like on the fullframe cameras?
    Solved!
    Go to Solution.

    Kolourl3lind wrote:
    OK I will but I just relized maybe it's because I am zooming after focusing and recomposing?
    Yep - most lenses are "varifocal" -- meaning that if you carefully focus on a subject at some specific focal length in the zoom range... then zoom to a new focal length, then your subject will no longer be accurately focus.  You must re-focus the lens.
    There are a few lenses which are "parfocal" -- mean that if you zoom the focal length after focusing, your subject will still be accurately focused.  However... VERY FEW lenses are technically "parfocal" (though some are close).
    The lenses that I'm aware of which are "parfocal" are:
    EF 16-135mm f/2.8L USM
    EF 17-40mm f/4L USM
    EF 70-200mm f/2.8L USM (only the non-IS version)
    That's it.  If you use any other lens, you have to re-focus the lens after zooming.
    But I also notice you were shooting at 1/15th sec.  That's a bit slow but you were at 18mm (which helps.)  Here's the guideline on that.
    In the 35mm days, there used to be a general guideline that if the shutter speed is equal to or faster than 1/focal-length (e.g. if shooting at 50mm the you'd want to be at least 1/50th sec.... at 70mm you'd want to be at least 1/70th or faster, etc.) would be adequate.  This number doesn't apply to your T3i, but I'll get to that in a moment.
    But there are a few caveats with that...
    First, It assumes you are actually using very good camera-holding technique and you are actually TRYING to be steady.  Good camera-holding technique means you are supporting the camera from below -- typically your left is palm-up supporting the bottom of the camera and lens and your elbow is in toward your chest/stomach.    Your body weight is centered between your legs and you have a wide stance.  This means you are not leaning so your muscles don't have to work hard to keep you upright and your arms work like a brace to support the camera to your body and of course your body is nicely balanced and stable.  
    Second, It's just a "guideline" -- not a rule.  Some people are noticeably able to be more steady than others (and if caffiene makes you jittery and you just drank a coffee... and all that sort of thing.)  And sometimes it takes a bit of practice to learn good technique.  
    Third, It's also not the same for APS-C size sensor cameras (like your T3i).  For that camera, you'd have to multiple the minimum speed by the crop factor of the camera.  For a Canon APS-C camera it's 1.6 (but if you wanted to use 1.5 that'd be pretty close.)  That means at 50mm instead of using 1/50th you'd actually have to use 1/75th (technically 1/80th if we use the 1.6 factor).  e.g. 50 x 1.6 = 80 so for 50mm we'd use 1/80th.
    If you have a lens that includes image stabilization, then you may be able to shoot a bit slower.
    Most image stabilization claims to improve lens stability by 2 to 4 "stops".  What that means it that you can reduce the speed of the shutter... two to four times slower than you'd normally need because the lens is stabilizing for you.   But more caveats apply because it's not as simple as "you get 4 stops".  The stabilization isn't a guarantee... it's just a liklihood.  If it has to be less ambitious to stabilize your shot it will be far more likely to succeed.  If it has to be more ambitious to stabilize your shot then it'll do it's best... but there's no guarantee that it will work.
    You were shooting at 18mm.  So if you are using excellent posture and camera-holding technique but don't have image stabilization and you're the "average" person trying to hold the camera steady, then we multiply 18 x 1.6 and get 28.8.  There is no 1/28.8th shuter speed so we'll round that to 1/30th (because there is a 1/30th.  
    1 stop slower than 1/30th is 1/15th.. and the image stabilization probably is adequate to get you 1 stop slower successfully.
    2 stops slower is 1/8th.  Image stabilization that claims "4 stops" will usually do well at 2 stops.  So this is less of a sure-fire thing, but it does tilt the odds in your favor.
    3 stops slower is 1/4 sec.  At this point you're pushing the image stabilization system... you'll notice that if you shoot a lot of frames, that the "keeper" rate (good shots you like) will be lower, but you'll see that you are getting some.
    4 stops slower is 1/2 sec (based on the base of 1/30th for an 18mm focal length on an APS-C size sensor camera).  If you push any image stabilized lens to 4 stops, do not expect to get a very high keeper rate.  It'll sometimes help you, but you have to accept that you're really being ambitious in your expectations.
    That's image stabilization by the numbers... take the focal length, multiply it by your crop factor (which is always 1.6 but if you want to use 1.5 because it's a bit easier to do that math in our head it's close enough), round up to the nearest shutter speed available.  If you have image stabilization you can speed up the shutter speed by 1, 2, 3, or 4 times faster... but each time you get more ambitious your odds of getting "keepers" go down (but it's still better than no image stabilization at all.)
    The summary is that your minimum shutter speed (assuming good holding technique and that you are steady, etc. etc.) with image stabilization OFF the 1/30th would be your minimum speed.  At 1/15h sec you were relying on 1 stop of image stabilization help.  The image stabilization technology in the lens is good enought that "most of the time" it probably will be able to do this (not guaranteed... just likely.)  If you were NOT using good posture and holding technique... you may be challenging your image stabilization system to try to keep up.
    Tim Campbell
    5D II, 5D III, 60Da

Maybe you are looking for

  • Transfer tv shows from ipod touch to macbook pro library

    hey, so I have tv shows on my ipod touch that i got from a computer years ago that has crashed, and i have no contact to it, what i am hoping i will have help on is i want to transfer tv shows from my ipod touch to my macbook pro library so i can the

  • Iwork 09 installation error

    iWork installs successfully but then when I try to open it, I get the following Process:         Numbers [1131] Path:            /Applications/iWork '09/Numbers.app/Contents/MacOS/Numbers Identifier:      com.apple.iWork.Numbers Version:         ???

  • Not able to install HANA Plugins

    Hi All, I need help to install SAP HANA plugins in eclipse  , I am using Windows 7 ,when i try to install i am not able to install Error message 'The installation cannot be completed as requested " i used the Link  https://tools.hana.ondemand.com/kep

  • Informe detalle de pagos

    Estimados: Necesito un informe que refleje el dettale de las facturas pagados con un cheque, alguien sabe como sacarlo? Saludos, Viviana Medina.

  • Anyone have success in getting G5 to remember keys?

    I have a new AirPort Extreme setup. I am using WPA/WPA2 encryption and have successfully got it connected to the internet as my old AirPort base was. However, the problem is that my G5 computers all can't seem to remember the keys between sessions. T