I would suggest using the TabPanePro library. It provides special areas for adding any controls and, besides that, it solves all problems related to the tab menu button.