I've adopted another approach by separating the panel code and populating it dynamically. I'm setting its position based on which line number is hover.