Derivatives of Focus 50mm 1.8

I love dabbling with astrophotography from time to time, and I would try my 50mm lens. But if I try to manual focus on something to infinity and then take a timelapse of the stars, I only usually get 5 or 6 pictures until my lens focus drifted infinite completely spent. Is this just a problem with this lens, or something is loose on mine?  I know that others who have used it to do this, so maybe I use it just wrong? Thank you.

This sounds like something is mechanically loose inside the lens (gambling) and vibrations are enough to pass.

When we focus catadioptric telescopes, the large primary mirror at the back of the telescope has done to move forward or backward along a deflector tube to focus the scope.  Since the large mirror can move, he can also "shift".  So this is a common problem of 'focus' and then start to use the framework to find that the mirror is installed and now is out of focus again.

The technique to combat this is to deliberately take the fuzzy instrument, which brings the mirror too far "backward" and then reverse the development and push it forward so that it is evenly supported by below (so we always focus in the same direction.)  This means that the mirror is basically established and shouldn't move on us after achieve us focus.

You can try the same technique with your 50mm lens.  Update the goal all way since infinitity until it hit the hard stop (which pulls back the elements of development) then go back and adjust very slowly until it comes back to focus (it pushes the lens before... but if the camera is pointed upwards it should remain "standing" and I hope that used to pass after a few clicks).

Have a sloppy focus is not a good thing and normally I would say it needs to be repaired, but the lens is very good cheap and the cost of the service would almost certainly exceed the value of the lens (in other words, it's probably cheaper to buy just a new lens.)

Tags: Canon Camera

Similar Questions

  • Class derived from LabelField with custom font color, but when focus not only

    Hello

    I have some problems with the LabelField-derived class. I want it has customized color background and police, but only when it does not have focus.

    I tried to do the following:

    protected void paint(Graphics g) {
        if (isFocus()) {
            super.paint(g);
        }
        else {
            final int bgColor = g.getBackgroundColor();
            final int fgColor = g.getColor();
    
            g.setBackgroundColor(backgroundColor);  // from member
            g.setColor(fontColor);  // from member
    
            super.paint(g);
    
            g.setColor(fgColor);
            g.setBackgroundColor(bgColor);
        }
    }
    

    but the final effect is that this field has the custom until the first focus/unfocus font color. When I do not check the isFocus(), police have custom color when the field has focus too.

    Similar do in drawFocus (Graphics g, boolean on) does not solve the problem either.

    I target BB > = 4.6.0.

    Do you know how to do properly without calls drawText custom?

    Kind regards

    Piotr

    What happens if you replace

    If (isFocus())

    with

    If (g.isDrawingStyleSet (Graphics.DRAWSTYLE_FOCUS))

    and (maybe - I'm totally guessing here) substitute drawFocus doing nothing?

    BlackBerry GUI has many peculiarities, so you never know what path is right.

    A word of caution: most likely, you will have also to invalidate() field when it changes its "focused" State Don't do this in onFocus() / onUnfocus()! Those (especially the onUnfocus()) are not always correctly called (BB frame problem). Make your field implement FocusChangeListener and make these invalidations in the method focusChanged() (using setFocusListener (this) somewhere in the constructor).

  • 50mm 1.4 focus ring does not work and when shuter button halfway red poins focal do not work.

    is there something I can do to resolve or to take to a repair shop?

    The 50mm f/1.4 is known for failures of system development. Repair or replace is the only solution.

    Google 'cost to fix the Canon 50mm f/1.4 development system'

    I'm assuming you checked the switch on the lens is correctly positioned in the AF position.

  • Lens barrel will not focus?

    Hi all

    I have an a6000 and recently bought a Canon EF 50mm f1.8 STM lens and an adapter Fotasy EOS - NEX.

    Everything fits together ok, but the ring on the lens will not work (it's brand new)

    is there some settings I need to adjust to get this working correctly?

    (already provided without active goal still does not seem to work)

    Any help would be greatly appreciated!

    The focus ring rotates when the lens is NOT attached to the adapter?

    ... when it is attached to the map is NOT attached to the camera?

  • Size 50mm Macro life adapter/converter

    I own the lens macro 50mm f: 2.5.  This objective will focus to 1/2 size but for life-size Canon indicates that I need to buy their single adapter that cost an arm and a leg.  What is the advantage of using the adapter/converter Canon instead of use the simple extension tube?

    Thank you.

    Richard D.

    It is true that you can change the distance of focus of the lens EF 50 mm f/2.5 Compact Macro by simply adding an extension to her tube.  To reach anywhere near life size magnification (1 x), you need the extension EF 25 II.

    The downside is that you do not quite hit the objective of magnification of size of life with an extension tube and you add an extra 25mm in focal length, which changes the working distance.  The Salvation Converter allows you to reach 1 x magnification size life while keeping the working distance and a shorter focal length, which is great for the work of copy stand or photograph the great work.

  • The rebels x3i (600 d) auto focus not working not not in Zone creation mode. Works very well in the basic modes.

    I bought a refurbished Canon Canon x3i after my extended warranty Ritz camera became useless and my xTi (400 d) died last summer. The camera has been excellent until very recently.

    About a week or two ago the autofocus stopped working. I think it all started when I decided to try the objective of refurbished Canon 50mm 1.8 that I bought on the internet. He has not worked for that lens, and has not worked in the design area since.

    There is an asterisk (*) in the lower left corner of the viewfinder. It is an indicator of progress of AE. There is no active focus. Sometimes, the nine of them will be light, but it doesn't mean anything.

    Based on responses from other posts on the forum, I tried different objectives EOS (I have two rebel film cameras) and I tried the LiveView. The same problem. I can live with the situation, but, obviously, I'd rather not.

    Naturally, the manual focus works fine.

    The pins on the camera look and feel fine - no elbows or broken bits. The pins look good, too, even the 50mm lenses.

    (I have not contacted Canon, yet, because the after-sales guarantees are usually 30 to 90 days, but I will contact them tomorrow)

    I don't think that you have found the free camera.  You MUST clear all settings.  Looks like you have memorization of commissioning.

  • Focus on the t3i problem

    My t3i is having focusing problems. What may be the cause?  Can I have very well to the development as on fullframe cameras?

    Kolourl3lind wrote:

    OK I'll do it, but I just realized maybe it's because I'm zoom after focus and recompose?

    Yep - most of the lenses are "varifocale" - which means that if you focus carefully on a subject at a few focal length in the range of zoom... then zoom to a new lens, then your topic will be specifically developed in the.  You must refocus the goal.

    There are a few lenses that are "parfocal" - means that if you zoom the lens after update, your subject will always be precisely focused.  However... VERY FEW lenses is technically "parfocal" (even if some are close).

    The lenses I know who are "parfocal" are:

    • EF 16-135mm f/2.8 L USM
    • EF 17-40mm f / 4L USM
    • EF 70-200mm f/2.8 L USM (only the non)

    That's all.  If you use any other goal, he must refocus the goal after a zoom.

    But I also noticed that you were aiming at 1/15 sec.  It's a little slow, but you were at 18mm (which helps).  Here is the guideline on this.

    In the days of 35mm, there was to be a general rule that if the shutter speed is equal to, or faster than 1/focal length (e.g.. If the shot at 50 mm from you would be at least 1/50th sec at 70 mm you would be at least 1/70th or more fast, etc) would be appropriate.  This number does not apply to your T3i, but I'll be back in a moment.

    But there are some caveats with this...

    First, it assumes that you use actually very good camera-technical operation and you really WANT to be stable.  Good camera-technical operation means that you support the camera down - usually your left is the palm-up supporting the bottom of the camera and lens and your elbow is in verse your chest/belly.    Your weight is centered between your legs and you have a wide position.  This means that you are not leaning so your muscles must work hard to stand and your weapons as a brace to support the camera to your body and, of course, your body is well balanced and stable.

    Secondly, it is just a 'guide' - not a rule.  Some people are apparently able to be more stable than others (and if caffiene makes nervous and you just drank a coffee... and all that sort of thing.)  And it takes some practice to learn the proper technique.

    Thirdly, it is also not the same for the cameras (like your T3i) APS - C sized sensor.  To make the camera, you would have to the multiple minimum speed by the crop factor of the camera.  For a Canon APS - C camera is 1.6 (but if you wanted to use 1.5 which would be close enough.)  That means 50 mm instead of using 1/50th you would actually use 1/75th (technically 1/80th if we use the factor 1.6).  for example 50 x 1.6 = 80 so for 50mm, we would use 1/80th.

    If you have a goal that includes image stabilization, so you can be able to pull a little slower.

    Image stabilization in most claims to improve the stability of the lens of 2 to 4 "stop".  Does that mean that you can reduce the shutter speed... two to four times slower that you would normally need the lens because stabilizes for you.   But more caveats apply because it is not as simple as 'get you 4 stops.  The stabilization is not a guarantee... that's just a liklihood.  If it were to be less ambitious to stabilize your shot he will be much more likely to succeed.  If she must be more ambitious to stabilize your shot, then he'll do it is better... but there is no guarantee that it will work.

    You were aiming at 18mm.  So, if you use technical excellent posture and camera-operation but don't have image stabilization and that you are the one "average" trying to hold the camera steady, then we multiply 18 x 1.6 and go down to 28.8.  There is no shuter speed 1 / 28.8th so we turn to 1/30th (because there is a 1/30th.

    1 stop slower than 1/30 is 1/15th, and image stabilization is probably enough to make you slower 1 stop successfully.

    2 times slower is 1/8th.  Image stabilization that claims "4 stops" will be generally well 2 stops.  So it is less than a sure thing, but he tilt the odds in your favor.

    3 times slower is 1/4 sec.  At this point, you are pushing the image stabilization system... you will notice that if you shoot a lot of frames, the rate of "keeper" (tips, you like) will be lower, but you will see that you have found some.

    4 times slower is 1/2 sec (based on the basis of 1/30th for a focal length of 18mm on an APS - C size sensor device).  If you press any stabilized lens image 4 stops, don't expect to get a very high rate of keeper.  It will help you sometimes, but you have to accept you are really be ambitious in your expectations.

    This is image stabilization by the numbers... take the focal distance, multiply it by your crop factor (which is always in 1.6, but if you want to use 1.5 because it is somewhat easy to do this calculation in our head that's close enough), round up to the nearest available shutter speed.  If you have image stabilization that you can speed up the shutter speed of 1, 2, 3 or 4 times faster... but every time you get more ambitious your chances of obtaining 'gatekeepers' go down (but it is better than without image stabilization at all.)

    The summary is that your minimum shutter speed (assuming good holding technique and you're stable, etc etc) with stabilizing image out of the 1/30th would be your minimum speed.  At 1/15 sec am that you relied on 1-stop image stabilization help.  The lens image stabilization technology is good enough so that 'most of the time' it will probably be able to do (not guaranteed... only likely.)  If you were NOT using a good posture and technical outfit... you can be difficult to your image stabilization system to try to keep up.

  • Impossible to focus a large font size

    Hello

    I can't focus a large font size of a LabelField as a VerticalFieldManager.  If I don't get the font size, it will be centered.  However, more police, more aligned to the left on the screen size, I will become.  Does anyone know how can I fix?  Here is my code:

    Font pointsFont = Font.getDefault().derive(Font.BOLD, 72, Ui.UNITS_pt);
    
            VerticalFieldManager vfm = new VerticalFieldManager(
                    VerticalFieldManager.FIELD_HCENTER);
    
            lblPoints = new LabelField("100", LabelField.FIELD_HCENTER);
            lblPoints.setFont(pointsFont);
    
            LabelField lblPointsLabel = new LabelField("Points",
                    LabelField.FIELD_HCENTER);
    
            vfm.add(lblPoints);
            vfm.add(lblPointsLabel);
    
                    add(vfm);
    

    Thank you!

    try to use the style DrawStyle.HCENTER,

    lblPoints = new LabelField("100", LabelField.FIELD_HCENTER | DrawStyle.HCENTER);
    
  • ListField focus problem.

    Hi people,

    I have a problem with listfield focus. in the 8900 v4.6.1, the last update does not disappear when I select a new line.

    Do the invalidate in line works, but navigation has become with the slow performance.

    Code:

    package mypackage;
    
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Hashtable;
    import java.util.Vector;
    
    import javax.microedition.lcdui.Font;
    
    import net.rim.device.api.system.Bitmap;
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.BitmapField;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.component.ListField;
    import net.rim.device.api.ui.component.ListFieldCallback;
    import net.rim.device.api.ui.decor.BackgroundFactory;
    
    public final class HelpScreen extends CustomMainScreen {
        protected boolean onSavePrompt() {
            try {
                save();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                System.err.println("Excecao HelpScreen 1 " + e.getClass() + " - " + e.getMessage());
                e.printStackTrace();
            }
            return true;
        }
    
        private Vector content = null;
        private ListHelpScreen callback;
    
        public HelpScreen() {
    
            // System.out.println("HelpScreen");
    
            setBanner(new BitmapField(Bitmap.getBitmapResource(ScreenManager.getStringProperty("helpscreen.banner"))));
            setBackground(BackgroundFactory.createSolidBackground(0x434343));
            content = getVector();
    
            ListField list = initCallbackListening();
    
            list.setSize(content.size());
            // list.setRowHeight(62);
            int rowheight = ScreenManager.getPositionAtKey("helpscreen.listfield.rowheight");
    
            list.setRowHeight(rowheight);
            add(list);
            LabelField copyright = new LabelField("Cielo Mobile " + ServerRequests.version + "\n" + "© Todos os direitos reservados",
                    Field.USE_ALL_WIDTH) {
                protected void paint(Graphics graphics) {
                    graphics.setColor(Color.WHITE);
                    super.paint(graphics);
                }
    
            };
            copyright.setBackground(BackgroundFactory.createSolidBackground(0x434343));
            copyright.setPadding(ScreenManager.getPositionAtKey("helpscreen.copyright.padding.top"),
                    ScreenManager.getPositionAtKey("helpscreen.copyright.padding.right"),
                    ScreenManager.getPositionAtKey("helpscreen.copyright.padding.bottom"),
                    ScreenManager.getPositionAtKey("helpscreen.copyright.padding.left"));
            copyright.setPosition(ScreenManager.getPositionAtKey("helpscreen.copyright.position"));
    
            copyright.setFont(getFont().derive(Font.STYLE_PLAIN, 14));
    
            add(copyright);
    
        }
    
        private Vector getVector() {
            Vector menuItems = new Vector();
            Hashtable currentElement = new Hashtable();
            Class classs = null;
            try {
                classs = Class.forName(this.getClass().getName());
            } catch (ClassNotFoundException e) {
                // TODO Auto-generated catch block
                System.err.println("Excecao HelpScreen 2 " + e.getClass() + " - " + e.getMessage());
                e.printStackTrace();
            }
            InputStream stream = classs.getResourceAsStream("/fraseologia.properties");
            PropertiesUtil properties = new PropertiesUtil();
            try {
                properties.load(stream);
            } catch (IOException e) {
                // TODO Auto-generated catch block
                System.err.println("Excecao HelpScreen 3 " + e.getClass() + " - " + e.getMessage());
                e.printStackTrace();
            }
            currentElement.put("title", "1 " + ((String) properties.getProperties().get("pergunta1")).toUpperCase());
            menuItems.addElement(currentElement);
    
            currentElement = new Hashtable();
            currentElement.put("title", "2 " + ((String) properties.getProperties().get("pergunta2")).toUpperCase());
            menuItems.addElement(currentElement);
    
            currentElement = new Hashtable();
            currentElement.put("title", "3 " + ((String) properties.getProperties().get("pergunta3")).toUpperCase());
            menuItems.addElement(currentElement);
    
            currentElement = new Hashtable();
            currentElement.put("title", "4 " + ((String) properties.getProperties().get("pergunta4")).toUpperCase());
            menuItems.addElement(currentElement);
    
            currentElement = new Hashtable();
            currentElement.put("title", "5 " + ((String) properties.getProperties().get("pergunta5")).toUpperCase());
            menuItems.addElement(currentElement);
    
            currentElement = new Hashtable();
            currentElement.put("title", "6 " + ((String) properties.getProperties().get("pergunta6")).toUpperCase());
            menuItems.addElement(currentElement);
    
            currentElement = new Hashtable();
            currentElement.put("title", "7 " + ((String) properties.getProperties().get("pergunta7")).toUpperCase());
            menuItems.addElement(currentElement);
    
            currentElement = new Hashtable();
            currentElement.put("title", "8 " + ((String) properties.getProperties().get("pergunta8")).toUpperCase());
            menuItems.addElement(currentElement);
            //
            // currentElement = new Hashtable();
            // currentElement.put("title", "Cielo Mobile " + ServerRequests.version);
            // currentElement.put("text", "© Todos os direitos reservados");
            // menuItems.addElement(currentElement);
    
            return menuItems;
        }
    
        private ListField initCallbackListening() {
            callback = new ListHelpScreen();
            ListField listField = new ListField() {
    
                protected boolean navigationClick(int status, int time) {
                    // TODO melhorar essa logica
                    if (this.getSelectedIndex() < 8) {
                        UiApplication.getUiApplication().pushScreen(new AnswersScreen(this.getSelectedIndex()));
                    }
    
                    return true;
                }
            };
            listField.setCallback(callback);
            listField.setFont(this.getFont().derive(Font.STYLE_PLAIN, 16));
    
            // listField.setRowHeight(-3);
            return listField;
        }
    
        private class ListHelpScreen implements ListFieldCallback {
            private int lastIndex = 0;
    
            public void drawListRow(ListField listField, Graphics graphics, int index, int y, int width) {
    
                Hashtable currentCellInformations = ((Hashtable) content.elementAt(index));
    
                Bitmap image = null;
                if (index == listField.getSelectedIndex()) {
                    image = Bitmap.getBitmapResource(ScreenManager.getStringProperty("helpscreen.listfieldcallback.image.hint"));
                } else {
                    image = Bitmap.getBitmapResource(ScreenManager.getStringProperty("helpscreen.listfieldcallback.image"));
                }
    
                graphics.drawBitmap(0, y, image.getWidth(), image.getHeight(), image, 0, 0);
    
                String text = (String) currentCellInformations.get("title");
                graphics.setColor(Color.WHITE);
                graphics.drawText(text, ScreenManager.getPositionAtKey("helpscreen.listfieldcallback.inicialoffset.x"),
                        ScreenManager.getPositionAtKey("helpscreen.listfieldcallback.inicialoffset.y") + y);
                 listField.invalidate(lastIndex);
                lastIndex = index;
            }
    
            public Object get(ListField listField, int index) {
                return content.elementAt(index);
            }
    
            public int getPreferredWidth(ListField listField) {
                return ScreenManager.getPositionAtKey("helpscreen.listfieldcallback.preferredwidth");
            }
    
            public int indexOfList(ListField listField, String prefix, int start) {
                return content.indexOf(prefix, start);
            }
        }
    }
    

    Could you help me please with other alternatives?

    Thanks in advance.

    It was the solution for me

    ListField listField = new ListField() {
                private int lastIndex = 0;
    
                public int moveFocus(int amount, int status, int time) {
                    lastIndex = getSelectedIndex();
                    invalidate(lastIndex);
                    return super.moveFocus(amount, status, time);
                }
    

    Thank you!!!

  • Highlight and annotation of Focus/Center view

    In an attempt to reproduce the features that existed in Adobe 9, I'm doing of the buttons which will go to the next/previous annotation regarding the selected annotation. I have all the labour code to view precisely the location of annotation and centering on this comment.

    Workspace: Adobe Acrobat Professional of XI running Windows 7 64 bit. Open Adobe Acrobat MultiPage file, with annotations (comments) dispersed. An annotation is selected/focus in the user interface.

    Problem: My issue seems to be with the doc.scroll () method. I can access the page where the life of the previous annotation, but before calling. scroll() on coordinates turned derived from the annotation.rect user space don't Center the view as NO says description of method in the documentation. This method is somewhat dependent on the schema level or doc zoom I don't know? Code in question is below:

        // nextComment is the annotation object I want to center on
        myDoc.pageNum = nextComment.page
    
        // Convert from Default User Space to Rotated User Spaec
        var m = (new Matrix2D).fromRotated(myDoc,0);
        m = m.invert();
        var nextCommentRect = m.transform(nextComment.rect);
    
        // Scroll the center of the view to the comment's top left corner
        myDoc.scroll(nextCommentRect[2], nextCommentRect[1]);
    
        // Open the comment popup
        nextComment.setProps({popupOpen: true});
    
    

    When you run this code on a test of PDF, the document's scroll but never to the right place. What's not here? Is there a better way to implement this feature as my attempt here?

    I appreciate any help you can provide.

    2. sorry, I meant the fourth point. This will cause the annotation is visible on the page. If you want, add a fixed margin, so it looks better.

  • Editor-in-Chief of cell customized JTable loss of focus

    It is a follow-up of Re: tutorial on the AWT/Swing control flow in which I ask for pointers to help me understand the source of behavior lost focus in the custom my JTable cell editor.

    I've done some research more and it turns out that loss of focus is a more general problem with the custom cell editors who call other windows. Even the demo of the pipette 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 both to the setting in FRONT of the table. Only in the demo table loses focus when the color picker appears, it is because the table is the only thing in the window!

    Here's the code for demo, increased with two text fields, which are certainly bad 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 to choose a color, tf1 is given to the development, instead of the table. This is because bringing the color selector window to front raises an event lost the focus to the cell editor component; It's temporary, as it should, then, why the hell is the system to lose track of who has the focus in the window?

    I see the following in #getMostRecentFocusOwner () Window:
      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 course development policy, so I am able to see who is called, and indeed, getInitialComponent() is called. Clearly, the KeyboardFocusManager is in fact to lose track of the fact that the table was concentrated to the point where the control was transferred to the color picker! I think that is quite unreasonable, especially since, as mentioned, it is a temporary , not a permanent LostFocus event.

    I would be grateful for any wisdom to solve this, since a behavior similar to this little demo - without loss of focus, of course - is an essential part of my application.

    Hello
    Or simpler, setFocusable (false)

     public ColorEditor() {
       button = new JButton();
       button.setActionCommand(EDIT);
       button.addActionListener(this);
       button.setBorderPainted(false);
       button.setFocusable(false); //<---- add
     
    
  • iPhone 7 - camera can not focus/blur distant objects

    Recently got my iPhone 7 two weeks ago, when he was released. My camera was working fine but for the last two days, when I try to focus on a person/object far away, it remains unclear. It is not just sharpen or focus on the person/object. It's only focus on something that is very close to the camera. You're not sure if it is a new problem...? Someone knows how to fix this? Thank you.

    Hey jdcn204,

    Thank you for using communities Support from Apple. I can see from your post that you are having problems with your iPhone 7 camera being fuzzy or blurry when you try to take pictures. I understand how it is important for the camera to work as expected and want to do all that we can to remedy to this. I have included a link below which has a section focused on the ways to solve this class under your photos are blurry or out of focus:

    Get help with the camera on your iPhone, iPad or iPod touch

    Let us know if that helps.

    See you soon.

  • iOS 10 Photo Focus Glitch

    Hey.

    For several months now with no problems at 6s. A few days ago, I updated to iOS 10. Today, I used camera first time after the update and discovered that, after that I started the default camera app, developed hanged. I mean that the application itself is very good. Can I change the mode. Once I'm on the video, it's still okay. I restart, put the phone on the table and a few hours after app restart: same thing, the update crashes. As if the camera hangs on start trying to concentrate in the blurred image. If I move the camera, photo exchange a little, but still, not not focusing. And the strange thing is that when I go to the front camera, it hangs along the main camera as well. After passing mode, it's still okay.

    The main issue which is a bug in the iOS 10? I can't believe out of material can appear like that out of the blue and only affect the two devices in a mode...

    See the instructions in this link, under the heading "your photos are blurry or fuzzy":

    Please come back and we all know if this was helpful.  Good luck!

  • focus camera iPhone problem SE

    Since the update to the latest version of the software, the camera on my iPhone WILL focus not about 40% of photos.

    Tapping no screen no help...

    Ideas please?

    Hello

    Follow the steps here, including contact with Apple Support if necessary:

    Get help with the camera on your iPhone, iPad or iPod touch - Apple Support

  • for debugger, shortcut moves keyboard focus to the component source from research

    I'm in the debugger and use the search function to find a definition of the function by pressing ctrl + d. I select the function definition.
    It works great so far, but the focus of the cursor is always in the search window. In general, I now want to set the focus on the source pane (so I can scroll, set breakpoints, etc.). However, I can't find a shortcut to the source window. Y at - it a shortcut or other quick way without using the mouse?

    Thank you
    Ben

    I couldn't find a shortcut or the other, then maybe suggest to add such a feature.

    Firefox Developer Tools ideas - ideas for the development of Firefox tools:

Maybe you are looking for