title: Is there a method to move the caret of JTextArea upward vertically?
body: <p>To move the caret of a JTextArea downward vertically without pressing the DOWN key, is it possible to do that programmatically? </p>
  
  <p>In fact I want to write it in a KeyListener, but if I write like this:</p>
  
  <pre><code>if((e.getKeyCode() == KeyEvent.VK_I) &amp;&amp; ((e.getModifiers() &amp; Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0)) {
              try {
                  new Robot().keyPress(KeyEvent.VK_UP);
              } catch (AWTException e) {
                  e.printStackTrace();
              }
  }
  </code></pre>
  
  <p>the UP key will be combined with the mac command key, and it becomes a page up action. So how can I deal with it?</p>
  
  <p>Thanks for reading my question.</p>