3

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

enter image description here

what i want to achieve is

enter image description here

kindly help me how to do it

maq
  • 1,175
  • 3
  • 17
  • 34

1 Answers1

4

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

use this setting JTabbedPane for quite similair output with FireFox or Chrome on Win platforms

JTabbedPane tabbedPane = new JTabbedPane(
     JTabbedPane.TOP, 
     JTabbedPane.SCROLL_TAB_LAYOUT);
mKorbel
  • 109,525
  • 20
  • 134
  • 319
  • thank u so muchhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh i cant think it would be much simple :P but now how to customizr arrows? – maq Dec 09 '14 at 15:00
  • but now how to customizr arrows? == JTabbedPane is one of awfull JComponents in Swing, no direct access to navigations buttons, have to override BasicsTabbedPaneUI, – mKorbel Dec 09 '14 at 15:04
  • search for Java + Swing + Ribbon (Ribbbon is originally in MsOffice) – mKorbel Dec 09 '14 at 15:06
  • thank u @mkorbel any snippet you can provide how to override BasicsTabbedPaneUI?? – maq Dec 09 '14 at 16:50
  • 1
    [BasicsTabbedPaneUI??](http://stackoverflow.com/a/7056093/714968), but look for Ribbon as easy, possible, correct way – mKorbel Dec 09 '14 at 19:30
  • ohh thank you bt i did not find much on ribbon with JAVA – maq Dec 09 '14 at 19:58