JTabbedPane textfield cursor

I have a JTabbedPane with four panels (1-4). Each panel has text fields on it. If I place my cursor on the first text field in panel 1 and then go to panel 2 the cursor automatically positions itself in the first text field within panel 2. I have code that executes on the focusLost event for the first text field on panel 2, so when I go to panel 3 the focusLost event fires.
In Java SE 4 the cursor does not automatically position itself in the first text field on panel 2, so when I go to panel 3 the focusLost event doesn't get executed. This is what I want to happen.
In Java SE 5 and above the focusLost event gets fired when I move to panel 3 because the cursor has automatically positioned itself in the first text field on panel 2. This is not what I want.
Why does the cursor automatically position itself in the newer versions of Java?

The focusLost contains a method that returns the component about to receive focus.
So you can compare the parent component of each component. If it is the same you are still on the same tab so you can execute your code.

Similar Messages

  • JTabbedPane - change cursor when mouse over

    Hi
    I want to make the cursor change to the hand cursor when the mouse hovers over each tab.
    Tried
    jtabbedpane..getComponentAt(1).setCursor(new Cursor((Cursor.HAND_CURSOR)));but it changes the cursor for the whole panel not the tab.
    Any idea ?

    Hi,
    I have an idea but no sample code.
    You can register a MouseMotionListener on the JTabbedPane.
    In the mouseMoved event you must check the x,y of the mouse cursor and than you must calculate
    the area of the tabs and when it is inside you change to the hand cursor otherwise to default cursor.

  • Android: Textfield-Cursor movement not working in Portrait

    Hi,
    I just deployed a new build of my Android apps with Air 16.0.0.272 and I noticed that while Portrait mode, I am unable to move the cursor in an Input Textfield with text by tapping at the location. Instead the cursor will pop up before the first letter, making it impossible to delete the text that is already there. If I rotate to Landscape, the Textfield will go fullscreen and I can move the cursor freely. Can anyone confirm this?

    I have seen this issue as well when first focusing the TextField, the cursor moves to the start of the text, even though the user tapped on a word later in the sentence.
    Even worse, I've noticed that tapping on the TextField sometimes does not bring up the Softkeyboard. I have to focus in and out of the TextField and eventually the softkeyboard appears.

  • Changing textfield cursor color in Forms

    Hi All,
    We are using Oracle App Server 9iAS and 9iDS. I need to change the color of my cursor for the text field/or change the cursor to a block cursor in forms application. Does any one know how that can be done ?.
    TIA
    Saurabh

    Saurabh,
    changing the color of a cursor is more difficult than changing its shape. You can use a PJC to change the cursor shape to one of the standard shapes. If you need a custom cursor then you still can used a PJC, but designing your own cursors in Java is not trivial.
    See:
    http://www.oracle.com/technology/sample_code/products/forms/demo/9i/javabeans_pjc_samples/mod_cursor/viewlet/pjc_modcursor_viewlet.html
    which is available in the Forms 9i demos at
    http://www.oracle.com/technology/sample_code/products/forms/index.html
    Frank

  • Is there a way to detect redraw regions or at the very least when a display object is redrawn?

    I have a layered window system that produces Windows 7 Aero Glass effect in Flash.
    It consists of nested display objects, with overlays as so.
    Root [
        GlassWindowTop [
           RenderedEffectBackground
         BackgroundForGlassWindowTop [
             GlassWindowMiddle [
               RenderedEffectBackground
            BackgroundForGlassWindowMiddle [
                 GlassWindowBottom [
                    RenderedEffectBackground
                 BackgroundForGlassWindowBottom (e.g. the DesktopBackground)
    Windows can be raised and lowered by changing their order in the hierarchy and adding new levels.
    Each glass window has a designated background (containing all lower windows) .  It draws to an off-screen Bitmap the region of the background that is under the window, and applies a blur filter, tint, and parallax effects to it, and then displays that as it's own background as RenderedEffectBackground.
    The problem is that "RenderedEffectBackground" is a static rendering of the window background, so in order to update it in real time, I need to detect when it's background display object (e.g. BackgroudnForGlassWindowTop) or any nested display objects are rendered.
    I could simply update all RenderedEffectBackgrounds from the bottom up each frame, but that would be inefficient.   Ideally, I could detect when a particular background changes (e.g. when a textfield cursor is flashing, or a MovieClip changes frames), and then only render from that object up.  The rendering of course always has to take place from back to front, starting with the lowest window that has changed.  If I could detect the redraw regions of the Flash Player (e.g. when a textfield cursor is flashing, or a MovieClip is playing), I could optimize this system even further by checking for layer overlaps and only rendering layers whose windows intersect the redraw regions, but obtaining that level of information would probably not be possible or logical since this this essentially needs to happen during some kind of pre render phase, which Flash may not support.  Such a pre-render phase would itself be causing new redraw regions, but as long as it is processed from the bottom up, it could work.
    Is there any AS3 function of the flash player that allows my code to obtain information about the display list as far as which display objects are due to be rendered, and then intercept some kind of "onRenderComplete" event for them right before rendering takes place so that I can render the higher display objects.
    I originally tried to implement this as a filter, but pixel bender shaders in AS3 don't seem to allow sampling of an underlying object that would allow for blurring (i.e. the shader can access only the current point being rendered, coordinates passed to the sampling methods are ignored (this is documented behavior).
    Any ideas?

    The feature that shows the link you are mousing over hasn't been removed in 29. Maybe the add-on you are using to restore the add-on bar is covering it. I've tested the Classic Theme Restorer and it seems to work correctly in this situation - https://addons.mozilla.org/firefox/addon/classicthemerestorer/

  • Making IP Address field in JAVA - error

    Hi All,
    Can anyone tell me how to make the IP Address field as displayed in windows operating system network settings.
    Actually I have made one IP field using JFormattedTextField and MaskFormatter class.
    code is given below:
    private MaskFormatter getMf2() {
              if (mf2 == null) {
                   try {
                        mf2 = new MaskFormatter(" *** . *** . *** . *** ");
                        mf2.setValidCharacters(" 0123456789");
                        } catch (Exception e) {
                        JOptionPane.showMessageDialog(null, e.toString());
              return mf2;
         jTextField = new JFormattedTextField(getMf2());
    Am I doing anything wrong here?
    Problem is its not behaving in the way windows operating system IP field behaves?
    Actually I am unable to display 3 dots(.) in the field which look like they are with regular space gap in the jformattedtextfield?
    In windows OS, dots in the IP address field will remain static, but with my IP field, they are moving when I am adding values into the field? How to solve this problem?
    I have given three spaces in the mask formatter initially? so if I click on the first place, I am unable to type at that place? how to rectify this problem?
    Please anyone help me to solve this problem and make proper IP field as it looks in windows operating system. If Any code is available in the web, please provide the link here.

    I have used monospaced font, now initially dots(.) are appearing in equal gaps in the textfield.
    But the problem again is that, when I am typing something, those dots are moving right side to accomodate the entries I have made.
    I have set font like this*jTextField.setFont(new Font("Serif",Font.PLAIN,16));*How can I move the character I have typed to the left, instead of dots moving to the right side as done in case of windows IP Address field?
    And one more help required is, actually I am giving initially three spaces in MaskFormatter and setting that MaskFormatter to jTextField.
    So if I click on initial place in the textfield, cursor was displayed there, but I am unable to type at that place as I have given three spaces in maskformatter class.
    So my intention is that, even if I click at the start of textfield entrance, it cursor should be pointed or displayed after three spaces only.
    How I can implement this?
    Please try to answer these two questions.

  • Validation in JTextField

    Hi ,
    I have a JTextField, a JComboBox , a JButton , a JList and a JTable in my Frame. I enter a value in JTextField which has to be validated with a constant. Where do u write the validation ?
    i have written the validation in focus lost of JTextField.
    This causes problem when i click on the jtable or jcombobox. When i click on the combobox after entering a wrong value in the textfield, cursor remains in the jtextfield but i am able selected a value from the jcombobox as well.
    Following is the sample code.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.table.*;
    * Title:
    * Description:
    * Copyright: Copyright (c) 2001
    * Company:
    * @author
    * @version 1.0
    public class EnabledTest extends JFrame implements FocusListener
    JTextField jTextField1 = new JTextField();
    JTextField jTextField2 = new JTextField();
    JComboBox jComboBox1 = new JComboBox();
    JList jList1 = new JList();
    JButton jButton1 = new JButton();
    JTable jTable1 = new JTable();
    public EnabledTest()
    try
    jbInit();
    addListeners();
    catch(Exception e) {
    e.printStackTrace();
    public static void main(String[] args)
    EnabledTest enabledTest1 = new EnabledTest();
    enabledTest1.setVisible(true);
    enabledTest1.setBounds(0,0,400,400);
    public void addListeners()
    jTextField1.addFocusListener(this);
    jTextField2.addFocusListener(this);
    jComboBox1.addFocusListener(this);
    jList1.addFocusListener(this);
    jButton1.addFocusListener(this);
    public void focusGained(FocusEvent e)
    public void focusLost(FocusEvent e)
    if(e.getSource() == jTextField1)
    jTextField1_validationPerformed(e);
    private void jbInit() throws Exception
    jTextField1.setText("jTextField1");
    jTextField1.setBounds(new Rectangle(49, 39, 144, 38));
    this.getContentPane().setLayout(null);
    jTextField2.setBounds(new Rectangle(227, 40, 144, 38));
    jTextField2.setText("jTextField1");
    jComboBox1.setBounds(new Rectangle(52, 115, 141, 34));
    jComboBox1.addItem("one");
    jComboBox1.addItem("two");
    jList1.setBounds(new Rectangle(239, 110, 135, 120));
    jButton1.setText("jButton1");
    jButton1.setBounds(new Rectangle(56, 187, 127, 29));
    jTable1.setBounds(new Rectangle(55, 251, 330, 117));
    jTable1.setModel(new DefaultTableModel(3,3));
    this.getContentPane().add(jTextField1, null);
    this.getContentPane().add(jTextField2, null);
    this.getContentPane().add(jComboBox1, null);
    this.getContentPane().add(jList1, null);
    this.getContentPane().add(jButton1, null);
    this.getContentPane().add(jTable1, null);
    private void jTextField1_validationPerformed(FocusEvent e)
    jTextField1.removeFocusListener(this);
    int intValue = new Integer(jTextField1.getText()).intValue();
    if (intValue > 100)
    JOptionPane.showMessageDialog(this, "Should be < 100");
    jTextField1.requestFocus();
    jTextField1.addFocusListener(this);
    }

    It is fairly easy to validate for a range. I added this kind of validation (attached (*)). At any time you may want to set the validity range of your NumericJTextField. I did it as follows:
    this.numericTextField.setValidityRange(-999, +999);
    I tested and it does work nicely - couldn't fool it.
    (*) Is there any holy way to post files without having to cut and paste them as a whole in this doubly holy tab-eater JTextArea :-(
    package textfieldvalidator;
    * Title: NumericJTextField
    * Description: An example JTextFiled that accepts only digits
    * Copyright: nobody - use it at will
    * Company:
    * @author Antonio Bigazzi - [email protected]
    * @version 1.0 First and last
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.*;
    public class ValidatorExample extends JPanel {
    NumericJTextField numericTextField; // accepts only digit
    JTable table;
    public ValidatorExample() {
    this.setLayout(new BorderLayout());
    this.numericTextField = new NumericJTextField("1234X5");
    this.numericTextField.setBackground(Color.black);
    this.numericTextField.setForeground(Color.yellow);
    this.numericTextField.setCaretColor(Color.white);
    this.numericTextField.setFont(new Font("Monospaced", Font.BOLD, 16));
    this.numericTextField.setValidityRange(-999, +999);
    this.table = new JTable(
    new String[][] { {"a1a", "b2b", "c3c"}, {"456", "777", "234"}},
    new String[] {"Col 1", "Col 2", "Col 3"}
    this.add(this.numericTextField, BorderLayout.NORTH);
    this.add(this.table, BorderLayout.CENTER);
    public static void main(String[] args) {
    JFrame f = new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.setContentPane(new ValidatorExample());
    f.setLocation(300, 75);
    f.pack();
    f.setVisible(true);
    // ===================== the meat ============================
    // the specialized JTextField that uses a restrictive doc model
    class NumericJTextField extends JTextField {
    NumericJTextField() {this("", 0);}
    NumericJTextField(String text) {this(text, 0);}
    NumericJTextField(int columns) {this("", columns);}
    NumericJTextField(String text, int columns) {
    super(new NumericDocument(), text, columns);
    public void setValidityRange(int min, int max) {
    ((NumericDocument)this.getDocument()).setValidityRange(min, max);
    // check what may have been there already (via constructor)
    this.setText(this.getText());
    // the restricted doc model - non-numbers make it beep
    class NumericDocument extends PlainDocument {
    protected int minValue = Integer.MIN_VALUE;
    protected int maxValue = Integer.MAX_VALUE;
    public void setValidityRange(int minValue, int maxValue) {
    this.minValue = minValue;
    this.maxValue = maxValue;
    public void insertString(int offset, String text, AttributeSet a)
    throws BadLocationException {
    // digits only please (or bring your own restriction/validation)
    StringBuffer buf = new StringBuffer(text.length());
    for (int i = 0; i < text.length(); i++) {
         if (Character.isDigit(text.charAt(i))) {
         buf.append(text.charAt(i));
         } else {
         java.awt.Toolkit.getDefaultToolkit().beep();
    super.insertString(offset, buf.toString(), a);
    // get the whole "document" back for range validation
    while(true) {
    String num = this.getText(0, this.getLength());
         if (num.length() == 0) break;
         int value = Integer.parseInt(num);
         if (value >= this.minValue && value <= this.maxValue) {
         break;
         } else {
         // beeep and chop (or whatever reaction for out of range)
         java.awt.Toolkit.getDefaultToolkit().beep();
         this.remove(this.getLength() - 1, 1);
    // Note: in insertString, length is 1 when typing, but it can be anything
    // when the text comes from the constructor, when it is pasted, etc.
    }

  • Problem in display file in java applet embeded browser

    hi, i am facing problem to display the file from local drive in java applet embeded browser. here is the error message i get:
    Exception loading file from path:java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)
    i think it should be the java security problem and i have try to get the solution from internet. i try to solve by using the fllowing method:
    keytool -genkey -keyalg rsa -alias yourkey
    keytool -export -alias yourkey -file yourcert.crt
    javac yourapplet.java
    jar cvf yourapplet.jar yourapplet.class
    jarsigner yourapplet.jar yourkey
    but the command prompt ask me to enter the keystore password. i try to enter any password. but i show me the error:
    keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect.
    So may i know what is the problem actually?Thanks a lot.

    Hi,
    here is the sample coding :
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import com.sun.j3d.utils.geometry.ColorCube;
    import com.sun.j3d.utils.applet.MainFrame;
    import com.sun.j3d.utils.universe.*;
    import com.sun.j3d.utils.behaviors.mouse.MouseRotate;
    import com.sun.j3d.utils.behaviors.mouse.MouseZoom;
    import com.sun.j3d.utils.behaviors.mouse.MouseTranslate;
    import javax.media.j3d.*;
    import javax.vecmath.*;
    import java.net.URL;
    import java.net.MalformedURLException;
    import org.web3d.j3d.loaders.VRML97Loader;
    import com.sun.j3d.loaders.Scene;
    public class SimpleVrml extends Applet implements ActionListener {
    String           location;
    String           initLocation;
    Canvas3D     canvas;
    SimpleUniverse     universe;
    TransformGroup     vpTransGroup;
    VRML97Loader     loader;
    View          view;
    Panel          panel;
    Label          label;
    BranchGroup     sceneRoot;
    TransformGroup     examineGroup;
    BranchGroup     sceneGroup;
    BoundingSphere     sceneBounds;
    DirectionalLight     headLight;
    AmbientLight     ambLight;
    TextField      textField;
    Cursor          waitCursor;
    Cursor          handCursor;
    public SimpleVrml() {
    initLocation="cylinder.wrl";     
         setLayout(new BorderLayout());
         GraphicsConfiguration config =SimpleUniverse.getPreferredConfiguration();     
         setLayout(new BorderLayout());
         canvas = new Canvas3D(config);
         add("Center",canvas);
         panel = new Panel();
         panel.setLayout(new FlowLayout(FlowLayout.LEFT));
         textField = new TextField(initLocation,60);     
         textField.addActionListener(this);
         label = new Label("Location:");
         panel.add(label);
         panel.add(textField);
         add("North",panel);
         waitCursor = new Cursor(Cursor.WAIT_CURSOR);
         handCursor = new Cursor(Cursor.HAND_CURSOR);
         universe = new SimpleUniverse(canvas);
         ViewingPlatform viewingPlatform = universe.getViewingPlatform();
         vpTransGroup = viewingPlatform.getViewPlatformTransform();
         Viewer viewer = universe.getViewer();
         view = viewer.getView();
         setupBehavior();
         loader = new VRML97Loader();
         gotoLocation(initLocation);
    public void actionPerformed(ActionEvent ae) {
         gotoLocation(textField.getText());
    void gotoLocation(String location) {
         canvas.setCursor(waitCursor);
         if (sceneGroup != null) {
         sceneGroup.detach();
         Scene scene = null;
         try {
         URL loadUrl = new URL(location);
         try {
              // load the scene
              scene = loader.load(new URL(location));
         } catch (Exception e) {
              System.out.println("Exception loading URL:" + e);
         } catch (MalformedURLException badUrl) {
         // location may be a path name     
         try {
              // load the scene
              scene = loader.load(location);
         } catch (Exception e) {
              System.out.println("Exception loading file from path:" + e);
         if (scene != null) {
         // get the scene group
         sceneGroup = scene.getSceneGroup();
         sceneGroup.setCapability(BranchGroup.ALLOW_DETACH);
         sceneGroup.setCapability(BranchGroup.ALLOW_BOUNDS_READ);
         // add the scene group to the scene
         examineGroup.addChild(sceneGroup);
         // now that the scene group is "live" we can inquire the bounds
         sceneBounds = (BoundingSphere)sceneGroup.getBounds();
         // set up a viewpoint to include the bounds
         setViewpoint();
         canvas.setCursor(handCursor);
    void setViewpoint() {
         Transform3D viewTrans = new Transform3D();
         Transform3D eyeTrans = new Transform3D();
         // point the view at the center of the object
         Point3d center = new Point3d();
         sceneBounds.getCenter(center);
         double radius = sceneBounds.getRadius();
         Vector3d temp = new Vector3d(center);
         viewTrans.set(temp);
         // pull the eye back far enough to see the whole object
         double eyeDist = 1.4*radius / Math.tan(view.getFieldOfView() / 2.0);
         temp.x = 0.0;
         temp.y = 0.0;
         temp.z = eyeDist;
         eyeTrans.set(temp);
         viewTrans.mul(eyeTrans);
         // set the view transform
         vpTransGroup.setTransform(viewTrans);
    private void setupBehavior() {
         sceneRoot = new BranchGroup();
         examineGroup = new TransformGroup();
         examineGroup.setCapability(TransformGroup.ALLOW_CHILDREN_EXTEND);
         examineGroup.setCapability(TransformGroup.ALLOW_CHILDREN_READ);
         examineGroup.setCapability(TransformGroup.ALLOW_CHILDREN_WRITE);
         examineGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
         examineGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
         sceneRoot.addChild(examineGroup);
         BoundingSphere behaviorBounds = new BoundingSphere(new Point3d(),
              Double.MAX_VALUE);
         MouseRotate mr = new MouseRotate();
         mr.setTransformGroup(examineGroup);
         mr.setSchedulingBounds(behaviorBounds);
         sceneRoot.addChild(mr);
         MouseTranslate mt = new MouseTranslate();
         mt.setTransformGroup(examineGroup);
         mt.setSchedulingBounds(behaviorBounds);
         sceneRoot.addChild(mt);
         MouseZoom mz = new MouseZoom();
         mz.setTransformGroup(examineGroup);
         mz.setSchedulingBounds(behaviorBounds);
         sceneRoot.addChild(mz);
         BoundingSphere lightBounds =
         new BoundingSphere(new Point3d(), Double.MAX_VALUE);
    ambLight = new AmbientLight(true, new Color3f(1.0f, 1.0f, 1.0f));
    ambLight.setInfluencingBounds(lightBounds);
    ambLight.setCapability(Light.ALLOW_STATE_WRITE);
    sceneRoot.addChild(ambLight);
    headLight = new DirectionalLight();
    headLight.setCapability(Light.ALLOW_STATE_WRITE);
    headLight.setInfluencingBounds(lightBounds);
    sceneRoot.addChild(headLight);
         universe.addBranchGraph(sceneRoot);
    public static void main(String[] args) {
    new MainFrame(new SimpleVrml(), 780, 780);
    cylinder.wrl :
    #VRML V2.0 utf8
    # A cylinder
    Shape {
    appearance Appearance {
    material Material { }
    geometry Cylinder {
    height 2.0
    radius 1.5
    view.html:
    <html>
    <applet code="SimpleVrml.class" width=600 height=600>
    </applet>
    </html>
    error msg that i get :
    Exception loading file from path:java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)
    i can display the wrl file in applet itself but i can't display in the browser.is it any problem with my code?Urgent, please help me. Thanks.

  • No blinking cursor in textfield

    I have some textfields that I use with UITextAlignmentRight. The problem is that when I click on them to start typing the blinking cursor doesn't show wich is very confusing for the user. Then when I start typing the cursor shows. It also works when I use the textfield with UITextAligmentLeft. Anyone has seen the same problem? How can I fix it?
    Message was edited by: martymart

    I see the same thing. When I flip to the left aligned, then I see a blinky.
    Message was edited by: martaaay

  • How to set cursor type for TextField uses

    Hello, hope someone can help. I'm importing HTML into a
    TextField called "webText_htm". I'm also calling CSS and it is
    working to style the text. Player 8 and ActionScript 2
    When I mouseover the TextField, the cursor changes to the
    I-bar.
    Second problem is that <a href=""> is not signalling
    the Hand Cursor, and does not do anything when I click on it.
    Thanks in advance
    Greg

    shrinktight,
    > Hello, so this is sort of a dumb question; I've become
    > acquainted with the help docs. Is that the best place
    > to look up properties for a class?
    I think so, mainly because it's so easily within reach. I
    tend to fire
    up the ActionScript 2.0 and/or Component Language Reference
    and start there.
    If I can't find what I need, I hit the LiveDocs version
    http://livedocs.macromedia.com/),
    which has developer notes. If I'm still
    stuck, I head to the forums.
    > Is thre a reference somewhere that I can study which
    > explans each property? Where can I find that stuff?
    For 99% percent of it (informal estimate, of course), just
    hit the F1
    key and search. Every object in ActionScript is defined by
    its namesake
    class. Again, properties describe the object's
    characteristics, methods
    describe things the object can do, and events describe things
    the object can
    react to.
    This may help get you started.
    http://www.communitymx.com/abstract.cfm?cid=01B54
    David
    stiller (at) quip (dot) net
    Dev essays:
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Cursor at Textfield?

    Please kindly advise me on: how can I set the Cursor inside the JTextField whenever I call a repaint() or at the startup, so that I do not need to use a mouse or tab key to click on the Jtextbox whenever I need to key in data?
    By the way, I had tried requestFocus() but to no avail.
    Thanks alot.

    Hi!
    For your window or dialog add a WindowListener and in the windowOpened() event do textField.requestFocus(). This will do the job.
    Regards
    Jaydeep

  • Stage.focus doesn't show cursor in TextField?

    stage.focus = txt; // txt is a text input field
    It successfully gives the TextField "txt" focus because when
    I type, the characters appear in the input textfield, however the
    familiar blinking text cursor/beam does not appear in the
    textfield. This makes you think it does not have focus, so you
    click the textfield to give it focus -- completely defeating the
    purpose. What's the deal?

    Doing some searches online I found myself asking this
    question over at asctionscript.org over a year ago. :)
    http://www.actionscript.org/forums/showthread.php3?t=143111
    No one figured it out back then but I revived the thread and
    I think someone identified the issue:
    The SWF must have system focus for the blinking text
    cursor/carat to appear.
    In the browser, SWFs do not have focus until you click on it,
    or force focus using javascript's focus() function.
    What I don't understand is why the Flash Player in the IDE
    doesn't start out with focus -- it seems to start out with a sort
    of half-focus.
    The project I'm working now is in AIR, though. Again, it's
    surprising that the AIR SWF doesn't start out with focus, but I
    also have no idea how to programatically give the SWF focus from
    AIR.

  • [JTabbedPane] get the tab index of a textfield

    Hello,
    I'm using a jTabbedPane to display data. On every tab I have several panels with JTextFields. I would like to know on wich index of the tabpane a textfield is located. So when a textfield is empty I can use tabpane.setSelectedIndex( i ) to set te focus to that tab.
    Enyone any tips?
    Greetings
    Hans

    I'm guessing that just setting focus on the text field doesn't cause the tab selection to change.
    So here's a brute force way to do it:
    a) find the parent container of the text field
    b) use the tabbedPane.getComponentAt(..) method to compare the above component. When they are equal you now which tab contains the text field.

  • JTabbedpane strange behavoir-ghost textfields

    Hi have a Jtabbedpane with two tabs , on each tab there are some textfields but when i display them i can see the textfields of the lower tab on the first tab , is there a way so solve this problem
    tia Sven

    hi, here is my code , after the init ,
    i'll run below function to check wich tabb to show
    void showTab (String ana)
    jTabbedPane1.removeAll();
    if (ana.compareTo("VREX")==0)
    jTabbedPane1.add(vrexpanel, recources.getString("VREX"));
    jTabbedPane1.setIconAt(0,new ImageIcon(images.getString("EXPL")));
    else
    if (ana.compareTo("UAS")==0)
    jTabbedPane1.add(jScrollPane1, recources.getString("UAS"));
    jScrollPane1.getViewport().add(uaspanel, null);
    jTabbedPane1.setIconAt(0,new ImageIcon(images.getString("UAS")));
    else
    if (ana.compareTo("CHRONO")==0)
    jTabbedPane1.add(chronopanel, recources.getString("CHRONO"));
    jTabbedPane1.setIconAt(0,new ImageIcon(images.getString("CHRONO")));
    jTabbedPane1.add(startstoppanel, recources.getString("CHRONO"));
    }

  • Move cursor position in TextField

    hi all
    I am creating a keyboard in flash. i want to move cursor
    position in TextField to insert new character, if anybody knows
    plese mail me.
    thanks in advance

    Hey thanks v.seregin but i used an entirely different approach.
    Here is my application where i m trying to move pen in input text box
    This is an application in facebook  please give any suggestions etc..
    http://apps.facebook.com/linc-mydiary/
    hey thanks to all people who solve our problems.

Maybe you are looking for

  • Not able to query data from View

    Hi, I am not able to fetch data from views even while running simple select statements. I am using SQL Developer Version 3.0.04, Same query is fetching data on other computers running SQL Developer or Toad. Has anyone faced this issue??

  • My ipod will not charge or connect to Itunes.

    So I have tried everything, plugging into 3 different chargers, into the wall and pc. Two different USB ports on the pc. And yet nothing. I have done all the hold down the top and home button for 10 seconds then also a minute and yet still nothing. I

  • Third party order processing in Thailand

    Hi, does anyone know that for third party order processing in Thailand, where goods are shipped directly from the vendor to the customer, is it a legal requirement for Thailand to keep track of the in and out movement of the goods in SAP although the

  • Icons in menu bar disappear

    When starting up my computer this morning almost all of the icons in the menu bar had disappeared and had question marks in they place.  Is there a solution for this? Dan

  • Pdf quality problem

    I put my slides on-line for students in the form of pdf files. To conserve paper, I put four slides per page but the quality is terrible, much of the text is barely readable. The font size is large enough that there should be no problem (If I manuall