@Override protected void paintComponent(final Graphics g){
  super.paintComponent(g);
  if (hasFocus()) {
    g.setColor(JBColor.black);
    DarculaUIUtil.paintFocusRing(g,0,0,getWidth(),getHeight());
  }
}

@ Override protected void paintComponent ( final Graphics g ) { super . paintComponent ( g ) ; if ( hasFocus ( ) ) { g . setColor ( JBColor . black ) ; DarculaUIUtil . paintFocusRing ( g , 0 , 0 , getWidth ( ) , getHeight ( ) ) ; } }
we are overriding this method to paint a focus rectangle around the control .
