• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTabbedPane: Tab Text, Tab Width and Tab Height

 
Richard Teston
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whenever i put text on JTabbedPane tab it displays it in one line, so when i have a text e.g. "XXXXXXXXX XXXXXXXXX"
it displays it as it is not like XXXXXXXXX XXXXXXXXX
How can I display it in two line or more?
Does Tab width and height automatically adjust itself relative to the text inside it? If not how can I set the tab width and height?
Thanks in advance.
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could try to use html to display the tab text. If the tabs use JLabels internally this will work with 1.3 or later.
For answers on what you can do to adjust height and width: take a look at the source code of JTabbedPane and its ui class (and related classes).
Chantal
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!