Problem losing focus

Hi all,
I have a problem with a Flex application hosted in an Adobe InDesign CS4. I'm using a panel developed in Flex inside Adobe InDesign. The Flex panel has a Tree component. The problem is that when I click in the Tree component and then I click outside the panel in order to type some text in an InDesign document, the focus still remains in the Flex panel. In fact, the focus is in the Tree component and it is imposible to take the focus out of the panel unless you close the panel.
Does anybody know how to solve this problem?
Thaks in advance,
Alvaro.

Hi Alex,
if I click on a button in the same panel and after I click the InDesign document to type some text, I get the same behaviour, the InDesign document doesn't get the focus which is still in the button. So this hapends with any Flex component.
Thanks.

Similar Messages

  • Window losing focus

    Hi all,
    I was wondering if it were at all possible for a JFrame or JWindow to listen for an event when the window is about to lose focus - ie it is losing focus (as opposed to lost focus).
    WindowEvent and the subsequent WindowFocusListener interface only caters for handling a window having already lost or gained focus, however I need to make things happen before the window actually loses its focus.
    Can anyone help?
    Regards,
    Andrew.

    Hi Andrew,
    I don't know a possibility to get an event like you want to have - and I do think such an eevnt does not exist.
    But I do think you really wouldn't need such a possibility. Perhaps you can give a short explanation why you need this possibility. If the problem is to regain the focus there is a post from me a few minutes ago (I'm sorry about not knowing how to reference to other posts but I hope since years I will learn such things). If you have other problems please explain the problem - perhaps there is another way of solving it.
    HTH and greetings from
    Holger

  • Airport Losing Focus??

    I have a Mac set as an FTP server at a second location for backing up. My server at my first location will start backing up, completing some files. After a while, the network light on the modem at location 2 will stop blinking (indicating no traffic). The message from my backup software is "(FTP: server disconnected or timed out)". I can browse the web with no problems when this is happening. Is my Airport Extreme just losing focus?
    Also, pod casts will not down load to same FTP server. I'll get anywhere from 1/8 to 1/2 of a pod cast before the network traffic light stops blinking.
    Help! Boss is getting nervous. Thanks.

    Thanks JJMack.  I was hoping it wasn't the card I was using.  This is the first time I've used a geforce card on my work PC.  However it's not the first time I've used them with Adobe's apps.  For years my personal PCs had them and usually without issues like this.  We chose to attempt to use this new Geforce GTX980 card because of how much further advanced it is over midrange Quadro cards at the moment, and because of some of the other software I am using that is more viewport and video ram dependent.  Adobe applications are still my mainstay but we couldn't justify the purchase of older technology midrange K4000 cards that were supposedly newer than my older 4000.  As these still had older PCI connections than the HP workstations we built, among other tech such as cuda core amounts that are drastically behind the times.  Jumping up to 6000 level Quadro cards for up to date technology just isn't in the budget as the prices are astronomical. As with the Titan cards cards that are high priced and yet older tech.  So we made the decision to try the GTX card for a while.  Right now this sporadic window focus issue seems to be the only new issue I've run into so far.   I'm sure I will see more in the near future doing something if the card is the issue.  Maybe the new types of hardware being used such as the PCI express hard drive, or very recent photoshop updates can be blamed.  Just not figuring it out just yet.
    I was informed by an IT professional here that has application creation experience that this truly seemed like an application problem more than a graphic card problem.   But until someone can corroborate that thought I guess I'm going to keep blaming the newer GTX card or wait to see if an App update makes this go away quietly.  No one else has chimed in yet.  Thanks for the link.

  • Problem with focus on applet  - jvm1.6

    Hi,
    I have a problem with focus on applet in html page with tag object using jvm 1.6.
    focus on applet work fine when moving with tab in a IEbrowser page with applet executed with jvm 1.5_10 or sup, but the same don't work with jvm1.6 or jvm 1.5 with plugin1.6.
    with jvm 1.5 it's possible to move focus on elements of IEbrowser page and enter and exit to applet.
    i execut the same applet with the same jvm, but after installation of plugin 1.6, when applet gain focus don't release it.
    instead if i execute the same applet with jvm 1.6, applet can't gain focus and manage keyevent, all keyevent are intercepted from browser page.
    (you can find an example on: http://www.vista.it/ita_vista_0311_video_streaming_accessibile_demo.php)
    Any idea?
    Thanks

    Hi piotrek1130sw,
    From what you have described, I think the best approach would be to restore the original IDT driver, restart the computer, test that driver, then install the driver update, and test the outcome of installing the newest driver.
    Use the following link for instructions to recovery the ITD driver using Recovery Manager. Restoring applications and drivers.
    Once the driver is restored, restart the computer and test the audio. If the audio is good you can continue to use this driver, or you can reinstall the update and see what happens. IDT High-Definition (HD) Audio Driver.
    If installing the newest driver causes the issue to occur but the recovered driver worked, I suggest recovering again.
    If neither driver works I will gladly follow up and provide any assistance I can.
    Please let me know the outcome.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • Problem with focus border and ListCellRenderer in custom listbox

    I have a bug in some code that I adapted from another posting on this board -- basically what I've done is I have a class that implements a custom "key/value" mapping listbox in which each list item/cell is actually a JPanel consisting of 3 JLabels: the first label is the "key", the second is a fixed "==>" mapping string, and the 3rd is the value to which "key" is mapped.
    The code works fine as long as the list cell doesn't have the focus. When it does, it draws a border rectangle to indicate focus, but if the listbox needs to scroll horizontally to display all the text, part of the text gets cut off (i.e. "sometex..." where "sometext" should be displayed).
    The ListCellRenderer creates a Gridlayout to lay out the 3 labels in the cell's JPanel.
    What can I do to remedy this situation? I'm not sure what I'd need to do in terms of setting the size of the panel so that all the text gets displayed OK within the listbox. Or if there's something else I can do to fix this. The code and a main() to run the code are provided below. To reproduce the problem, click the Add Left and Add Right buttons to add a "mapping" -- when it doesn't have focus, everything displays fine, but when you give it focus, note the text on the right label gets cut off.
    //======================================================================
    // Begin Source Listing
    //======================================================================
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.Collection;
    import java.util.Iterator;
    import java.util.Vector;
    import java.util.Enumeration;
    public class TwoColumnListbox extends JPanel
    private JList m_list;
    private JScrollPane m_Pane;
    public TwoColumnListbox(Collection c)
         DataMapListModel model = new DataMapListModel();
         if (c != null)
         Iterator it = c.iterator();
         while (it.hasNext())
         model.addElement(it.next());
         m_list = new JList(model);
         ListBoxRenderer renderer= new ListBoxRenderer();
              m_list.setCellRenderer(renderer);
              setLayout(new BorderLayout());
              m_list.setVisibleRowCount(4);
              m_Pane = new JScrollPane(m_list);
              add(m_Pane, BorderLayout.NORTH);
    public JList getList()
    return m_list;
    public JScrollPane getScrollPane()
    return m_Pane;
    public static void main(String s[])
              JFrame frame = new JFrame("TwoColumnListbox");
              frame.addWindowListener(new WindowAdapter() {
              public void windowClosing(WindowEvent e) {System.exit(0);}
    final DataMappings dm = new DataMappings();
    final TwoColumnListbox lb = new TwoColumnListbox(dm.getMappings());
              final DataMap map = new DataMap();
              JButton leftAddBtn = new JButton("Add Left");
              leftAddBtn.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e)
              map.setSource("JButton1");
              DefaultListModel model = new DefaultListModel();
              model.addElement(map);
              lb.getList().setModel(model);
              JButton leftRemoveBtn = new JButton("Remove Left");
              leftRemoveBtn.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e)
              map.setSource("");
              DefaultListModel model = new DefaultListModel();
              model.addElement(map);
              lb.getList().setModel(model);
              JButton rightAddBtn = new JButton("Add Right");
    rightAddBtn.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e)
              map.setDestination("/getQuote/symbol[]");
              DefaultListModel model = new DefaultListModel();
              model.addElement(map);
              lb.getList().setModel(model);
              JButton rightRemoveBtn = new JButton("Remove Right");
    rightRemoveBtn.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e)
              map.setDestination("");
              DefaultListModel model = new DefaultListModel();
              model.addElement(map);
              lb.getList().setModel(model);
              JPanel leftPanel = new JPanel(new BorderLayout());
              leftPanel.add(leftAddBtn, BorderLayout.NORTH);
              leftPanel.add(leftRemoveBtn, BorderLayout.SOUTH);
    JPanel rightPanel = new JPanel(new BorderLayout());
              rightPanel.add(rightAddBtn, BorderLayout.NORTH);
              rightPanel.add(rightRemoveBtn, BorderLayout.SOUTH);
    frame.getContentPane().add(leftPanel, BorderLayout.WEST);
              frame.getContentPane().add(lb,BorderLayout.CENTER);
    frame.getContentPane().add(rightPanel, BorderLayout.EAST);
              frame.pack();
              frame.setVisible(true);
         class ListBoxRenderer extends JPanel implements ListCellRenderer
              private JLabel left;
              private JLabel arrow;
              private JLabel right;
              private Color clrForeground = UIManager.getColor("List.foreground");
    private Color clrBackground = UIManager.getColor("List.background");
    private Color clrSelectionForeground = UIManager.getColor("List.selectionForeground");
    private Color clrSelectionBackground = UIManager.getColor("List.selection.Background");
              public ListBoxRenderer()
                   setLayout(new GridLayout(1, 2, 10, 0));
                   //setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
                   left = new JLabel("");
                   left.setForeground(clrForeground);               
                   arrow = new JLabel("");
                   arrow.setHorizontalAlignment(SwingConstants.CENTER);
                   arrow.setForeground(clrForeground);
                   right = new JLabel("");
                   right.setHorizontalAlignment(SwingConstants.RIGHT);
                   right.setForeground(clrForeground);
                   add(left);
                   add(arrow);
                   add(right);
              public Component getListCellRendererComponent(JList list, Object value,
                        int index, boolean isSelected, boolean cellHasFocus)
                   if (isSelected)
                        setBackground(list.getSelectionBackground());
                        setForeground(list.getSelectionForeground());
                        left.setForeground(clrSelectionForeground);
                        arrow.setForeground(clrSelectionForeground);
                        right.setForeground(clrSelectionForeground);
                   else
                        setBackground(list.getBackground());
                        setForeground(list.getForeground());
                   left.setForeground(clrForeground);
                        arrow.setForeground(clrForeground);
                        right.setForeground(clrForeground);               
                   // draw focus rectangle if control has focus. Problem with focus
    // and cut off text!!
                   if (cellHasFocus)
                   // FIXME: for Windows LAF I'm not getting the correct thing here for some reason.
                   // Looks OK on Metal though.
                   setBorder(BorderFactory.createLineBorder(UIManager.getColor("focusCellHighlightBorder")));
                   else
                   setBorder(BorderFactory.createEmptyBorder());               
    DataMap map = (DataMap) value;
                   String displaySource = map.getSource();
                   String displayDest = map.getDestination();
                   left.setText(displaySource);
                   arrow.setText("=>to<=");
                   right.setText(displayDest);
                   return this;
    /** Interface for macro editor UI
    * @version 1.0
    class DataMappings
    private Collection mappings;
    public DataMappings()
    setMappings(new Vector(0));
    public DataMappings(Collection maps)
    setMappings(maps);
    /** gets mapping value of a specified source object
    * @param src -- the "key" or source object, what is mapped.
    * @return what the source object is mapped to
    * @version 1.0
    public Object getValue(String src)
    if (src != null)
    Iterator it = mappings.iterator();
    while (it.hasNext());
    DataMap thisMap = (DataMap) it.next();
    if (thisMap.getSource().equals(src))
    return thisMap.getDestination();
    return null;
    /** sets mapping value of a specified source object
    * @param src -- the "key" or source object, what is mapped.
    * @param what the source object is to be mapped to
    * @version 1.0
    public void setValue(String src, String dest)
    if (src != null)
    // see if the value is in there first.
    Iterator it = mappings.iterator();
    while (it.hasNext())
    DataMap thisMap = (DataMap) it.next();
    if (thisMap.getSource().equals(src))
    thisMap.setDestination(dest);
    return;
    // not in the collection, add it
    mappings.add(new DataMap(src, dest));
    /** gets collection of mappings
    * @return a collection of all mappings in this object.
    * @version 1.0
    public Collection getMappings()
    return mappings;
    /** sets collection of mappings
    * @param maps a collection of src to destination mappings.
    * @version 1.0
    public void setMappings(Collection maps)
    mappings = maps;
    /** adds a DataMap
    * @param map a DataMap to add to the mappings
    * @version 1.0
    public void add(DataMap map)
    if (map != null)
    mappings.add(map);
    class DataMap
    public DataMap() {}
    public DataMap(String source, String destination)
    m_source = source;
    m_destination = destination;
    public String getSource()
    return m_source;
    public void setSource(String s)
    m_source = s;
    public String getDestination()
    return m_destination;
    public void setDestination(String s)
    m_destination = s;
    protected String m_source = null;
    protected String m_destination = null;
    /** list model for datamaps that provides ways
    * to determine whether a source is already mapped or
    * a destination is already mapped.
    class DataMapListModel extends DefaultListModel
    public DataMapListModel()
    super();          
    /** determines whether a source is already mapped
    * @param src -- the source property of a datamapping
    * @return true if the source is in the list, false if not
    public boolean containsSource(Object src)
    Enumeration enum = elements();
    while (enum.hasMoreElements())
    DataMap dm = (DataMap) enum.nextElement();
    if (dm.getSource().equals(src))
    return true;
    return false;
    /** determines whether a destination is already mapped
    * @param dest -- the destination property of a datamapping
    * @return true if the destination is in the list, false if not
    public boolean containsDest(Object dest)
    Enumeration enum = elements();
    while (enum.hasMoreElements())
    DataMap dm = (DataMap) enum.nextElement();
    if (dm.getDestination().equals(dest))
    return true;
    return false;
    public DataMappings getDataMaps()
    DataMappings maps = new DataMappings();
    // add all the datamaps in the model
    Enumeration enum = elements();
    while (enum.hasMoreElements())
    DataMap dm = (DataMap) enum.nextElement();
    maps.add(dm);
    return maps;
    //======================================================================
    // End of Source Listing
    //======================================================================

    I did not read the program, but the chopping looks like a layout problem.
    I think it's heavy to use a panel + 3 components in a gridlayout for each cell. look at this sample where i draw the Cell myself,
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.util.*;
    public class Jlist3 extends JFrame 
         Vector      v  = new Vector();
         JList       jc = new JList(v);
         JScrollPane js = new JScrollPane(jc);
    public Jlist3()
         addWindowListener(new WindowAdapter()
        {     public void windowClosing(WindowEvent ev)
              {     dispose();
                   System.exit(0);}});
         for (int j=0; j < 70; j++)     v.add(""+j*1000+"a  d"+j);
           setBounds(1,1,400,310);
         getContentPane().add(js);
         js.setPreferredSize(new Dimension(230,259));
         jc.setSelectedIndex(1);
         jc.setCellRenderer(new MyCellRenderer());
         getContentPane().setLayout(new FlowLayout());
         setVisible(true);
    public class MyCellRenderer extends JLabel implements ListCellRenderer
         String  txt;
         int     idx;
         boolean sel;
    public Component getListCellRendererComponent(JList list,
                             Object  value,           // value to display
                             int     index,           // cell index
                             boolean isSelected,      // is the cell selected
                             boolean cellHasFocus)    // the list and the cell have the focus
         idx = index;
         txt = value.toString();
         sel = isSelected;
         setText(txt);
         return(this);
    public void paintComponent(Graphics g)
         if (idx%2 == 1) g.setColor(Color.white);
              else        g.setColor(Color.lightGray);
         if (sel)        g.setColor(Color.blue);
         g.fillRect(0,0,getWidth(),getHeight());
         StringTokenizer st = new StringTokenizer(txt.trim()," ");
         g.setColor(Color.black);
         if (st.hasMoreTokens())     g.drawString(st.nextToken(),1,14);
         g.setColor(Color.red);
         g.drawString("===>",70,14);
         g.setColor(Color.black);
         if (st.hasMoreTokens())     g.drawString(st.nextToken(),110,14);
    public static void main (String[] args) 
         new Jlist3();
    Noah
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.util.*;
    public class Jlist3 extends JFrame
         Vector v = new Vector();
         JList jc = new JList(v);
         JScrollPane js = new JScrollPane(jc);
    public Jlist3()
         addWindowListener(new WindowAdapter()
    {     public void windowClosing(WindowEvent ev)
              {     dispose();
                   System.exit(0);}});
         for (int j=0; j < 70; j++)     v.add(""+j*1000+"a d"+j);
         setBounds(1,1,400,310);
         getContentPane().add(js);
         js.setPreferredSize(new Dimension(230,259));
         jc.setSelectedIndex(1);
         jc.setCellRenderer(new MyCellRenderer());
         getContentPane().setLayout(new FlowLayout());
         setVisible(true);
    public class MyCellRenderer extends JLabel implements ListCellRenderer
         String txt;
         int idx;
         boolean sel;
    public Component getListCellRendererComponent(JList list,
                             Object value, // value to display
                             int index, // cell index
                             boolean isSelected, // is the cell selected
                             boolean cellHasFocus) // the list and the cell have the focus
         idx = index;
         txt = value.toString();
         sel = isSelected;
         setText(txt);
         return(this);
    public void paintComponent(Graphics g)
         if (idx%2 == 1) g.setColor(Color.white);
              else g.setColor(Color.lightGray);
         if (sel) g.setColor(Color.blue);
         g.fillRect(0,0,getWidth(),getHeight());
         StringTokenizer st = new StringTokenizer(txt.trim()," ");
         g.setColor(Color.black);
         if (st.hasMoreTokens())     g.drawString(st.nextToken(),1,14);
         g.setColor(Color.red);
         g.drawString("===>",70,14);
         g.setColor(Color.black);
         if (st.hasMoreTokens())     g.drawString(st.nextToken(),110,14);
    public static void main (String[] args)
         new Jlist3();
    }

  • Upgraded to Windows 8.1 Pro - new window is losing focus after while

    Hi,
    Just upgraded to 8.1 pro. When new window is opened (any application), after about 5-10 secs focus is lost. And again.... I have to click on window to regain focus. VERY ANNOING WHEN TYPING DOCO
    ANY SOLUTION MR MICROSOFT?
    1. Lodged problem with MS, but bo reply for 5 days
    2. Started reading posts on net - some about mouse behaviour got my attention
    3. Downloaded and installed latest drivers for Microsort mouse
    4. Unpluged 'old' mouse and plugged in new mouse(the same model
    5. Problem solved - no more problems with focus
    6. Conclusion - could ba a problem with Windows upgrade - mouse locked?

    For this problem, May be we can check Event Viewer if it identify the problem.
    In addition, try to make a clean boot or boot into Safe Mode to test whether this problem caused by 3rd problem, service or driver.
    For more details about Clean boot, please refer to the link below:
    http://support.microsoft.com/kb/929135
    Roger Lu
    TechNet Community Support

  • Problems with focus traversal after moving to j2sdk_1.4.1_02

    Hi,
    Just moved to j2sdk_1.4.1_02 and we are having problems where
    focus stays on wrong UI component e.g. a user(user2) is taking edit/write permissions from another user(user1) that has write permissions. User1 is told that they will lose write permissions in
    the next 15 minutes ( information dialog displayed on their screen ) while at the same time on user2's window a text label is updated
    every 5 seconds to say how long before they will have write permissions,
    however, the information dialog displayed on user1 hangs and
    the user can't remove this dialog. Control seems to stay with user2.
    This used to work with the previous java version we used.
    Hope someone can help,
    Thanks

    Didn't say what version you came FROM, but I'm guessing if
    you're having focus related problems it was from PRIOR to 1.4
    when focus handling was revamped.
    You probably need to make sure you are using requestFocusInWindow()
    everywhere instead of requestFocus().
    Check here and possibly search for 1.4 and KeyboardFocusManager
    for new focus handling tutorials.

  • Problem in focusing JScrollPane

    I have problem in focusing a JScrollPane.
    I added a JPanel size 1000x1000 to a JScrollPane and I want to focus at the center of this JPanel.
    I have tried 2 ways to do it, but both don't work.
    1.----adding jPanel to jScrollPane directly----------------
    jScrollPane = new JScrollPane(jPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    jScrollPane.getVerticalScrollBar().setValue(500);
    jScrollPane.getHorizontalScrollBar().setValue(500);
    jScrollPane.getVerticalScrollBar().show();
    2.----using JViewport-------------------
    JViewport vp = new JViewport();
    vp.setView(jPanel);
    vp.setViewPosition(new Point(500,500));
    vp.repaint();
    vp.doLayout();
    jScrollPane.setViewport(vp);
    Can anybody tell me where did I go wrong, please?

    Not sure, but I don't think you can set the scroll bar location until the component is visible on the frame. That is a component doesn't really have a size until it is layed out and visible on the screen. So try:
    frame.setVisible(true);
    jScrollPane.getVerticalScrollBar().setValue(500);
    jScrollPane.getHorizontalScrollBar().setValue(500);
    Or your could try adding a ComponentListener to you ScrollPane to set the scrollbar values when the component is shown.
    I'm basing my suggestion on the discussion from this thread:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=476357

  • Problems losing quality when going from develop module to library module ??  anyone have a fix

    Problems losing quality when going to library module from develop module.  Sharpness and color quality decrease

    This is normal. There will be a difference as you are comparing Library Previews with the image in Develop which accesses the original file, although the difference is usually slight. Real results need to be judged from exporting after selecting the output sharpening e.g. for glossy paper, if printing or screen sharpening for web images or emailing.
    The idea with sharpening is to apply capture sharpening so that the image in Develop looks just sharp but not over sharp. Lightroom then uses the correct algorithm for output sharpening based upon image size and quality settings etc.

  • Problems with titler window losing focus

    I'm using PP2.0, running on windows XP x64. It's been running since it was last re-installed in December 2007 (after a problem with codecs that broke PP2), and I've made no changes to it or to any of the support processes it uses, nor any changes to the OS (apart from service packs). There have been NO driver changes, window layout changes, workspace changes, or any other changes (apart from entropy). The mouse I'm using is a [oxymoron]Kensington Expert Mouse Pro[/oxymoron], with their latest (i.e. 2007) drivers, and XMouse ver 1.37.0.0 (i.e. their latest x64 driver), but this happens regardless of the mouse or keyboard I use.
    To set the scene... I use a "standard" title template for all my video work, with predefined text fields and colours and so on. There's nothing bizarre or extraordinary about these templates, they're actually super simplistic in terms of what most users here use their titlers for! The entire title is completely static - there are no scrolling or moving anythings, the title is overlaid on black video, there are just a dozen simple text boxes and one standard logo (bmp format), that's it. I use only Arial fonts, with no special settings or kerning or spacing or anything more complex than colour. I haven't touched or modified the original titler template since I set it up in December 2008. The problem I'm seeing happens to any titles, not just the known working template, so it's definitely a PP2 problem, not a titler problem.
    The problem is that recently (in the past 3-4 months, over maybe 5 projects in that time) the titler window loses focus while I'm using it, and the PP2 main application becomes active.
    When I bring the titler window up (using any method) and start editing, that window loses focus (window frame reverts to the background windowframe colour) and I can't type or do anything else in the titler window.The PP2 app window suddenly become the active window, and remains active until I shut down the titler.
    My workaround is to click and hold in the titler window, on or around the text I want to edit. So by pressing and holding the left mouse button, I can insert text just fine in any existing text frame. And by selecting text with the left button and then holding it (like I'm starting a drag operation), I can _replace_ the selected text - but as soon as I release the mouse button, the focus leaves the titler and I can't do anything again.
    I've reset the workspace, changed mouse and keyboards, but the problem isn't a hardware or driver issue. PP2 is the only application that behaves like this, and it's the only Adobe application that behaves like this - Photoshop (5.5 and CS8) and Audition (1.5 and 3.0) all work perfectly normally.
    This behaviour occurs with titles I've used and saved in previous working projects, it happens with new blank titles, and so on.
    What I've noticed most recently while trying to fix the problem, is that sometimes I can actually type a couple of letters or hit an editing key or two in the titler window normally, but then the titler loses focus and keeps it lost permanently after that. That doesn't always happen, and it doesn't appear to be related to process flow. So restarting PP2, or closing and reloading a project, don't affect the arbitrary nature of the "sometimes starts to work" behaviour. I can sometimes re-edit a title in the same project after editing the title with the focus lost, and suddenly the first few keystrokes are normal, but then the focus reverts to the main app.
    If anyone has any ideas or suggestions to try (apart from reinstalling the application again or upgrading), I'd be most grateful.
    -PCPete

    I think you're right, it's starting to look like another problem within the "new" PP2 installation. It's such a complex app, it's not surprising it gets lost.
    Since this is the only app that has this problem (and because of the nature of the problem), I know it's not a graphics card or driver issue.
    This appears to be a high-level windows function problem, to do with the way the PP2 app is handling the modal form. It's probably not the mouse driver, since I don't move the mouse outside of the child window, but that doesn't leave much else. I don't have popups or any other asynchronous applications (like email warning windows or balloon-type reminders or notifications) either.
    I really don't want to go through the horror of yet another reinstall of an Adobe product if I can possibly avoid it, but pending no other useful ideas, that is an absolute last resort.

  • JTable custom cell editor losing focus

    This is a followup to Re: Tutorial on AWT/Swing control flow wherein I ask for pointers to help me understand the source of focus-loss behaviour in my JTable's custom cell editor.
    I have done some more investigations and it turns out that the focus loss is a more general problem with custom cell editors which call other windows. Even the color-picker demo in the JTable tutorial at http://download.oracle.com/javase/tutorial/uiswing/examples/components/index.html#TableDialogEditDemo has this problem, IF you add a text field or two to the layout BEFORE the table. The only reason the table in the demo doesn't lose the focus when the color-picker comes out is because the table is the only thing in the window!
    Here is the demo code, augmented with two text fields, which are admittedly ugly here but which serve the desired purpose:
    * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    *   - Redistributions of source code must retain the above copyright
    *     notice, this list of conditions and the following disclaimer.
    *   - Redistributions in binary form must reproduce the above copyright
    *     notice, this list of conditions and the following disclaimer in the
    *     documentation and/or other materials provided with the distribution.
    *   - Neither the name of Oracle or the names of its
    *     contributors may be used to endorse or promote products derived
    *     from this software without specific prior written permission.
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
    * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    import javax.swing.*;
    import javax.swing.border.Border;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.table.TableCellEditor;
    import javax.swing.table.TableCellRenderer;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    public class TableDialogEditDemo extends JPanel {
        public class ColorEditor extends AbstractCellEditor
                implements TableCellEditor,
                ActionListener {
            Color currentColor;
            JButton button;
            JColorChooser colorChooser;
            JDialog dialog;
            protected static final String EDIT = "edit";
            public ColorEditor() {
                //Set up the editor (from the table's point of view), which is a button.
                //This button brings up the color chooser dialog, which is the editor from the user's point of view.
                button = new JButton();
                button.setActionCommand(EDIT);
                button.addActionListener(this);
                button.setBorderPainted(false);
                //Set up the dialog that the button brings up.
                colorChooser = new JColorChooser();
                dialog = JColorChooser.createDialog(button, "Pick a Color", true,  //modal
                        colorChooser, this,  //OK button handler
                        null); //no CANCEL button handler
             * Handles events from the editor button and from the dialog's OK button.
            public void actionPerformed(ActionEvent e) {
                if (EDIT.equals(e.getActionCommand())) {
                    //The user has clicked the cell, so bring up the dialog.
                    button.setBackground(currentColor);
                    colorChooser.setColor(currentColor);
                    dialog.setVisible(true);
                    //Make the renderer reappear.
                    fireEditingStopped();
                } else { //User pressed dialog's "OK" button
                    currentColor = colorChooser.getColor();
            public Object getCellEditorValue() {
                return currentColor;
            public Component getTableCellEditorComponent(JTable table,
                                                         Object value,
                                                         boolean isSelected,
                                                         int row,
                                                         int column) {
                currentColor = (Color) value;
                return button;
        public class ColorRenderer extends JLabel
                implements TableCellRenderer {
            Border unselectedBorder = null;
            Border selectedBorder = null;
            boolean isBordered = true;
            public ColorRenderer(boolean isBordered) {
                this.isBordered = isBordered;
                setOpaque(true);
            public Component getTableCellRendererComponent(
                    JTable table, Object color,
                    boolean isSelected, boolean hasFocus,
                    int row, int column) {
                Color newColor = (Color) color;
                setBackground(newColor);
                if (isBordered) {
                    if (isSelected) {
                        if (selectedBorder == null) {
                            selectedBorder = BorderFactory.createMatteBorder(2, 5, 2, 5,
                                    table.getSelectionBackground());
                        setBorder(selectedBorder);
                    } else {
                        if (unselectedBorder == null) {
                            unselectedBorder = BorderFactory.createMatteBorder(2, 5, 2, 5,
                                    table.getBackground());
                        setBorder(unselectedBorder);
                return this;
        public TableDialogEditDemo() {
            super(new GridLayout());
            JTextField tf1 = new JTextField("tf1");
            add(tf1);
            JTextField tf2 = new JTextField("tf2");
            add(tf2);
            JTable table = new JTable(new MyTableModel());
            table.setPreferredScrollableViewportSize(new Dimension(500, 70));
            table.setFillsViewportHeight(true);
            JScrollPane scrollPane = new JScrollPane(table);
            table.setDefaultRenderer(Color.class,
                    new ColorRenderer(true));
            table.setDefaultEditor(Color.class,
                    new ColorEditor());
            add(scrollPane);
        class MyTableModel extends AbstractTableModel {
            private String[] columnNames = {"First Name",
                    "Favorite Color",
                    "Sport",
                    "# of Years",
                    "Vegetarian"};
            private Object[][] data = {
                    {"Mary", new Color(153, 0, 153),
                            "Snowboarding", new Integer(5), new Boolean(false)},
                    {"Alison", new Color(51, 51, 153),
                            "Rowing", new Integer(3), new Boolean(true)},
                    {"Kathy", new Color(51, 102, 51),
                            "Knitting", new Integer(2), new Boolean(false)},
                    {"Sharon", Color.red,
                            "Speed reading", new Integer(20), new Boolean(true)},
                    {"Philip", Color.pink,
                            "Pool", new Integer(10), new Boolean(false)}
            public int getColumnCount() {
                return columnNames.length;
            public int getRowCount() {
                return data.length;
            public String getColumnName(int col) {
                return columnNames[col];
            public Object getValueAt(int row, int col) {
                return data[row][col];
            public Class getColumnClass(int c) {
                return getValueAt(0, c).getClass();
            public boolean isCellEditable(int row, int col) {
                if (col < 1) {
                    return false;
                } else {
                    return true;
            public void setValueAt(Object value, int row, int col) {
                data[row][col] = value;
                fireTableCellUpdated(row, col);
        private static void createAndShowGUI() {
            JFrame frame = new JFrame("TableDialogEditDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JComponent newContentPane = new TableDialogEditDemo();
            newContentPane.setOpaque(true);
            frame.setContentPane(newContentPane);
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }When you come back from choosing a color, tf1 is given the focus, instead of the table. This is because bringing the color picker window to the front causes a focus lost event for the cell editor component; it's temporary, as it should be, so why on earth is the system losing track of who has focus in the window??
    I see the following in Window#getMostRecentFocusOwner():
      public Component getMostRecentFocusOwner()
        if (isFocused())
          return getFocusOwner();
        else
          Component mostRecent =
            KeyboardFocusManager.getMostRecentFocusOwner(this);
          if (mostRecent != null)
            return mostRecent;
          else
            return (isFocusableWindow())
                   ? getFocusTraversalPolicy().getInitialComponent(this)
                   : null;
      }My app has a custom focus traversal policy, so I'm able to see who is being called, and indeed, getInitialComponent() is being called. Clearly, the KeyboardFocusManager is actually losing track of the fact that the table was focussed at the point where control was transferred to the color picker! This strikes me as completely unreasonable, especially since, as noted, this is a temporary focus loss event, not a permanent one.
    I'd be grateful for any wisdom in solving this, since similar behaviour to this little demo -- without focus loss, naturally -- is an essential part of my application.

    Looks like it is because the 'restore-focus-to-previous-after-modal-dialog-close' is in a later event than when the control returns to the action performed (which I guess makes sense: it continues the action event handler and the focus events are handled later, but I needed two chained invoke laters so it might also be that the OS events comes later).
    The following works for me (in the actionPerformed edited):
               // create the dialog here so it is correctly parented
               // (otherwise sometimes OK button not correctly the default button)
               dialog = JColorChooser.createDialog(button, "Pick a Color", true,  //modal
                            colorChooser, this,  //OK button handler
                            null); //no CANCEL button handler
                    //The user has clicked the cell, so bring up the dialog.
                    button.setBackground(currentColor);
                    colorChooser.setColor(currentColor);
                    button.addFocusListener(new FocusListener() {
                        @Override
                        public void focusLost(FocusEvent e) {}
                        @Override
                        public void focusGained(FocusEvent e) {
                            // dialog closed and focus restored
                            button.removeFocusListener(this);
                            fireEditingStopped();
                    dialog.setVisible(true);but a simpler request might be better (althoug I still need an invoke later):
    // rest as before except the FocusListener
                    dialog.setVisible(true);
                    button.requestFocusInWindow();
                    EventQueue.invokeLater(new Runnable() {
                        public void run() {
                            fireEditingStopped();
                    });And a quick fix to the renderer so you can actualy see the focus on it:
                    if(hasFocus) {
                        Border border = DefaultLookup.getBorder(this, ui, "Table.focusCellHighlightBorder");
                        setBorder(BorderFactory.createCompoundBorder(
                                border, BorderFactory.createMatteBorder(1, 4, 1, 4,
                                        ((MatteBorder) getBorder()).getMatteColor())));
                    }

  • JMenu doesn't dissapear when menu is losing focus

    Hello everyone!
    I have a JMenu with several JMenuItems. The problem is that the JMenu doesn't dissapear when the menu is losing it's focus, for example when I click somewhere in the application window. I use the Windows look and feel for my application.
    Any ideas ? Thanks.

    Add some try/catch block. My guess is that you bump in some NullPointerException.

  • Problem with focus and selecting text in jtextfield

    I have problem with jtexfield. I know that solution will be very simple but I can't figure it out.
    This is simplified version of situation:
    I have a jframe, jtextfield and jbutton. User can put numbers (0-10000) separated with commas to textfield and save those numbers by pressing jbutton.
    When jbutton is pressed I have a validator which checks that jtextfield contains only numbers and commas. If validator sees that there are invalid characters, a messagebox is launched which tells to user whats wrong.
    Now comes the tricky part.
    When user presses ok from messagebox, jtextfield should select the character which validator said was invalid so that user can replace it by pressing a number or comma.
    I have the invalid character, but how can you get the focus to jtextfield and select only the character which was invalid?
    I tried requestFocus(), but it selected whole text in jtextfield and after that command I couldn't set selected text. I tried with commands setSelectionStart(int), setSelectionEnd(int) and select(int,int).
    Then I tried to use Caret and select text with that. It selected the character I wanted, but the focus wasn't really there because it didn't have keyFocus (or something like that).
    Is there a simple way of doing this?

    textField.requestFocusInWindow();
    textField.select(...);The above should work, although read the API on the select(...) method for the newer recommended approach on how to do selection.
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)",
    see http://homepage1.nifty.com/algafield/sscce.html,
    that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    Don't forget to use the "Code Formatting Tags",
    see http://forum.java.sun.com/help.jspa?sec=formatting,
    so the posted code retains its original formatting.

  • Problem removing focused object from a table

    Hi.
    I have a problem removing a component that is focused from a table. The
    whole row is removed except a single component (JSpinner) in one row.
    My table has three columns, the first two are String fields
    (not editable) and the last is a JSpinner. Since there is no
    Default cell renderer or cell editor for JSpinner I had to
    create them.
    So, if no element of the row is focused then calling the function:
    public void clearTable() {
    setVisible(false);
    dataVector.removeAllElements(); // clear data vector
    setVisible(true);
    works just fine
    but if a spinner in a row is focused them that spinner is left alone "floating" on an otherwise empty table.
    Questions:
    1) Any one has an ideia of what might be the problem?
    2) Do I have to play with Focus to solve this? (hate the idea,
    since always been told to avoid messing with focus, because
    of the problems it normally brings)
    Thanks in advance for the help,
    Rgds,
    Jorge

    The problem is that you need to properly stop the editing operation first.if( myTable.isEditing() ) {
        // If you want to throw away any edits use...
        myTable.getCellEditor().cancelCellEditing();
        // If you want to apply any edits, then end use...
        myTable.getCellEditor().stopCellEditing();

  • Camileo P10 Problem with Focus

    Hello everyone,
    I bought a P10 Camileo and after an hour of use I started to have the following problem:
    The camera can no longer focus the image from afar.
    It seems that the focus is fixed, i have to bring the camera to get a clear image.
    Thank's.

    Hi pleone,
    I agree with the user above. You have to disable the image stabilization and than you are able to focus again.
    Furthermore the camera is equipped with a macro switch. Did you notice this?
    I also recommend checking the user manual. It contains a lot of interesting informations about the camera. :)

Maybe you are looking for

  • How do I set the document language in Pages '13?

    In Pages '09 it was possible to set a document's language by going to the More tab in the Text menu of the Inspector and selecting the language from the pull-down menu. In Pages '13 this has disappeared from the text format More sidebar, and I cannot

  • Setting defaultPanel Ignores panelHeight=false on load

    var Accordion1 = new Spry.Widget.Accordion("Accordion1",{useFixedPanelHeights:false,defaultPanel:1}); So when this page loads the default panel 1 is open correctly but does not have a fixed height. When I go ahead and click on another panel in the ac

  • What exactly IS the "compliation" function in iTunes?

    I even searched under iTunes Help, and I can't figure it out...what is it, how does it work, and what is it good for??

  • Add a library to iPhoto

    When I open iPhoto there are no libraries and the "add library" menu item is grayed out

  • OLE Automation to Excel problem

    Hello All, In a report program I have used the OLE2 automation to download data into Excel. But it's not functioning. Its doing nothing. Could you tell me do I have to have any authorizations to use this? Otherwise what could be the problem? Plz advi