Visible / hide the tabs in JTabbed pane

Hello,
I've a frame with a tree on the left and a TabbedPane a on the right. I've 3 tab in my TabbedPane. I would like to change the visible tab when i clic on a node in the tree. My code is
public void valueChanged(TreeSelectionEvent event)
TreePath path = tree.getSelectionPath();
if (path == null) return;
DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)path.getLastPathComponent();
NodeInfo nInfo = (NodeInfo)selectedNode.getUserObject();
if (nInfo.getType().equals("company"))
tabbedPane.getComponentAt(1).setVisible(true);
but it doesn't work :/
I required soulation for visibling /Hiding Tabs on click or selection of any node from tree structure.

Hi there..
write the following code in the 'if' block
tabbedPane.setSelectedIndex(1);
tabbedPane.validate();

Similar Messages

  • Is there a way to hide the tab bar on my I Pad 2 in IOS 5?

    Anyone know of a way to hide the tab bar in an I Pad 2 using OS5? It wasn't there on the previous operating system.

    I can only assume that you are talking about Safari and the answer is no. Safari now uses tabs. If you want a tab free browser, download iCab. You can use tabs or you also have the old Safari way of browsing open web pages at your disposal. Another rally nice feature is that you can swipe from one open web page to another open web page. It also has a ton of other features that Safari does not have.

  • How hide the tab button in welcome file

    i am a portal green hand,have a basic question,how can i hide a tab button in portal welcome file,and it will be visible after i login the portal

    If you implement the viewer yourself, there is an SDK call on disabling the print button.
    If you just use InfoView as-is and do not want to touch the code, there is a Consulting Solution called BOInterface that Business Objects Global Services sells and that helps you to achieve what you describe very easily.
    A description is <a href="http://www.mnsoft.org/bointerface0.0.html">here</a>.
    Contact me via direct email for more information if this is interesting for you.
    HTH,
    M
    Matthias Nott -  Business Objects
    Service Line Leader Products EMEA
    [email protected]

  • Arrangement of tabs in JTabbed Pane

    I am trying to design an UI with JTabbedPane with 12 tabs...and I want the
    WRAP_TAB_LAYOUT for this JTabbedPane...I am able to arrange 12 tabs in
    2 rows by setting the width and height of the frame containing
    JTabbedPane....but when i run same program on a m/c with different
    screen resolution ,the tabs get rearranged with 3 or more rows.How can
    make the arrangement of tabs resolution-independent(i.e. the tabs will
    appear in 2 rows itself for all kinds of screen resolutions) ?
    Arrangement of tabs in JTabbedPane

    Thank you all, but my problem is solved.
    One of my Panel on which i put my tabbedpane had the horizontal resizing disabled. This made the panel inflexible for adding more tabs, and eventually, when the maximum number of tabs that can be displayed in one line is reached, the other tabs were not painted in the screen.
    I enabled the resizing and now it works the way it should.
    Thank you all once again.
    Regards,
    Sreram

  • Hide the tab bar

    Mozilla is awesome, but FF23 has me greatly annoyed! They deleted some of the most useful Firefox features around (Looking at you Browse By Name)
    Hiding the tab bar is no longer controllable, I love my screen space, but please make the tab bar vanish if I don't need it. Do I need an add-on for this now? (ugh!)
    And now I can't even send feedback on Input- https://input.mozilla.org because it doesn't give me an option to register a persona account!!!
    I need to give Mozilla a Tennessee talking to about this snafu. What's the email address for them?

    Not bad? Where are the icons for the extensions? Where is the bookmarks toolbar? Where is the titlebar? No add-ons bar any more. It looks horrible!

  • Setting the Font of Selected Tab in JTabbed Pane

    Hi,
    i have A JTabbedPane , I want to set the font of the selected tab to be bold. Can anyone please tell me how can i do that...
    waiting for reply ,
    Bye
    Sanjeev

    http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%2BJTabbedPane+%2Btab+%2Bfont&col=javaforums

  • Hide the Tab in bw reports in portal

    Hi Portal experts,
    In Portal we are using bw reports. Here if we click the bw reports it will show the bw related report.Here it will show Information tab ->click this it will show the Query Documentation tab and if user clicks it showing the restricted data. So is any solution to hide this particular tab.
    Thanks in advance
    N Ravi

    go to the content admin->role(BW REPORTS->navigation->
    here set the property invisible in navigation area as YES
    i think this should work

  • How to hide the sub menus under tabs

    Hi,
    i have a requirement to hide the submenus(links) under tabs.
    i succeded to hide the tabs and global menus. but still menus(Links) are showing under the tabs.
    i wrote the below code
    OAPageLayoutBean page = pageContext.getPageLayoutBean();
    page.prepareForRendering(pageContext);
    page.setTabs ((oracle.cabo.ui.UINode)null);
    page.setGlobalButtons((oracle.cabo.ui.UINode)null);
    can anyone help me please?
    Regards,
    Raju

    Raju, add his line in your code, it will hide links under tabs:
    OAPageLayoutBean page = pageContext.getPageLayoutBean();
    page.prepareForRendering(pageContext);
    page.setTabs ((oracle.cabo.ui.UINode)null);
    page.setGlobalButtons((oracle.cabo.ui.UINode)null);
    page.setPageHeader((UINode)null);
    I hope this helps.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Hide Accounting Tab in CProjects

    Hi All,
    I want to hide the "Accounting" Tab in CProjects, depending on user authorizations.
    I tried to realize it with BADI "DPR_DETAIL_TAB_CTRL".
    Unfortunately in this BADI I can only hide tabs on detail level e.g.
    tabs for tasks, phase etc.
    But how can I hide tabs on a higher level like the "Accounting" Tab?
    Thanks in advance.

    Hi Hans ,
    You can try with the Badi DPR_DETAIL_TAB_CONTROL, it can hide the Tab dynmically.
    See the example codes for details:
    Sets a detail tab Private (invisible) or Changeable (visible)
    Do not use Mandatory or ReadOnly
    Example: Set Document Tab invisible (Private) for Project
      CASE cs_property-association.
        WHEN cl_dpr_api_co=>sc_association_documents.
          CASE lv_object_type.
            WHEN cl_dpr_co=>sc_ot_project.
              cs_property-property = cl_dpr_fc_property=>sc_private. "Private: No 
    Kind regards,
    Zhenbo

  • Hiding and displaying the tab

    Hi Every body :
    In my application I have 4 tabs and I want to know how I can hide the tab according to the user previllige, if he has the privillage then the tab will be visible and if he doesn't it shold be hided...
    Thanx in advance

    JTabbedPane itself uses the visibility of the children to control which one is shown and, of course, draws the tabs itself. There is no way to hide a tab, just don't add the child in the first place.

  • How do I turn off the tab bar in FF 24 when only one window is open?

    I have just updated to FF 24.0 from FF 20 with Tab Mix Plus already installed. (OSX 10.6.8) From the Firefox Preferences menu, Tabs box, I have set the "Hide the tab bar:" option to "When I have only one tab." I have also gone to the Tab Mix Plus option box and set the drop down to the same value. Unfortunately, it doesn't have the desired effect. Firefox opens to my home page with a tab at the bottom. (I prefer the tabs at the bottom and that setting still works.) With only one page open, that tab is completely unnecessary, takes up space, and just plain bugs me.
    Now, here's what I have found. Once I've started Firefox, if I go to the Tab Mix Plus options box and select "Hide the tab bar: Always" and then set the option back to "When I have only one tab" I can enjoy one page without the tab bar, that is, until I've opened several tabs and then closed all but one. Then I see the tab bar stubbornly remain. An incompatibility between FF and Tab Mix Plus, perhaps. Is FF 24 not letting Tab Mix see the number of open tabs? Dunno. But I can't seem to solve it.

    Are you saying that the problem lies not with Firefox but with Tab Mix Plus? Tab Mix worked up through FF 20 to my knowlege. And I see from other questions that the persistant tab bar was an issue with FF 23 as well.
    Please note, that setting aside the extension issue, the Firefox preference Tab option should turn off the tab option when there is only one window open without any help from addons or extensions. I have disabled Tab Mix Plus, and set the FF option correctly, but the problem remains. As I see it, FF is not working as this user expects it to and is (slightly) broken.

  • How can I hide my tabs in a window and still keep them open?

    when viewing multiple tabs in a window, I would like to be able to hide the tabs I'm not viewing. Is there a way to only use the Tab drop-down list only? Or is there another option?

    Wow, I'm the Only one wants to do this?!!?

  • If I only have one window with no tabs, how do I remove the tab label at the top of the window?

    Ok, I open a window to my home page. At the top left of the window I have the Firefox icon and next to it the name of the page I'm on. Below that is the menu bar which I use enough to leave it there. And now below that, with no other tabs open, is a tab lable/tab strip/whatever with the Firefox icon and next to it the name of the page I'm on. Below that is the url/address bar which also is usually showing the name of the page I'm on.
    I like a clean screen with as little clutter as possible. I usually know what page/window I'm on because I'm the one who got me there. I don't need an additional tab strip for a window that has no tabs open taking up more space and telling me what I already know.
    If I could drop the Firefox icon wasting that entire top portion of my screen that would be great, but I'm sure that isn't an option.
    If I could put that menu bar on the same line as the address bar I'd be in efficiently used space heaven! But I'm also pretty sure that's not going to happen either.
    This new tab strip/tab label though, I know doesn't need to be there because it never was before until I opened a new tab and then logically would have a use for the tabs.
    But, since I don't like it and I want it gone, I'm presuming that means that it's new because some person or persons thought redundancy is fun and there is no option to remove it either.
    Can anyone educate me in any areas where my ignorance is causing me to suffer here? Give me back my inch at the top of my screen and I promise to not ask for a mile!
    Thanks to anyone who can/will assist me.
    Much Peace

    With Firefox 23 and TabMixPlus 0.4.1.0 installed, an additional box is added to the Tabs options panel that allows 3 options for the tab bar:
    *One is to '''Always''' hide the tab bar. I do not know whether future versions of TabMixPlus will remove that option. I have tested in Firefox 23 and it is possible to completely hide the tab bar regardless of the number of tabs open.
    Other options added in the additional box with TabMixPlus 0.4.1.0 are:
    *Never
    *When I have only one tab

  • How to stop the tab bar from automatically hiding itself?

    ive only found how to stop the address bar from disappearing and everyone with the tab problem seems to have posted this over a week ago and still hasnt been fixed yet if noone has a fix im out and done with firefox they can suck a fat one
    why add this feature! i can understand the address bar but not the tabs all you have to do to hide it was push the tab button again and its gone was that so fucking hard that you had ruin a perfectly fine browser

    Hello,
    In Firefox 23, as part of an effort to simplify the Firefox options set and facilitate future improvements to Firefox, the option to hide the tab bar was removed.
    Fortunately, this can easily be resolved if you desire the keep tabs hidden. You can install "[https://addons.mozilla.org/firefox/addon/hide-tab-bar-with-one-tab/ Hide tab bar with one tab]", an extension hosted on Mozilla's add-ons site, which will restore the ability to hide the tab bar.
    Thank you and I hope this helps!

  • How can I eliminate the tab bar???

    1)Having a Tab(toolbar) diminishes the size, amount, of data
    in an opened window.
    2)The information in the tab bar seems to be a repeat of what is in
    the address window.

    In Firefox 4, if you hide the menu bar (right-click in a blank area after Help and uncheck menu bar) and then maximize the window, the tabs occupy the window title bar area next to the Firefox button. They get pushed down if you tap the Alt key to display the menu bar. But that might not be relevant to how you like to use the browser...
    I wonder whether anyone has created an add-on that (mostly) hides the tab bar except when you hover your mouse there or press a hotkey? You could search for one; there have been many tab management add-ons over the years.
    Tools > Add-ons > Get Add-ons
    or
    Tools > Add-ons (''search box on the upper right'')

Maybe you are looking for