Urgent !!!!!!!! JTextField's setMaximumSize effects the focus behavior

Urgent !!!!!!!!
I am facing a weired problem with focus gain. I have quite complex code, so I have made short by cutting the business code to simplefy it. This code will behave normal if you will compile and run this code. Its focus behave in a normal way.
It is import to run this example first in right way then run it for probelm.
For problem do the following step
1. goto buildTimePanel() at last of the code
2. deselect the two commented lines in this function.
3. compile the code and run.
Problem :
Focus passes to Search button before it passes through JComboBox's.
Please provide me the solution......... it is urgent!!!!!!!!!!!!
Code is
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
public class StatisticsPanel extends JFrame
//Calendar object for this machine
GregorianCalendar myCalendar;
// The panels
JPanel filterPanel;
JPanel leftPanel;
// Data Fields
JTextField startDate;
JTextField endDate;
JTextField startTime;
JTextField endTime;
// Search Buttons
static JButton srchButton;
// Combo boxes and Maps
JComboBox cbFile;
JComboBox cbDevice;
public StatisticsPanel()
myCalendar = new GregorianCalendar();
leftPanel = new JPanel();
leftPanel.setLayout(new BorderLayout());
filterPanel = new JPanel();
makeFilterPanel();
leftPanel.add(filterPanel, "North");
JFrame f = new JFrame();
f.setContentPane(leftPanel);
f.pack();
f.show();
private void makeFilterPanel()
// Time Selection
java.util.List panelList = new ArrayList();
for(int i = 0; i < 5; i++)
JPanel jp = new JPanel();
jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS));
panelList.add(jp);
JPanel timePanel = new JPanel();
timePanel.setLayout(new BoxLayout(timePanel, BoxLayout.Y_AXIS));
JLabel end = new JLabel("End:");
endDate = new JTextField(myCalendar.getTime().toString());
endTime = new JTextField(myCalendar.getTime().toString());
buildTimePanel(end, endDate, endTime, (JPanel)panelList.get(1));
// Set back one hour
myCalendar.roll(Calendar.HOUR_OF_DAY, false);
JLabel start = new JLabel("Start:");
startDate = new JTextField(myCalendar.getTime().toString());
startTime = new JTextField(myCalendar.getTime().toString());
buildTimePanel(start, startDate, startTime,(JPanel)panelList.get(0));
timePanel.add((JPanel)panelList.get(0));
timePanel.add((JPanel)panelList.get(1));
filterPanel.add(timePanel);
filterPanel.setLayout(new BoxLayout(filterPanel, BoxLayout.X_AXIS));
JPanel aPanelDevice = new JPanel();
JPanel aPanelFile = new JPanel();
JPanel aPanel = new JPanel();
aPanel.setLayout(new BoxLayout(aPanel, BoxLayout.Y_AXIS));
cbDevice = new JComboBox();
cbDevice.addItem("Item1 ");
cbFile = new JComboBox();
cbFile.addItem("item2 ");
buildOptionPanel(new JLabel("Device:"), cbDevice, aPanelDevice);
aPanel.add(aPanelDevice);
buildOptionPanel(new JLabel(" File:"), cbFile, aPanelFile);
aPanel.add(aPanelFile);
filterPanel.add(aPanel);
srchButton = new JButton("Search");
filterPanel.add(srchButton);
filterPanel.setSize(filterPanel.getPreferredSize());
private void buildOptionPanel(JLabel label,JComponent comp, JPanel panel) {
panel.add(label);
JComboBox textField = (JComboBox)comp;
panel.add(textField);
private void buildTimePanel(JLabel label, JTextField firstField,
JTextField secondField, JPanel panel) {
panel.add(label);
Dimension d = firstField.getPreferredSize();
//firstField.setMaximumSize(d);
panel.add(firstField);
//secondField.setMaximumSize(d);
secondField.setMinimumSize(d);
secondField.setPreferredSize(d);
panel.add(secondField);
public static void main(String[] args) {
new StatisticsPanel();
} // end StatisticsPanel class

Thanks guys,
I have found the problem..........
The problem was
java.util.List panelList = new ArrayList();
for(int i = 0; i < 5; i++)
JPanel jp = new JPanel();
jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS));
panelList.add(jp);
I have changed this code along with two other line, where we accesssing the panels from the list.
The news code is
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
public class StatisticsPanel extends JFrame
//Calendar object for this machine
GregorianCalendar myCalendar;
// The panels
JPanel filterPanel;
JPanel leftPanel;
// Data Fields
JTextField startDate;
JTextField endDate;
JTextField startTime;
JTextField endTime;
// Search Buttons
static JButton srchButton;
// Combo boxes and Maps
JComboBox cbFile;
JComboBox cbDevice;
public StatisticsPanel()
myCalendar = new GregorianCalendar();
leftPanel = new JPanel();
leftPanel.setLayout(new BorderLayout());
filterPanel = new JPanel();
makeFilterPanel();
leftPanel.add(filterPanel, "North");
JFrame f = new JFrame();
f.setContentPane(leftPanel);
f.pack();
f.show();
private void makeFilterPanel()
// Time Selection
JPanel jp1 = new JPanel();
JPanel jp2 = new JPanel();
JPanel timePanel = new JPanel();
timePanel.setLayout(new BoxLayout(timePanel, BoxLayout.Y_AXIS));
JLabel end = new JLabel("End:");
endDate = new JTextField(myCalendar.getTime().toString());
endTime = new JTextField(myCalendar.getTime().toString());
buildTimePanel(end, endDate, endTime, jp1);
// Set back one hour
myCalendar.roll(Calendar.HOUR_OF_DAY, false);
JLabel start = new JLabel("Start:");
startDate = new JTextField(myCalendar.getTime().toString());
startTime = new JTextField(myCalendar.getTime().toString());
buildTimePanel(start, startDate, startTime, jp2);
timePanel.add(jp2);
timePanel.add(jp1);
filterPanel.add(timePanel);
filterPanel.setLayout(new BoxLayout(filterPanel, BoxLayout.X_AXIS));
JPanel aPanelDevice = new JPanel();
JPanel aPanelFile = new JPanel();
JPanel aPanel = new JPanel();
aPanel.setLayout(new BoxLayout(aPanel, BoxLayout.Y_AXIS));
cbDevice = new JComboBox();
cbDevice.addItem("Item1 ");
cbFile = new JComboBox();
cbFile.addItem("item2 ");
buildOptionPanel(new JLabel("Device:"), cbDevice, aPanelDevice);
aPanel.add(aPanelDevice);
buildOptionPanel(new JLabel(" File:"), cbFile, aPanelFile);
aPanel.add(aPanelFile);
filterPanel.add(aPanel);
srchButton = new JButton("Search");
filterPanel.add(srchButton);
filterPanel.setSize(filterPanel.getPreferredSize());
private void buildOptionPanel(JLabel label,JComponent comp, JPanel panel) {
panel.add(label);
JComboBox textField = (JComboBox)comp;
panel.add(textField);
private void buildTimePanel(JLabel label, JTextField firstField,
JTextField secondField, JPanel panel) {
panel.add(label);
Dimension d = firstField.getPreferredSize();
firstField.setMaximumSize(d);
panel.add(firstField);
secondField.setMaximumSize(d);
secondField.setMinimumSize(d);
secondField.setPreferredSize(d);
panel.add(secondField);
public static void main(String[] args) {
new StatisticsPanel();
} // end StatisticsPanel class

Similar Messages

  • How do I turn on the GUI controls for the Focus Blur Effect in Final Cut Pro X

    I can't find the setting that enables the GUI control overlay to manipulate the parameters of the Focus blur effect in Final Cut Pro X. When I have the clip and the focus effect selected I only get a center element overlay. At one point I had controls for all the other elements of this effect.
    anyone know a shortcut or how I can toggle these controls back on?

    I don't see any other screen controls either.
    Maybe there was a change sometime, or maybe you were using a different effect?

  • To get the focus to a JTextField

    Hi,
    In my project,I am using a JFrame as a background .And I put a JDeskotppane.On that pane i put JInternalFrame.
    My JInternalFrame contains so many JButtons and JTextFields.
    My need is when I run the project the focus sholud be in my first JTextField.But the focus automatically goes to the JButton which is my first component.
    I try with following methods.
    jTextField1.requestFocus()
    jTextField1.requestFocusInWindow().
    But not .Is ther any way to do it?
    Thank you so much.
    Meena.

    Hi,
    Thank you so much.
    I write the coding of
    jTextField1.requestFocusInWindow() in Window Activated event.
    I got the result I want.
    The link given by you is very useful to me.
    Thank you so much
    Meena.

  • Can a ReadOnly-JTextField get the Focus for a Copy action?

    Until JDK 1.3 a JTextField can be focusable and selectable, also the JTextField
    is not editable. So the user can Copy (with Ctrl-C) the displayed text to an other application.
    With JDK 1.4 the user cannot select the JTextField, if the Field is not editable.
    How I can the JTextField set to selectable (or focusable) in not editable state?
    thanks for suggestions
    Roland

    I suppose a workaround would be to make the JTextField editable, and to assign a DocumentListener that throws away all attempted updates to the content. Look in the API documentation for JTextField for an example of a DocumentListener that controls the content (you would just override insertString and deleteString (?) to do nothing).

  • The selected row and cursor/focus behavior of af table

    Hi,
    A selected row in the af table can be changed by clicking the row, then the background color of selected row will be changed.
    But if I navigate to another row by pressing TAB or ENTER, the 'selected row' will not change.
    Is there any way to change this behavior?
    That is, if I use TAB/ENTER to move the cursor to another row, the 'selected row' will change accordingly.
    Thank you~~

    Hi,
    actually I looked into this a while ago and the problem comes from the focus being in the input text field, not on the table. Using JavaScript I currently don't see how we can get a handle to the row to manually set it. I'll keep a note and file an enhancement request to see if the dev team has an idea
    Frank

  • Urgent!!! change the direction of the focus of a JTable ,need Horizontal

    as I do to change the direction of the focus of a JTable, for default it is Vertical and I need Horizontal Focus...
    pressed the enter it is moved in the horizontal
    does anybody know as doing that?
    thank you!!!!

    Yes, the easiest way is post this request multiple times.
    http://forum.java.sun.com/thread.jsp?thread=386572&forum=31&message=1662714
    http://forum.java.sun.com/thread.jsp?thread=386545&forum=57&message=1662548
    http://forum.java.sun.com/thread.jsp?thread=386535&forum=31&message=1662517
    Good luck.

  • Unable to use the focus feature on a field

    hi,
    I have the need to manipulate the focus event of a field. This is my pdf body structure :
    form1 ----> form
    |_ a ----> page
    |_b ----> textfield
    |_c ----> textfield
    The idea is to test if the user pressed the key "ESC", "TAB" or "ENTER" when exiting from field "b". If so, and after testing the content of the field, i wanted to set the focus on that same field "b" to let the user proceed with the correction.
    I tried with the "xfa.event.commitKey" to see if the "ESC", "TAB" or "ENTER" keys where pressed while exiting the field. I then redirected the focus to different fields named "ESC", "TAB" and "ENTER" just to be sure that i was getting the correct keys.
    This feature works if i set the focus in a different field than the one i'm exiting.
    Then, i tried a different approach. On the exit event of the field, i placed the following code :
    app.setTimeOut("this.getField('form1[0].a[0].b[0]').setFocus()", 1000);
    This would do the same as the setFocus after a while.
    For what i could see, catching the events with the "xfa.event.commitKey" for the "ESC", "TAB" or "ENTER" key works alright. The problem is to set the focus to the current field ( the one where the exit event is being analyzed ). However, if i change the destination field to any other field on the form, all the scripts work.
    Following the structure that i have on top, it the exit event is being analyzed on field "b" and the "setFocus" or the "app.setTimeOut" scripts indicate field "b" as destination, it doesn't work.
    If i change the destination field to be "c", all the scripts work as expected. It seems like there is a problem with setting the focus on the field that i'm exiting from.
    Any ideas on this ???
    Thanks.

    Does anyone have a solution to this problem?
    I'm urgently trying to find a workaround, but nothing seems to work.
    The focus on the current field works in acrobat reader versions above 8.0, but in 8.0 it just doesn''t work...
    To reiterate:
    On the exit event of a textbox I need to display a validation message if a certain condition is met. I then need to refocus on the same textbox after the "ok" button is clicked in the validation warning.
    My setFocus code is correct, but it just doesn't work in 8.0.
    Thoughts?

  • JInternalDialog stealing the focus in Linux environment.

    I have the code which opens new JInternalFrame (showPopup() method). When this code is called from EDT directly, for instance from actionPerformed() then newly opened JInternalFrame does not steal focus from other applications ... but If this code called from EDT, but for instance in SwingWorker done() method ... then it does, newly opened JInternalFrame steals focus from other appliaction. Some from GUI programmer point of view the same thread call the same piece of code but get the different behavior ... This is reproducable only under Linux OS (I have tried under Fedora and Scientific Linux) .... Any ideas ?
    Below code which you can try, just compile and run ...
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.Rectangle;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    import javax.swing.JDesktopPane;
    import javax.swing.SwingWorker;
    import javax.swing.WindowConstants;
    import javax.swing.JInternalFrame;
    public class FocusTest implements ActionListener {
         private JDesktopPane desktop;
         private JInternalFrame frame;
         private JInternalFrame iframe;
         private JButton button1;
         private JButton button2;
         public FocusTest(){
              JFrame.setDefaultLookAndFeelDecorated(true);
              JFrame externalFrame = new JFrame();
              desktop = new JDesktopPane();
              desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
              frame = createMainFrame();
              desktop.add(frame);
              externalFrame.add(desktop);
              externalFrame.setSize(new Dimension(700, 300));
              externalFrame.setVisible(true);
         private JInternalFrame createMainFrame() {
              button1 = new JButton("EDT Dialog");
              button1.addActionListener(this);
              button1.setToolTipText("Wait 2 seconds then show popup, openInternalFrame(), directly in EDT (without any switching between threads).");
              button2 = new JButton("Worker Dialog");
              button2.addActionListener(this);
              button2.setToolTipText("Wait 2 seconds then execute SwingWorker and in done method show popup, openInternalFrame()");
              JPanel panel = new JPanel();
              panel.add(button1);
              panel.add(button2);
             JInternalFrame internalFrame = new JInternalFrame();
             internalFrame.add(panel);
             internalFrame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
             internalFrame.setBounds(new Rectangle(300, 150));
              internalFrame.setVisible(true);
                try {
                     internalFrame.setSelected(true);
                } catch (Exception e) {
                     e.printStackTrace();
            return internalFrame;
         private void showPopup(){
             JPanel panel = new JPanel();
              panel.setLayout(new BorderLayout());
              JPanel msgspanel = new JPanel();
              msgspanel.add(new JLabel("INTERNAL FRAME"));
              panel.add(msgspanel, BorderLayout.PAGE_START);
              JPanel buttonpanel = new JPanel();
              final JButton ok = new JButton("Ok");
              final JButton cancel = new JButton("Cancel");
              buttonpanel.add(ok);
              buttonpanel.add(cancel);
              panel.add(buttonpanel, BorderLayout.PAGE_END);
              iframe = new JInternalFrame();
              iframe.setTitle("Internal Frame");
              iframe.add(panel);
              ok.addActionListener(new ActionListener() {
                   @SuppressWarnings("synthetic-access")
                   public void actionPerformed(ActionEvent evt) {
                        iframe.dispose();
              cancel.addActionListener(new ActionListener() {
                   @SuppressWarnings("synthetic-access")
                   public void actionPerformed(ActionEvent evt) {
                        iframe.dispose();
              iframe.pack();
              iframe.setLocation(frame.getLocation().x+10, frame.getLocation().y+10);
              iframe.setVisible(true);
              desktop.add(iframe);
              try {
                   iframe.setSelected(true);
                } catch (Exception e) {
                     e.printStackTrace();
              iframe.toFront();
         @Override
         public void actionPerformed(ActionEvent e) {
              if (e.getSource().equals(button1)) {
                   try {
                       Thread.sleep(2000);
                       showPopup();
                  } catch (InterruptedException ex){
                       ex.printStackTrace();
              } else if (e.getSource().equals(button2)) {
                   try {
                       Thread.sleep(2000);
                  } catch (InterruptedException ex){
                       ex.printStackTrace();
                   OpenerWorker worker = new OpenerWorker();
                   worker.execute();
         private class OpenerWorker extends SwingWorker<Object, Object> {
              @Override
              protected Object doInBackground() throws Exception {
                   return null;
              @Override
              protected void done() {
                   showPopup();
          * @param args
         public static void main(String[] args){
              SwingUtilities.invokeLater(new Runnable() {
                  public void run() {
                       try {
                            new FocusTest();
                       } catch (Exception e){
                             e.printStackTrace();
    }

    Set ur path env variable in your .bash_profile or .bashrc file
    export PATH=$ORACLE_HOME/bin:$PATH
    Then just issue the command in your prompt
    linux]dbca
    linux]netmgr
    NB: if your are in a remote machine you need to set DISPLAY variable too
    or you can directly to ur bin folder where you can see all the utilities.. you can run it like
    linux ]./dbca
    Regards
    Nishant

  • How can a JTextField in a Dialog gain focus while mainframe is clicked

    Hi
    I have been trying to develop a 3d application. I have some shapes on a Canvas3D laid on a JFrame.
    I open a new shape dialog after pressing the appropriate button.
    Once the dialog is open I need to select two shapes on canvas for reference hence there are two text fields to show the name of each.
    when I select the first shape the corresponding textfield is being updated.
    Now the Problem
    I place the cursor in the second tex field and click on second shape on canvas.
    I lose focus from text field to canvas.
    Now I am unsure if the second textfield has the focus or is the focus with the first text field. Based on this focus info I can update the text fields.
    I understand that only one field can have focus at a time.
    My doubt is How can the JTextField retain its focus while the components on main window are being clicked.
    The following code is enclosed in a listener that responds to picked shapes.
    if(gooi.getSketchDialog() != null && gooi.getSketchDialog().isShowing()){
                gooi.getPick1().getCanvas().setFocusable(false);
                if(gooi.getSketchDialog().getSelectedPlaneTextField().isFocusOwner()){
                        if( pickResult != null)
                            gooi.getSketchDialog().getSelectedPlaneTextField().setText(pickResult.getNode(PickResult.SHAPE3D).getUserData().toString());
                        else if (pickResult == null){
                            gooi.getSketchDialog().getSelectedPlaneTextField().setText("");
            }Any help is appreciated.
    Thanks in Advance
    Venkat
    Edited by: pushinglimits on Oct 31, 2008 6:52 AM

    Michael
    The text field still loses focus when its containing window is no longer focused.import java.awt.FlowLayout;
    import java.awt.event.FocusEvent;
    import java.awt.event.FocusListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JTextField;
    import javax.swing.SwingUtilities;
    public class NoFocusTransfer implements FocusListener {
       public static void main(String[] args) {
          SwingUtilities.invokeLater(new Runnable() {
             @Override
             public void run() {
                new NoFocusTransfer().makeUI();
       public void makeUI() {
          JTextField one = new JTextField(20);
          one.addFocusListener(this);
          JTextField two = new JTextField(20);
          two.addFocusListener(this);
          JFrame frameOne = new JFrame("");
          frameOne.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frameOne.setSize(400, 400);
          frameOne.setLocationRelativeTo(null);
          frameOne.setLayout(new FlowLayout());
          frameOne.add(one);
          frameOne.add(two);
          JButton button = new JButton("Click");
          button.setFocusable(false);
          JFrame frameTwo = new JFrame();
          frameTwo.add(button);
          frameTwo.pack();
          frameTwo.setFocusable(false);
          frameOne.setVisible(true);
          frameTwo.setVisible(true);
       public void focusGained(FocusEvent e) {
          try {
             System.out.println("Focus from: " +
                     e.getOppositeComponent().getClass().getName());
             System.out.println("Focus to: " +
                     e.getComponent().getClass().getName());
          } catch (NullPointerException npe) {
       public void focusLost(FocusEvent e) {
          try {
             System.out.println("Focus from: " +
                     e.getComponent().getClass().getName());
             System.out.println("Focus to: " +
                     e.getOppositeComponent().getClass().getName());
          } catch (NullPointerException npe) {
    }db

  • How do I fix my mac so that the window I am looking at has the focus?

    I am a new mac user and at present beyond comprehension of how people cope with mac if they are not primarily mouse oriented.
    Current problem.
    I close an app using apple key W
    It closes
    I am looking at a window of another app. I want to close that too. Apple key W. Nothing. This window does not have the focus. No keyboard actions will make it do anything. And the bar at the top of the screen is still the bar for the app I have just closed, but that does not respond to the keyboard either. At this point, no keyboard action will affect either app.
    As a one time developer I have to say that in any context I am familiar with this would be considered a major show stopping bug, and the programmer would get into a lot of trouble if the software went out in this condition.
    Certainly, for a user who lives by the keyboard coming from linux / windows, both of which do what I consider sane and sensible things in all places and at all times, this is a major *** situation!
    Please can someone tell me how to get my mac to behave more 'sensibly'.
    I want the window I am looking at, the only window visible on the screen, to have the focus. Always. No matter what! Which I think is entirely reasonable.

    Thank you for all your points.
    It can't automatically be the one you want without some instruction from you - the cmputer is not a mind reader, can not seenwhat holds your attention.
    Darn!
    In Windows and Linux it is automatically the last one in use before you closed the window(s) that have been closed. This is the window naturally lying topmost in the stack of windows on the screen. It is this window which is exposed in the circumstance I am describing. And it is this window which I expect to have the focus in this circumstance.
    More to the point, and has been mentioned several times - unlike Windows, when you close the last window of a Mac app, the program is not quit (usually - there are exceptions). The program is still running, as is indicated by the 'running light' on the Dock (the small bluish oval underneath the app's icon in the Dock), even though it has no windows open.
    It is not running with an invisible window being the focus - it has no windows at this point, not even an invisible one.
    Yes, understood - naturally enough after a few hours exposure to the mac interface. And I would assume that none of the quitted windows in that app will have the focus, which would be nonsensical.
    The overall 'focus' is still on that program, because it is still running (you closed its windows, but did not quit the program) and will remain so until you instruct the Mac to switch to a different program in the stack (or queue, or rotation, however you choose to consider it).
    Yes. WHY?
    Whether program closes when you close the last window is an interesting point. Mac do it different to the others. OK. But this program should not have the focus, unless there is something useful you can do with it. I would have thought obviously.
    Why have a program quit when you close its last window? Doesn't make sense to me - can't tell you how many times that behavior with a PC has irked me. Consider this scenario - you're writing a memo to someone in TextEdit. You print the memo off. You're done with that doc, but then want to write a letter to someone. So you close the window for that file, which happens to be the last window open for TextEdit. If TextEdit should quit at that point, you'd need to restart it again before you can write the letter. But - it doesn't quit; it's still running. So instead of restarting it, all you need do after closing the memo's window is press Command-N for a new, blank doc in which you can write the letter.
    I agree. This is very useful - once you are used to it. Certainly, this is an excellent option, though it seems crazy that it is not a readily settable option. Equally though, if I was going from mac to windows or linux, I would be totally peeved if this behaviour was not a settable option.
    Regardless, this is the way it is in the Mac world, and has always been as far back as I can remember it (and I go back to OS 1 on a MacPlus). As far as 'industry standards' go, there are many who feel that Macs set the GUI standards a long time ago, and that those wo have imitated it have not done a good job of their implementations.
    I totally take your point. And I am ready and willing to learn a new interface, naturally, though I had no idea the journey would be so extensive. [] "More ruddy stairs" says the elderly ghost of the recently deceased David Emery grumpy old git character, who hobbles along with a cane, confronted with a loooong flight of stairs up to heaven []
    - elsewise I'm going to cause myself an inordinate amount of frustration when my impossible-to-meet expectations aren't met.
    Of course I have impossible-to-meet expectations, I got a mac, the doyen of computers. I thought a faint mysterious hint of a sound might be present in the faint whirr of the fans at start up, like far off angelic choirs, and that everything would be easy and wonderful, as well as beautifully easy on the eye.
    But I still think that the focus shoud go somewhere useful. And if it stays with the app running with no windows, then at the very least it should be one keyboard shortcut to open a window for that app, or reopen the last window of that app. Or, gasp, it should go to the last window in use before the windows of the app that just got closed, the one on top of the stack, the one straight in front of you, currently impervious to any and all keyboard strokes. And, given the price and sophisication of macs, and the significant gap between the GUI standards of the major players, however long they have respectively been in business, I think it is the kind of thing which should be settable. Indeed, confident that this was settable or 'fixable', I embarked on this thread in the first place.
    EOL

  • Odd urxvt focus behavior

    urxvt has not been focusing the past day or so. when I open it, it comes up unfocused. I havent made any changes to .Xdefaults nor is there any entry other than color-scheme. I have looked in rc.xml (openbox) and pypanelrc and I dont have anything in regards to urxvt & focusing.
    no other applications have this behavior. they all focus upon opening. urxvt used to as well.
    there was an update on the 8th for urxvt and one for openbox, so perhaps there's a bug..? has anyone else noticed this with ob & urxvt?
    what other causes are possible? not that it's a big deal or anything - my system is running perfectly as is urxvt besides this little annoyance. im more curious than anything.
    thanks.

    I have this problem too.  Well sometimes it opens up totally black, and then when I click on it it pops into focus with the normal trasparency settings. But sometimes it opens up just fine. I tried upgrading to the testing version, and it has the same behavior. I thought it was something I set wrong in .Xdefaults, but it use to always be just fine. Also it seems to open up kind of slow compared to other terminals. I tried googling and haven't found any thing specific yet.

  • After clicking on an open tab, how to make the focus automatically go to the body of page?

    After clicking on an open tab, how to make the focus automatically go to the body of page?
    Right now, clicking in an open tab and using arrow keys now moves through the open tabs. I liked the old versions where right after clicking in a tab you could directly go to navigate the page with the arrow keys.
    Is there a something I can change in about:config to change this behavior?
    Thanks in advanced.

    Firefox should still set the focus the the browser area if you click a tab.<br />
    Only with very old browser versions you could set the focus to a tab by clicking a tab.
    This behavior is likely caused by an extension.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Skins that effect the host component behaviour.

    There was an interesting question that was raised in the pre-release forums about what is the appropriate way to handle animations between the skin and its host. Basically the issue was if there is an animation in the host and another in the skin what would be the best way to code it so that both animations ran in parallel, My thoughts are why not do it all in the skin. this example animates a container by resizing it and centering it in the application.
    I figured it would be an interesting topic for those that are trying adding extra component functionality into the skin.
    @PD - Maybe you could apply a little of your magic to something like this and add it your blog.
    David
    The App
    =============================================================
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/halo"
      creationComplete="application1_creationCompleteHandler(event)" width="100%" height="100%">
    <s:layout>
    <s:BasicLayout/>
    </s:layout>
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.events.FlexEvent;
    protected function application1_creationCompleteHandler(event:FlexEvent):void
    menu1.verticalCenter=height/2*-1 + 35; 
    menu1.horizontalCenter=width/2*-1 + 110;
    ]]>
    </fx:Script>
    <s:SkinnableContainer id="menu1" left="10" top="10" width="200" height="50"
    skinClass="SkinnableContainerSkin2" backgroundColor="#A16969">
    </s:SkinnableContainer>
    </s:Application>
    =============================================================
    The Skin
    =============================================================
    <?xml version="1.0" encoding="utf-8"?>
    <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:fb="http://ns.adobe.com/flashbuilder/2009" alpha.disabled="0.5" creationComplete="skin1_creationCompleteHandler(event)">
    <fx:Declarations>
    <s:Parallel id="sizer">
    <s:Animate target="{hostComponent}" duration="2000" repeatCount="1">
    <s:SimpleMotionPath id="setheight" property="height" valueTo="500"/>
    </s:Animate>
    <s:Animate target="{hostComponent}" duration="2000" repeatCount="1">
    <s:SimpleMotionPath id="setvertical" property="verticalCenter" valueTo="0"/>
    </s:Animate>
    <s:Animate target="{hostComponent}" duration="2000" repeatCount="1">
    <s:SimpleMotionPath id="sethorizontal" property="horizontalCenter" valueTo="0"/>
    </s:Animate>
    </s:Parallel>
    </fx:Declarations>
    <fx:Metadata>
        <![CDATA[
            [HostComponent("spark.components.SkinnableContainer")]
        ]]>
        </fx:Metadata>
        <fx:Script fb:purpose="styling">
            <![CDATA[       
    import mx.events.FlexEvent;
    import mx.core.FlexGlobals;
    private var Vert:int;
    private var Horz:int;
                override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
                    bgFill.color = getStyle("backgroundColor");
                    bgFill.alpha = getStyle("backgroundAlpha");
                    super.updateDisplayList(unscaledWidth, unscaledHeight);
    protected function resizeMe(e:MouseEvent): void
    Vert = int(FlexGlobals.topLevelApplication.contentGroup.height/2*-1)+35;
    Horz = int(FlexGlobals.topLevelApplication.contentGroup.width/2*-1)+110;
    if (hostComponent.height < 51)
    setheight.valueTo=500;
    setvertical.valueTo=0;
    sethorizontal.valueTo=0;
    else
    setheight.valueTo=50;
    setvertical.valueTo=Vert;
    sethorizontal.valueTo=Horz;
    sizer.play();
    protected function skin1_creationCompleteHandler(event:FlexEvent):void
    Vert = int(FlexGlobals.topLevelApplication.contentGroup.height/2*-1);
    Horz = int(FlexGlobals.topLevelApplication.contentGroup.width/2*-1);
            ]]>       
        </fx:Script>
        <s:states>
            <s:State name="normal" />
            <s:State name="disabled" />
        </s:states>
        <s:Rect left="0" right="0" top="0" bottom="0">
            <s:fill>
                <s:SolidColor id="bgFill" color="0x00DDDD"/>
            </s:fill>
        </s:Rect>
        <s:Group id="contentGroup" left="0" right="0" top="0" bottom="0" minWidth="0" minHeight="0" click="resizeMe(event)">
            <s:layout>
                <s:BasicLayout/>
            </s:layout>
        </s:Group>
    </s:Skin>

    This is a good question.
    There's no hard and fast rule to apply which says "this belongs in the skin" vs. "this belongs in the component".  Similarly, there are also no hard and fast rules around when to use a the new skinning architecture vs. just creating a custom component.  Just do whatever you feel comfortable with and makes your job easier.  At the end of the day, it's about productivity and not living up to ideals.  That said, there are probably some easier and more logical ways to do some things.
    On the skinning architecture vs. custom component debate, with a SkinnableComponent we have a clear separation of the component properties and behavior on one side and the look and feel of the component on the Skin side.  Also, there's a clear contract we use to talk back and forth to one another.  The reason for the separation between the Skin and the SkinnableComponent is so that we can have one Button SkinnableComponent and multiple Skins for that Button which all tweak the visual appearance of it.
    It doesn't make sense for every component to be skinnable.  If you know what your component is going to be and look like and don't need the extra flexibility skinning provides, then you can get rid of the extra overhead that skinning requires (like having 2 classes).  An example custom component is:
    <s:Group>
    <s:Rect>
    </s:Rect>
    <mx:Image src="..." />
    <s:Panel skinClass="myCustomSkinClass">
    </s:Panel>
    </s:Group>
    If you want more flexibility and want the ability to easily change the look and feel of the component (i.e. skin it), then you'd extend SkinnableComponent, fill out the skinning lifecycle methods, and create a default Skin for its appearance.
    Now, when you're building a SkinnableComponent, there's always a question of what to put in the component vs. what to put in the skin.  In general, we try to put the core properties and behaviors in the component and anything visual in the skin.  However, another guideline to consider is whether all skins would want this behavior.  If so, then it makes sense (and makes your life easier) to put it in the SkinnableComponent rather than the Skin.  We do this in the framework for components like VSlider, where the logic for positioning the y-axis of the thumb is in the component and not the skin, even though it's a "visual" thing.  We also have discussed how we would build up a ColorPicker component, and I think the way we would go about it is by putting a lot of the "visual" logic in the component because otherwise we'd have to duplicate it across all skins.
    Now, the other question you guys are asking here are "when do I bake effects (or any behavior) in to the component (either in the skin or in the SkinnableComponent AS class) vs. when do I declare effects alongside the component".  Again, I think the answer to that is whether you want all your components to have this behavior.  If that was the case, then I'd lose no sleep baking it in to the component.  However, if it's not the case, then I'd make the end-developer delcare it when they use your component, like:
    <s:MyCustomComponent id="myComponent" />
    <s:Resize id="resizer" widthTo="100" heightTo="50" target="{myComponent}"/>
    I would think most of the time, you probably wouldn't want to bake an effect like that in to the component, especially because it has some sizing information on it.  However, we have some effects baked in to some of the framework components, like when the thumb of a Slider moves around due to someone clicking on the track.  I think it's fine that it's baked in to the component, but I do think it should probably be stylable so that a user can customize it (that's on our list of lower-priority things to do btw).
    The framework has definitely evolved.  I think we started out with a more purist attitude and wanted a clear separation between the skin and the component.  However, as we built out components, we realized it's not always practical to do that.  Similarly, we wanted our skins to be pure MXML; however, for usability reasons, we decided that our skins should be styleable, and that requires a little bit of ActionScript code.  Border is a great example where it doesn't really follow a lot of these guidelines, but it's just a styleable component; however, this component makes other people's jobs easier.  At the end of the day, it's about productivity and usability, and hopefully the Spark architecture is a step in the right direction.
    Anyways, I hope that helps some.  These are just some guidelines.  As people play around with the architecture more, I'm sure some other people will have some good advice to share as well.
    -Ryan

  • Is that the normal behavior of ImageReader?

    When javax.imageio.ImageReader reads frames of an optimized animated gif (where only the changes in each frame are saved), it will only return a small portion of the image when it falls on an optimized frame. So let's say an animation has the size 50x50, ImageReader.read(...) will return BufferedImages of varying lengths due to the optimization. Is that the normal behavior, or should it build up the complete image back itself? If I should be responsible to reconstitute the image, then anyone knows how I should go about it?
    Thanks in advance for your input!
    Dalzhim

    Probably. The GIF will only basically have partial frames after the first, or where the entire frame changes. That would suggesst that the class can't really handle that type of GIF in a way that it would recreate each frame based on the previous one(s). I'm not sure that it's a bug, though. It could be intentional, as it just gives the images that are there, and nothing more or less, letting the user deal with them. I would imagine you could overlay them to get the right effect?

  • Tab focus behavior when searching selected text

    In the previous versions of Firefox, when I selected some text on a webpage, right-clicked the text to get the context menu, and clicked the "Search" option (e.g. Search Google for "my text selection") the currently focused tab would stay focused and a new tab would be launched to handle the appropriate search in the background. Ever since I updated to Firefox 13, the new tab now receives focus when I do a search on selected text.
    How can I switch back to the old behavior? This change in functionality is driving me crazy. When reading a webpage, I often like to select words and phrases about which I want to learn more and launch searches to Google and/or Wikipedia via the context menu. I almost always like to finish reading the current page before going off to read the new tabs. Even if I did intend to stop reading the current page and go to the new tab, it often takes many seconds for the new tab to load and I would rather keep reading the current page and switch to the new tab manually than stare at a blank tab while I wait for it to load.
    In the "Tabs" tab of the options window, there is a checkbox for "When I open a link in a new tab, switch to it immediately." Is there anything like this for new tabs launched by a context menu search?
    Thanks!

    hey bob, you can enter '''about:config''' into the location bar of firefox, confirm the info notification (in case it shows up), search for the preference named '''browser.search.context.loadInBackground''' & toggle it to true by double-clicking it. that should bring back the old behaviour...

Maybe you are looking for

  • Can I change the position of  change bars from left margin to right margin?

    I want to display the change bars in right page margin. If the page is odd page,The change bars position is in left page margin. If the page is even page,The change bars position is in right page margin.

  • Itunes installing issue

    I have read a few posts on this issue, but I have yet to find a resolution. I cannot get Itunes to install on my computer. I get this Error each time I try: Could not open key: HKEYLOCALMACHINE\Software\Classes\QuicktimePlayerLib.QuicktimePlayerApp\C

  • Plsql table initialize

    hi, plz help regarding initializing a plsql table declare type numlist is table of integer; nums numlist; c varcar2(20) := '10,20,30' begin nums := numlist(c); --i want to use the variable here but it's showing error end; i need a method for this. th

  • How can I login remotely (not screen sharing)

    Hi Is there a way I can login to my desktop (running 10.8.2) and work remotely - without screen sharing? I am talking about full desktop access, logged in remotely, without disturbing the session of another user who is logged in, and physically in fr

  • Best practices managing multiple iPhoto librarys

    I think that my challege in managing multiple iPhoto libraries is shared by a lot of amateur photographers.  My wife and I both have Apple MacBook Airs and we both take and upload photos.  About every three months I merge the two iPhoto libraries wit