Adding a new Tab to an existing JTabbedPane not working

Hello all,
I am trying to add & display a new tab to an existing JTabbedPane when the user
clicks on a button. For some reason the new tab, being added is not being displayed, and I don't know why. I have called invalidate(), validate() on the parent containers but haven't had any luck. I have also played around with SwingUtilities.invokeLater() and the Event thread, but have been unsuccessfull.
Any help would be greatly appreciated.
      * This class is the parent that holds the internalFrame which is the
      * main parent for all subsequent containers
     public class QuoteRequestGUI implements QuoteRequestGUI_IF {
          protected JInternalFrame internalFrame_newQuoteRequest = new JInternalFrame("Quote Request");
          protected JTabbedPane tabbedPane = new JTabbedPane();
           * Create a new internal frame to which all the components of a new
           * QR will be added
          public JInternalFrame createNewQuoteRequestFrame() {
               // Add a tabbed pane to the internal frame
               internalFrame_newQuoteRequest.add(createQuoteRequestTabbedPane());
               // .... Set various internalFrame properties
               return internalFrame_newQuoteRequest;
          public JTabbedPane createQuoteRequestTabbedPane() {
               // Create a new quote request details instance
               QuoteRequestDetailsGUI_IF quoteRequestDetailsGUI =
                    new QuoteRequestDetailsGUI(quoteRequestStatusPassed);
               // Create a new tab that will host all details of the quote request     
               tabbedPane.addTab("Quote Request Details",
                         quoteRequestDetailsGUI.createQuoteRequestDetailsPanel());
               return tabbedPane;
     public class QuoteRequestDetailsGUI extends QuoteRequestGUI implements QuoteRequestDetailsGUI_IF {
          private ProductDetailsGUI_IF productDetailsGUI = new ProductDetailsGUI();
           * Panel that will act as a container for both quote request and buyer
           * details
          public JPanel createQuoteRequestDetailsPanel() {
               // Panel that will contain quoteRequest, buyer and buttons
               JPanel panel_quoteRequestDetails = new JPanel();
               // Create an intermediate panel so that components can be layed out properly
               JPanel panel_quoteRequestIntermediatePanel = new JPanel();
               // Set layout manager for panel
               panel_quoteRequestIntermediatePanel.setLayout(
                    new BoxLayout(panel_quoteRequestIntermediatePanel,BoxLayout.PAGE_AXIS));
               // Add the buttons
               panel_quoteRequestIntermediatePanel.add(createQuoteRequestDetailsButtons());
               // Add the intermediate panel to the main panel
               panel_quoteRequestDetails.add(panel_quoteRequestIntermediatePanel);
               return panel_quoteRequestDetails;
           * Panel that will hold all the buttons for the quote request details tabbed panel
          public JPanel createQuoteRequestDetailsButtons() {
               // Panel to act as a container for the buttons
               JPanel panel_quoteRequestDetailsButtons = new JPanel();
               // Create, register action listeners and add buttons to the panel
               JButton button_saveTabbedPane = new JButton("Save");
               button_saveTabbedPane.addActionListener(new ActionListener() {
                    public void actionPerformed (ActionEvent actionEvent) {
                           saveTabbedPaneListener();
               panel_quoteRequestDetailsButtons.add(button_saveTabbedPane);
               return panel_quoteRequestDetailsButtons;
           * Display the save (product details) tabbed pane
           * @todo - Implement the save tabbed pane selected method
          public void saveTabbedPaneListener() {
                    log.info("tab count before added : " + tabbedPane.getTabCount());
                    // The product details of a particular quote request
                    tabbedPane.addTab("Product Details",
                              productDetailsGUI.createProductDetailsPanel());
                    log.info("tab count after added : " + tabbedPane.getTabCount());
                    tabbedPane.invalidate();
                    tabbedPane.validate();
                    internalFrame_newQuoteRequest.revalidate();
     public class ProductDetailsGUI implements ProductDetailsGUI_IF {
           * Panel that will act as a container for both the product details (incl
           * table) and the buttons
          public JPanel createProductDetailsPanel() {
               // Main product details panel
               JPanel panel_productDetails = new JPanel();
               // Add the scroll pane to the panel
               panel_productDetails.add(new JButton("ok"));
               // Add the buttons to the panel
               // Add the scroll pane to the panel
               panel_productDetails.add(new JButton("cancel"));
               return panel_productDetails;
     }

MS,
Try copying one existing TAB and use that, this happens only when there is improper xml content. You can open the xml in the browser/visual studio for better clarity and then try making the changes. Doing IIS Reset will be required but in the meanwhile you
can put the original RCDC which will work till the time you make any change in new TAB.
Regards,
Manuj Khurana

Similar Messages

  • Adding a new Tab to an existing RCDC

    I'm trying (and failing) to add a new tab to an existing RCDC.
    I've read several posts on this and I cannot figure out what I'm missing.
    I insert the following code in between 2 other groupings and every time I get the message "There is an error in the Group display configuration".
    <my:Grouping my:Name="NewTab" my:Caption="NewTab">
    <my:Control my:Name="NewTabText" my:TypeName="UocLabel" my:Caption="NewTabText">
    <my:Properties>
    <my:Property my:Name="Text" my:Value="!!!" />
    </my:Properties>
    </my:Control>
    </my:Grouping>
    I've tried this code and mild variations of this code on several RCDCs and I always get a negative result. 
    Any help, thoughts appreciated.  If I do another iisreset today I might explode.
    Thanks

    MS,
    Try copying one existing TAB and use that, this happens only when there is improper xml content. You can open the xml in the browser/visual studio for better clarity and then try making the changes. Doing IIS Reset will be required but in the meanwhile you
    can put the original RCDC which will work till the time you make any change in new TAB.
    Regards,
    Manuj Khurana

  • Problems using right click to open in new Tab or Window. Will not work. How do you solve this. Have v5.0 installed.

    I have the latest version of Firefox installed. Version 5.0.
    When searching on Google and use right-click to open in new tab or window. Keep getting blank tab.
    Can somebody advise how to solve this.
    Thank you.

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the ''Safe mode'' start window.
    You have to close and restart Firefox after each change via "File > Exit" (on Mac: "Firefox > Quit")

  • After latest update 20.0.1 when opening a new tab, close, minimize, maximize are not working. Also using arrow in online dropdown menu's are non-selectable.

    After automatically updating to version 20.0.1 yesterday the buttons in the upper right corner minimize, maximize, close stop working when I open a new tab. When only one tab is open they do work. Also when downloading a file ( and again this opens a new pop-up window ) after clicking save file there is no response. The save file button looks as if it is pushed but there is no download going on.
    I tried safe mode, didn't help.
    I tried switching off all add-ons, didn't help.
    I tried reset, didn't help.
    I even tried uninstalling and re-installing firefox, didn't help.
    The only thing that works for a couple of seconds is when I go to options in the firefox menu, close the pop-up the buttons in the upper corner are active for a couple of seconds.

    Hello,
    I kept searching a solution for this problem and I found that: https://support.mozilla.org/en-US/questions/956417
    You just have to update the Add-on Firebug from 1.10.6 to the latest version 1.11.2. If it's not that Add-on try with another Add-on.

  • Babylon Search Engine overrides Home Page and New Tabs - About: Config Reset does not work

    Tried new tab homepage addon as well.
    Tried uninstalling Babylonobject installer with Revo Uninstaller forced uninstal.
    Tried reinstalling firefox.
    Setting Homepage to Show a Blank Page works for the startup but means I cannot have a homepage setup.
    Firefox detects something trying to change the homepage on start up but does nothing about preventing Babylon even if the change is denied.

    It sounds like you have a Third-Party Toolbar that has taken over your Search Engine, Home Page, and/or the Default New Tab Page. Fortunately this can be remedied easily:
    # At the top of the Firefox window, click on the Firefox button (Tools menu in Windows XP), and then click Add-ons. The Add-ons Manager tab will open.
    # In the Add-ons Manager tab, select the Extensions panel.
    # Select the toolbar you wish to remove.
    # Click the Remove button.
    # Click Restart now if it pops up. Your tabs will be saved and restored after the restart.
    After Firefox restarts, install the [https://addons.mozilla.org/en-US/firefox/addon/searchreset/ Search Reset Tool]. This will remove the rest of the traces of this program from your Firefox.
    For further information, please read [[Remove a toolbar that has taken over your Firefox search or home page]].
    Does this help your question? Let us know!

  • Adding a new tab in PPOME

    Hi,
    We have a requirement like adding a new tab in the trasaction PPOME.
    Can somebody share their knowledge on this.
    Somu

    All infotypes that are to be added to the transaction, either SAP or Customer MUST have a screen 7000. This makes integration very simple. Another option is to develop a Module Pool with a screen and code to present one or many infotypes, but this is very time consuming compared with simply adding 7000 as a copy of 2000.
    In the case of SAP, standard infotypes that must added without an existing screen 7000 a screen 9000 must be created to take the place of the 7000. Screen 9000 is in the customer name space but must be created in the SAP development class.  for example 9000 screens has to be created for infotypes 1005, 1037 and 1050. Requests has to be made for development of screens for 1005 and 1016, but due to the special nature of the screens it was not possible.
    Entries must be made in T77ID to reflect the additional screen.
    Configuration Steps
    Various steps must be performed to achieve the requirements, which include:
    Removing Tabs
    Adding Tabs
    Adding Search Nodes
    Scenario Scenario OME0 is configured to reflect the requested changes. View T77OMTABUS defines the tabs that are available by scenario per object.
    Removing Tabs
    Maintain View T77OCTABUS
    Add Object and Tab page entries for the correct scenario to remove entries.
    Adding Tabs
    The first step is to define a tab page in view T77OMTABS. In most cases, this should be an Infotype specific entry that uses screen 7000. For solutions that are more complex a Module Pool can be developed.
    Once added, perform the same step defined in Removing a Tab, it will have the reverse effect. Use the Sequence number to determine order.
    Adding a Search Area
    To add an Area to a Search Node you must customize V77CSEAT. In this case, one entry was added for Object type C to allow for a search on Job Group/Family/Series.
    through spro:
    spro-Personnel Management>Organizational Management>Hierarchy Framework>
    Adjust Tab pages in Detail Area--> change the Tab Page Sequence
    also see:
    New tab in PPOME
    new tab in ppome
    hope its useful..:)

  • How to create a new tab inside a existing subtab on a page.

    Hi,
    How can I create a new tab inside a existing subtab on a page?
    If I change directly on the page.xml it will not maintain compatibility with upgrades. Am I right?
    Thanks,
    Marcelo

    Marcelo,
    Well basically you are adding a stackLayout bean and using that adding your region. Are you able to see the changes and run the page without any error?
    As you are manipulating the file manually, you can never be sure of whether its going to cause issues later on or not. And as mentioned earlier if OAF doesn't support creating the subtab using personalization, there are bound to be some limitations from the framework side. Also what personalization allows is to create items and not regions. So better stick to a rigorous testing to catch any issues early on.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem adding a new tab to e-Recruiting

    Hi,
    I am facing the following problem in adding a new tab in the E-Recruitment (Manpower Requisition) application. The developer had created a new BSP page of the following information.
    Name space: SAP
    Application: ZHR_MPOWER_REQ
    Controller URL: MPR.DO
    A customized element (9001) had also been created with the above information.
    I have also created a context ZTEST and a Container Seq '1000' and under the Container Seq, I have allocated a few assignment of Element of which I have assigned the new element - 9001.
    Having assigned the above, I am still unable to see the new tab in the link. Please let me know if there are any missing steps.
    Thanks.

    Dear,
    Just want to check, r u able to Run the Custom BSP as a Standard alone application ?.
    Have you Configure T77RCF_APPl_LOG table ?.
    Alvin, i could not see why you could not see the BSP Page.
    Please got to t-code  SLG1 and check the log's why it's not coming.
    Could you please give more details, what you have done.
    Thanks & Regards
    Sabba Ravi

  • Adding a new tab to CrystalReportViewer and loading a new rpt into it

    Hi,
    I've been struggling with the following problem for a few days now and I would really appreciate any help you can offer.
    I need to add a new tab to an existing instance of CrystalReportViewer and load a new crystal report (RPT) into it.
    I wasn't able to do that and tried inserting an instance of a new CrystalReportViewer into the new tabpage, but I've encountered several problems with that solution as well, such as: by hiding the tree and all bars, I'm also removing the page navigation field of the new rpt.
    Here is the code I've used:
    TabControl tabControl = (TabControl)((PageView)crystalReportViewer1.Controls[0]).Controls[0];
    DocumentControl tab2 = new DocumentControl(new ViewerDocument(new SubreportContext()));
    tabControl .Controls.Add(tab2);
    tabControl .TabPages[1].Text = "New Tab";
    tabControl .SelectedTab = tab.TabPages[1];
      Now I need to load the rpt to the new tabpage
    If I'm trying to add a new CrystalReportViewer into the tabpage:
    ReportDocument oRpt2 = new ReportDocument();
    oRpt2.Load(tempFile);
    CrystalReportViewer newViewer = new CrystalReportViewer();
    newViewer.Dock = DockStyle.Fill;
    newViewer.DisplayGroupTree = false;
      newViewer.DisplayStatusBar = false;
      newViewer.EnableDrillDown = false;
      newViewer.DisplayStatusBar = false;
      newViewer.DisplayToolbar = false;
      newViewer.ReportSource = oRpt2;
       tab2.Controls.Add(newViewer);
    Please let me know what is the best practice for this kind of operation.

    Continue my question....
    I've found a method that opens such a tab for me in one statement:
    DocumentControl tab2 = ((PageView)crystalReportViewer1.Controls[0]).CreateNewReportDocument("new doc");
    But I remain with question of how to load the new RPT into it?

  • Adding a new tab on item level in me21n tcode

    Hi all.
    i am adding a new tab on item level in me21n tcode.
    i want to make this tab to be shown on the screen when the order type is UB is stock purchase order.i dont know how to make this condition and where should i place it so that this tab can come in effect only when the stock purchase order appears.
    please help.thanks

    hi
    chk this
    Re: New tabs in the header tab-sheet of ME21N/ME22N/ME23N
    hope this helps
    regards
    Aakash Banga

  • Adding a New Tab Page in Cprojects 4.0

    Hi
    We have added a new tab page by the method of Global Enhancement to Cproject we are successfull in getting the link in the tab page. But the page we had created thru webdynpro
    is not seen in the tab page it gives a blank page. We are using Cproject 4.0 can u help us.
    regards
    Suresh Nair

    Hi,
    this can be done via  transaction CRMV_SSC.
    Please review SAP help for further information regarding Screen
    Sequence Control under :-
    Screen Sequence Control of the Business Transaction -> Selection of the
    Screen Control Data
    or
    The Screen Sequence Control of the Business Transaction is documented in
    the online documentation under
    - SAP Customer Relationship Management
       - Business Transactions
         - Basic Functions for Business Transactions
           - Screen Sequence Control of the Business Transaction
    Regards, Gerhard

  • When I add a new bookmark, and the (star) Page Bookmarked window appears - is there any way to expand the size of that window so that I can see my entire list of folders when adding a new bookmark to an existing folder?

    When I add a new bookmark, and the (star) Page Bookmarked window appears - is there any way to expand the size of that window so that I can see my entire list of folders when adding a new bookmark to an existing folder? The endless scrolling technique is far too tedious when trying to add a new bookmark, because the window is simply too tiny. Is there maybe a plug-in that will let me grab the corner of that window and re-size it? Thanks!

    I suggest you install the "Add Bookmark to Here2" extension, then you can expand the the list but you will not see the bookmark itself in the list if that is what you wanted. At the top you have three major folders you can select one of them and scroll up and down. Below that you have your most recently used folders and you can select one of them instead and scroll up and down. You can see the folder the bookmark is in -- they get added to the bottom
    If you really want to see the bookmark within the folder the same extension allows you to bring the bookmark to the folder from say the bookmarks sidebar that is why it is named as such. I use it but mainly i use the dialog.
    Please continue reading about bookmarks and some related extensions at
    * http://kb.mozillazine.org/Sorting_and_rearranging_bookmarks_-_Firefox
    * https://addons.mozilla.org/firefox/addon/add-bookmark-here-2/
    * http://dmcritchie.mvps.org/firefox/firefox.htm#addbookmarkhere2
    * http://dmcritchie.mvps.org/firefox/kws.htm
    If you are not using tags at all, you can remove a whole lot of confusion by removing them from the dialog via the extension.

  • Tab and control buttons do not work in Firefox (they work in other browsers) AND I switched to a new keyboard.

    The tab and control buttons are not working the Firefox browser (My browser is up-to-date). The buttons work in IE and Chrome, however, before I realized that, I even switched out my keyboard to a brand new one hoping it would solve the issue.

    Thank you--there were a few random extensions I had not added (spyware, maybe?). Once I removed those the issue was fixed!

  • I recently upgraded to 10.6.7 and Safari 5.05. Safari now has a long load time when you initially boot it up and when selecting a new tab. Other than that it works fine. What can I do ?

    I recently upgraded to 10.6.7 and Safari 5.05. Safari now has a long load time when you initially boot it up and when selecting a new tab. Other than that it works fine. What can I do ?

    Check Safari / Preferences - Extensions. If you have any installed, turn that off, relaunch Safari.
    If it's not Extensions, check for third party Safari add ons.
    http://support.apple.com/kb/TS3230?viewlocale=en_US

  • When I choose to open a new tab from a website, such as facebook, it always opens it in a new window. How do I change this to just opening a new tab. I tried changing the tab settings but it did not work

    When I choose to open a new tab from a website, such as facebook, it always opens it in a new window. How do I change this to just opening a new tab. I tried changing the tab settings but it did not work. I did not have the problem until I started using firefox 4.

    It is probably a JavaScript link.
    You can probably force it where you want it with a keyboard shortcut
    either "Ctrl+click" or "Ctrl+Shift+click". see
    * Firefox and other Browser Keyboard Shortcuts (Comparison Table)<br>http://dmcritchie.mvps.org/firefox/keyboard.htm
    ''Did that work?''
    Some styles that provide a warning as to the type of link:
    * No Follow links, mouseover id of other links - userstyles.org<br>http://userstyles.org/styles/10987
    * Change cursor on some links with JS. - userstyles.org<br>http://userstyles.org/styles/233
    * Link Warning - Themes and Skins for Mozilla - userstyles.org<br>http://userstyles.org/styles/1301
    * Link warning (cursor hover) - various filetypes - userstyles.org<br>http://userstyles.org/styles/2538
    * Red hand cursor for .pdf links - userstyles.org<br>http://userstyles.org/styles/553

Maybe you are looking for

  • Error message when upgrading iTunes

    When I get a notice for Software Upgrade for my eMac (10.4.8), it works for everything except iTunes - I get a message "Please quit iTunes before beginning this update" even though iTunes is closed. I have to reboot the computer or this message recur

  • Convert higher bit rate songs?

    This is an option on the device screen every tme I sync my iPod touch - now at OS v6. Should I click on it and convert? And if so, to which kbps setting?

  • Change color of calendar

    With the new iCal, I can't find where I can change the color of my calendars. I have two that are green and I need to be able to distinguish between the two.

  • Airport Express not seen by MacBookPro

    I have a NEW AE, plugged in, and cannot see the unit on the wireless network. Rescan shows Nothing...... Neither of the S/W Tools for admin see the AE either. ================================= System spec: Pro 2.16 Ghz Intel core Duo OS: 10.4.8 Airpo

  • HT1807 In a foreign country you buy a card for air time, on the iphone how do you know how much time is left.

    In a foreign country Panama, you buy air time so much at a time with a time card.  How do you tell how much time is left on the iphone?