title: JTextField Issues with Numpad
body: <p>I've recently run into a strange issue with the Java JTextField.  When I run the following code (see below), typing a "0" into the text field first sends a paste action, then types "0".  For example, if "text" is copied to the clipboard, "text0" is typed when I type "0".  Similarly, typing a "4" replaces the previous character with a "4" (I'm guessing this is a delete action, then the "4" is typed).  Typing "7" clears the text field before typing "7".</p>
  
  <p>Here is the code:</p>
  
  <pre><code>import javax.swing.JFrame;
  import javax.swing.JTextField;
  
  public class Main {
  
  public static void main(String[] args) {
      JFrame frame = new JFrame();
      JTextField text = new JTextField();
      frame.add(text);
      frame.setSize(500, 500);
      frame.setVisible(true);
  }
  
  }
  </code></pre>
  
  <p>The problem is occurring on Red Hat Linux (accessed using VNC from Windows XP); everything runs as expected on Window XP.</p>
  
  <p><strong>Update</strong>: No problems with the program on Ubuntu either.  I've also tried using different keyboards and VNC viewers.</p>
  
  <p><strong>Update 2</strong>: Java Versions</p>
  
  <p>For Red Hat:</p>
  
  <pre><code>    java version "1.6.0_17"
      OpenJDK Runtime Environment (IcedTea6 1.7.7) (rhel-1.17.b17.el5-x86_64)
      OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)
  </code></pre>
  
  <p>For XP: </p>
  
  <pre><code>    java version "1.7.0_05"
      Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
      Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode, sharing)
  </code></pre>
  
  <p><strong>Update 3</strong>: Tried running the program on three different Red Hat machines (all in the same group at work), and additionally tried running it from a different XP computer and restarting.</p>
  
  <p><strong>Update 4</strong>: Today I arrived at work to find that the problem had magically gone away.  However, it'd really be nice to know <em>why</em> it happened in the first place so that I (and anyone else who many encounter this strange issue) know how to fix it in the future.</p>