swingx
  1. swingx
  2. SWINGX-1408

JXDatePicker preventing ENTER from passing through

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.6.2
    • Fix Version/s: None
    • Component/s: Calendar
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: PC

    • Issuezilla Id:
      68

      Description

      The following frame has a JXDatePicker and a DefaultButton. If the JXDatePicker has
      the focus, then ENTER keystrokes are blocked and cannot reach the default button.

      [code]
      import java.awt.FlowLayout;
      import java.awt.event.ActionEvent;
      import javax.swing.AbstractAction;
      import javax.swing.JButton;
      import javax.swing.JTextField;
      import javax.swing.JFrame;
      import javax.swing.UIManager;
      import org.jdesktop.swingx.JXDatePicker;

      public class FocusTest extends JFrame{
      public FocusTest(){
      getContentPane().setLayout(new FlowLayout());
      getContentPane().add(new JTextField("-------------"));
      getContentPane().add(new JXDatePicker());
      JButton button=new JButton(new AbstractAction("Default Button") {
      public void actionPerformed(ActionEvent e)

      { System.out.println(e); }

      });
      getContentPane().add(button);
      getRootPane().setDefaultButton(button);
      pack();
      }
      public static void main(String args[]) {
      try

      { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); }

      catch (Exception e)

      { e.printStackTrace(); }

      java.awt.EventQueue.invokeLater(new Runnable() {
      public void run()

      { new FocusTest().setVisible(true); }

      });
      }
      }
      [/code]

      I could only try the code on a XP machine, don't know about other OSes...

        Activity

        jaqq created issue -
        kenaiadmin made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 68 95878
        Karl Schaefer made changes -
        Project swinglabs [ 11754 ] swingx [ 11222 ]
        Key SWINGLABS-68 SWINGX-1408
        Affects Version/s 1.6.2 [ 13362 ]
        Affects Version/s current [ 14400 ]
        Fix Version/s 1.x [ 13366 ]
        Fix Version/s milestone 1 [ 14401 ]
        Component/s Calendar [ 12469 ]
        Component/s www [ 13456 ]
        Karl Schaefer made changes -
        Assignee rbair [ rbair ] kleopatra [ kleopatra ]
        kleopatra made changes -
        Original Estimate 0 minutes [ 0 ]
        Remaining Estimate 0 minutes [ 0 ]
        Fix Version/s 1.6.3 [ 13366 ]

          People

          • Assignee:
            kleopatra
            Reporter:
            jaqq
          • Votes:
            2 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: