public void paint(Graphics g)
    {
	m_fm = g.getFontMetrics();
	
	g.setColor(getBackground());
	g.fillRect(0, 0, getWidth(), getHeight());
	getBorder().paintBorder(this, g, 0, 0, getWidth(), getHeight());

	g.setColor(getForeground());
	g.setFont(getFont());
	m_insets = getInsets();
	int x = m_insets.right;
	int y = m_insets.top + m_fm.getAscent();

	StringTokenizer	st = new StringTokenizer(getText(), "\t");
	while (st.hasMoreTokens()) 
	{		
	      String sNext = st.nextToken();
	      
	      //added by Sabee  
	      //this will align right from the second token
	      //if you take this section out every token will be aligned to left
	      //according to the tab settings
	      if(!allLeftAlligned)
	    	  if (x-m_fm.stringWidth(sNext)>0) x -= m_fm.stringWidth(sNext);
	      //by Sabee ends...
	      
	      g.drawString(sNext, x, y);	      
	      
		x += m_fm.stringWidth(sNext);
	
		
		if (!st.hasMoreTokens())
			break;
		int index = 0;
		while (x >= getTab(index))
	  	      index++;
		
		x = getTab(index);
	}
   }