Code example for JTextComponent

Methods: getCaretPosition

0
        } 
    } 
 
    @Override 
    protected List getCompletionsImpl(JTextComponent comp) {
        return getCompletionsAtIndex(comp, comp.getCaretPosition());
    } 
 
    @Override 
    public String getAlreadyEnteredText(JTextComponent jTextComponent) {
        return ""; 
    } 
 
 
    public List<Completion> getCompletionsAtIndex(JTextComponent jTextComponent, int charIndex) {
        long now = System.currentTimeMillis();
        if(lastUpdate + UPDATE_INTERVAL < now) {
            try { 
                updateParser(dataSource);
            } catch (Exception ex) {