@Override public void drawHighlight(Graphics g,int w,int h){
  g.setColor(Color.black);
  FontMetrics fm=g.getFontMetrics();
  int l=(int)(m_x * w) - fm.stringWidth(m_id) / 2;
  int t=(int)(m_y * h) - fm.getHeight() / 2;
  g.fillRect(l - 2,t - 2,fm.stringWidth(m_id) + 8,fm.getHeight() + fm.getDescent() + 8);
  drawNode(g,w,h);
}

@ Override public void drawHighlight ( Graphics g , int w , int h ) { g . setColor ( Color . black ) ; FontMetrics fm = g . getFontMetrics ( ) ; int l = ( int ) ( m_x * w ) - fm . stringWidth ( m_id ) / 2 ; int t = ( int ) ( m_y * h ) - fm . getHeight ( ) / 2 ; g . fillRect ( l - 2 , t - 2 , fm . stringWidth ( m_id ) + 8 , fm . getHeight ( ) + fm . getDescent ( ) + 8 ) ; drawNode ( g , w , h ) ; }
call this function to draw the node highlighted .
