• Post Reply Bookmark Topic Watch Topic
  • New Topic

Swing/JTabbedPane(veryvery urgent)  RSS feed

 
Sonara
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello sir,
In JTabbedPane i have 5 tabs each tab adds a new panel when pressed.But i have to set both image as well as String for each tab.But the title should be displayed above the image.
i get image placed after the String or viceversa.
so let me know what to do.
The tab being selected get one image& the unselected tab has different image.But the String remains same whether seleted or unselected.
pl.... tell me a solution as soon as possible.
with regards,
Sonara.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Sonara",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sonara,
It is not clear what your problem is!
If you are asking about the positioning of the icon relating to the tab title then you have two choices:
1. Live with icon and title in a single line. IMO, you can't get a handle on the internal tabs so you can't change the layout scheme. Tabs a supposed to be short (single line at most) because of their nature. Otherwise we would refer to them as ToolBars!
or
2. Create your own TabbedPane and you can have the tab layout work however you want.
Regards,
Manfred.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!