Java JTextComponent scrollToTop(JTextComponent edit1)

Here you can find the source of scrollToTop(JTextComponent edit1)

Description

scroll To Top

License

Open Source License

Declaration

public static void scrollToTop(JTextComponent edit1) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.text.JTextComponent;

public class Main {
    public static void scrollToTop(JTextComponent edit1) {
        edit1.setCaretPosition(0);/*from  w  ww.  j a  va2s  . c  o m*/
    }
}

Related

  1. registerUpperCase(final JTextComponent textComp)
  2. removeAllHighlightsUsingPainter(final JTextComponent textComponent, final Highlighter.HighlightPainter painter)
  3. removeDocumentListeners(JTextComponent component)
  4. safeGetText(JTextComponent textComponent)
  5. scrollToText(JTextComponent textComponent, int startingIndex, int endingIndex)
  6. setError(JTextComponent component, boolean error)
  7. setErrorBackground(JTextComponent comp)
  8. setMandatoryBackground(JTextComponent comp)
  9. setMandatoryBorder(JTextComponent comp)