File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using SetTabComponent for Tabs in TabbedPane

 
Santhosh Raj
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All Swing developers, Referring to the below line, if I set a Jbutton as the tabComponent using



The button covers a part of the tab while I can still see background of the tab. But my requirement is to set this Button component on the tab completely as if the button should cover the whole tab as if there should be no access to that tab.

Please help me with this as I could not find any solution till now.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
might be possible, but would involve digging into the TabbedPaneUI, then it starts getting messy.

might be easier to use a CardLayout for the panels you have in the tabbedPane (which is similar to a tabbedPane without tabs),
then setting up a single row of buttons to sit on the top of the CardLayoutPanel, so it might look like a tabbedPane.
each button would 'CardLayout.show()' it's respective panel
 
Santhosh Raj
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Michael,
I really appreciate your idea and it might work fine.
But my requirement is to use only TabbedPane as I am skinning it using Synth PLAF.
So I need the functionality should be done only using TabbedPane.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic