Im writing a simple code editor in JAVA and iam using Widows (System) look and feel as in every code editor you can open multiple files in tabs but problem is if there big number of tabs they will arrange in multiple rows and i want to keep them in one row as Firefox do here is what happening with my editor

what i want to achieve is

kindly help me how to do it