JTextComponent host = (JTextComponent)getContainer(); float tabSizePixels = getTabSize() * host.getFontMetrics(host.getFont()).charWidth('m'); return (float) (Math.floor(x / tabSizePixels) + 1) * tabSizePixels;
int next = (int) x; if (tabSize != 0) { int numTabs = ((int) x - tabBase) / tabSize; next = tabBase + (numTabs + 1) * tabSize; } return next;
  public float nextTabStop(float x, int tabStop)  {    JTextComponent host = (JTextComponent)getContainer();    float tabSizePixels = getTabSize()                          * host.getFontMetrics(host.getFont()).charWidth('m');    return (float) (Math.floor(x / tabSizePixels) + 1) * tabSizePixels;  }