Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can tabs in JTabbedPane be oriented vertically?  RSS feed

 
Matt Senecal
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I notice that when you place the tabs on a JTabbedPane on the side of the pane (setTabPlacement(SwingConstants.RIGHT), for example) that the text in the tabs is still horizontal, and the tabs stick out to the side. Is there any way to make the text vertical, so that the tabs are also oriented this way (and don't stick out)?
 
Michael Hildner
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was just wondering about this last night. Haven't tried it yet, but found this on jguru.
[This message has been edited by Michael Hildner (edited April 27, 2001).]
 
Matt Senecal
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried it out. The text (and tabs) are indeed vertical, but the spacing between the letters is excessive, and theres a big gap of empty space between the top of tab and the first letter.
Originally posted by Michael Hildner:
I was just wondering about this last night. Haven't tried it yet, but found this on jguru.
[This message has been edited by Michael Hildner (edited April 27, 2001).]


[This message has been edited by Matt Senecal (edited April 27, 2001).]
 
Michael Hildner
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dang it. I want to do this also. I wonder if there's another way?
 
Michael Hildner
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although it's kinda cheezy, you can kinda fake it by using an image that is composed of vertical text. I'd like to find a better way though.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!