Add the same component in 2 different tabs

I am trying to add the same component in two different tabs in a tabbed pane. When I add it (programaticaly) the first instance disappears. Is this at all possible. I dont want to clone the component first and then add it.
Thank you

In my appllication I have a tab (call it main tab) that includes many components, like a textfield and texteditorpane that form a command line tool, a list of connected clients (names) and several other components in the same tab. Now the user, can issue a command from the command line to open any component in a new tab, for example he might want to open the clients list in a separate tab, while still having an instance of the clients list in the main tab.
Also when something is updated (for example a new name is added in the list) I want both instances to be updated at the same time (since there is actually one Jlist object there shouldn't be any additional code to do that).
So far, when i am opening a new tab holding a component from the command line (the one i made), the same component disappears from the main tab.
I ll try what was mentioned above.
Edited by: FreshPrince1 on Apr 12, 2010 6:50 AM

Similar Messages

  • How do i add the same mouselistener to many different instantiated objects?

    This is for a card game.
    The deck class instantiates 52 cards from the card class.
    The game has a deck of cards. I am dealing each player their cards, the player is to be dealt 8 cards each of which should have a mouselistener.
    How do I add the same mouselistener to each of the cards dealt.
    This is how I have it so far but it only adds a mouselistener to the last card dealt.
         public void dealPlayerACard()
              taken = availableCards.dealCard();
              taken.showCard();
              taken.addMouseListener(this);
         public void mouseClicked(MouseEvent MEvent)
              playerHand.remove(taken);
              paintHand(playerHand);
              playerHand.repaint();
    Any help would be appreciated

    Yeh I have 52 card object in the deck. Theyre not individually named, they were instantiated in the deck class.
    standardDeck.add(new Card(a, b, new ImageIcon(str), cardBack)); //creating and then adding the cards
    So i draw one card at a time, and I had a mouselistener to that particular card. But the thing is, When the cards are clicked, some checking happens and if the move is legal, the card is added back into the deck and its mouselistener should be removed. This is because that card could then be added to the computers hand, and I dont want no player using the computer players cards.
    The game deals the cards to players, players use the cards and then send them to the bottom of the deck, the deck is shuffled and then the game continues until a condition is met by either of the players.
    So i dont understand how a loop solution would work here. My mind is blank at the moment, maybe im not understanding properly. I am new to java. So if you do know the answer, please tell it to me. Please dont wait for a lightbulb to appear above my head. ;)

  • Skinning the same component in a different way

    I want to skin a commandLink differently. I tried:
    af|commandLink {
        color: Yellow;
    .level1 af|commandLink {
        color: Fuchsia;
    .level2 af|commandLink {
        color: White;
    and the links
    <af:commandLink text="Yellow" id="cl0"/>
    <af:commandLink text="Fuschia" id="cl1" styleClass="level1"/>
    <af:commandLink text="White" id="cl2" styleClass="level2"/>
    Thanks
    JDev 11gR1

    Use
    .level1 {
        color: Fuchsia;
    .level2  {
        color: White;
    Timo

  • How to Add the Same Component to a JPanel Multiple Times

    I have a simple JPanel with BorderLayout as manager. I created a JLabel and added it to all of the areas except center. But the JLabel shows up only in the area to which JLabel was added last. WHY?
    Any help is appreciated!
    DD
    jvm 1.4.2._05-b04 on Win2K

    What you need to do is make a class extending JLabel:class myLabel extends JLabel
        public myLabel()
    }then you can make as many instances of it as you want
    eg:myLabel label1 = new myLabel();
    myLabel label2 = new myLabel();
    good luck                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to use the same component in different applications

    Hi All,
    I need to use the same component in different applications. i.e In opportunity, Quotation & Promotion.
    The Search help view in the component PRD01QR should be used in all these components but with different search criteria.
    With help of the DO_determine_configuration, different view configurations are possible but Different search criteria is not possible.
    for Eg. search parameter without DDLB, F4 options in another components.
    How can I control the behavior of the search view in different applications with restricting the field properties?
    Is it possible to find out where and in which component these search_help_search component is used?

    Hi Harry,
    Is it possible to find out where and in which component these search_help_search component is used?
    ans: I am giving an Example for your question go through that u might get clear about this.
    Ex: BT115IT_SLSO  sales order component
    below screen they component usage using for populate the product search component.
    please let me know any help required .
    Regards,
    vishwa.

  • Difference in using the same component made in mxml or action-script

    Hi,
    I made a sample project to show a kind of bug in the SuperTabNavigator component of FlexLib
    In this sample you can see that using the same component (made in both mxml or action-script) can make a difference
    I'm just wondering why ?
    Thanks
    Here is what i've posted :
    What steps will reproduce the problem?
    1. Create a button to dynamically add new tab with icon on a SuperTabNavigator
    2. Click on this button to add new tabs
    What is the expected output?
    - The expected output is tabs added without abnormal behavior
    What do you see instead?
    - Every time a new tab is created the one who had the focus has its content
    (icon + label) moving from the top-left of the tab to its original position
    Please provide any additional information below.
    Configuration:
    - Flex Builder 3 in Eclipse
    - FlexLib 2.3
    Sample:
    (see attached file)
    There is two type of tab, one in action-script and one in mxml
    They both are equal
    - Adding a new action-script tab to SuperTabNavigator works fine
    - Adding the same tab but an mxml one doesn't
    - Adding a new action-script or mxml tab to TabNavigator works fine
    -> meanings that the issue comes with SuperTabNavigator
    - Adding a new mxml tab to both SuperTabNavigator and TabNavigator at the
    same time makes TabNavigator to get the same bad behavior
    Remarks:
    - Tried everything but i'm really stuck
    - Weirdly, removing the PopUpButton correct the issue
    - In the same way if you keep adding action-script tab it automatically scroll to the
    last tab. And if you do the same with mxml tab then it add the tab at the end and
    scroll to the first one.
    => what could be the difference between using action-script or mxml object ?

    Here is one possible solution:
    You can use the ExternalInterface (
    http://livedocs.macromedia.com/flex/2/langref/flash/external/ExternalInterface.html)
    class to communicate with JavaScript. JavaScript can then popup the
    media player very easily like this:
    http://www.webreference.com/programming/javascript/jf/column5/index.html
    The documentation on the ExternalInterface class has a nice
    example (in the bottom of the page) on how to communicate with
    JavaScript in a browser. Hope this helps,
    -george

  • JTappedPane with the Same component

    Hi,
    I know that itsn't possible to put the same component in different tabs of a JTabbedPane, but i must perform this for my application, let say that i have a componenet similar to a JTable on which i can't perform all controls , only to change it's data, and I must put the same object into JTappbedPane and when selecting a tab the componenent change it's data according to the selected tab.
    can any one help me to skip the JTabbedpane problem and implement this.
    thanks in advance.
    Regards,

    From what I can see, you want to have some similar features with the table component in all the tabs. What I think you can do is to create some static fields in the table component which you'll use to store information for the table. Then in each tab create a new instance of the table component, and pass in the required data to be displayed. The static fields will be shared between the table components. That way if you have to call some data retrieval method, you only have to call the it one of the table components to get all the data for the other instances.
    This will save you from having to listen to the tabs for which is selected and then change the table display.

  • How to use the same OC4j server with different port number

    How to use the same OC4j server with different port numbers..?
    I have to OC4J installed on my machine on different hard disk drives....
    I want to be able to run both the server simultaneously..?
    is it possible ..it yes then how..?
    for that i have changed the port number of one server...
    but when i am trying to start the other server with different port number..it says that JVM -Bind already...
    Is there any clues...?
    Nilesh G

    In the config directory:
    default-web-site.xml: Change the port the HTTP listener listens on
    jms.xml: Change the port the JMS service listens on
    rmi.xml: Change the port the ORMI listener listens on.
    Or, you can add another web-site.xml file, and deploy your applications to 1 server, and bind the web applications to the different web sites. This way you only have to deploy your applications to 1 place.
    Rob
    Oracle

  • Can you have the same song on 2 different albums ?

    I would like to use the same track on 2 different albums.
    For example, one track on the original album and the same track on my own compilation album.
    One way would be to make two copies of the track and call them different names.
    e.g. UseSomebody1.mp3 and UseSomebody2.mp3, then these two tracks can be added to the library.
    But this seems a waste of space.
    I have an existing compilation album with odds and sods of my own tracks. But I want to pick and choose a few tracks from other albums and add to my existing compilation album.
    I know about playlists but this isnt the ideal solution either, because I have an existing compilation album already and I want the album to be in the main library (i.e. not have to go thru the playlist menu on the iPod).
    I just wondered if there was a way of having 2 seperate tracks in iTunes that point to the same file.

    sky_rat wrote:
    I made a copy of an mp3 file on an existing album and tried to add it as a new file, but it doesnt appear....
    I made a copy of this mp3 file on my desktop and called it "Kids_MGMT.mp3"
    I added the file to library but the second copy does not appear, even after a refresh and a search.
    Find the original library entry and change something in the metadata, e.g. add an Album Artist even if you don't need it. Then go back to the renamed copy and move it into your iTunes folder at an appropriate location, right-click the file, and choose Open With > iTunes. It will immediately show as a separate library entry.

  • If I want to open the same website in a second tab and press Ctrl+T and start typing the website title or URL, why does Firefox 4 insist on switching to the first tab? Is it possible to turn this off?

    I regularly need to open the same website in two tabs, to be able to view changes made between opening the first and second tabs. In Firefox 3.x I could press Ctrl+T and start typing the website title or URL, which would be auto-completed by Firefox. This enabled me to quickly open the same website in a second tab. Firefox 4 does not do this, instead it wants me to switch to the existing tab. This is not what I need.
    Of course it is possible to open the same website in a second tab via e.g. a bookmark, but this takes more time and effort. It would be great if I could select Firefox's behavior in this situation.

    To create a duplicate of an existing tab in Firefox 4, do one of the following:
    *middle-click the icon on the left end of the URL/Location/Address Bar
    *hold down the Ctrl key and drag the tab until a small arrow appears at the border between tabs, then release the mouse button, then release the Ctrl key.
    <br />
    <br />
    You have multiple Java Console extensions because Java did not clean up after itself when updating; Firefox button > Add-ons > Extensions OR, using the Menu Bar, Tools > Add-ons > Extensions:
    *Java Console 6.0.17, Java Console 6.0.19, Java Console 6.0.20, Java Console 6.0.21, Java Console 6.0.22, Java Console 6.0.23
    Using the instructions here:
    *http://kb.mozillazine.org/Firefox_:_FAQs_:_Install_Java#Multiple_Java_Console_extensions
    you can delete the following folders:
    *{CAFEEFAC-0016-0000-00'''''17'''''-ABCDEFFEDCBA}
    *{CAFEEFAC-0016-0000-00'''''19'''''-ABCDEFFEDCBA}
    *{CAFEEFAC-0016-0000-00'''''20'''''-ABCDEFFEDCBA}
    *{CAFEEFAC-0016-0000-00'''''21'''''-ABCDEFFEDCBA}
    *{CAFEEFAC-0016-0000-00'''''22'''''-ABCDEFFEDCBA}
    *{CAFEEFAC-0016-0000-00'''''23'''''-ABCDEFFEDCBA}
    You can leave {CAFEEFAC-0016-0000-00'''''24'''''-ABCDEFFEDCBA}
    <br />
    <br />
    '''You need to update the following:'''
    *Adobe Shockwave for Director Netscape plug-in, version 11.5
    *Adobe PDF Plug-In For Firefox and Netscape "9.3.3"
    *Shockwave Flash 10.2 r152
    #'''''Check your plugin versions''''' on either of the following links':
    #*http://www.mozilla.com/en-US/plugincheck/
    #*https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    #*'''Note: plugin check page does not have information on all plugin versions'''
    #*There are plugin specific testing links available from this page:
    #**http://kb.mozillazine.org/Testing_plugins
    #'''Update Shockwave for Director'''
    #*NOTE: this is not the same as Shockwave Flash; this installs the Shockwave Player.
    #*Use Firefox to download and SAVE the installer to your hard drive from the link in the article below (Desktop is a good place so you can find it).
    #*When the download is complete, exit Firefox (File > Exit)
    #*locate and double-click in the installer you just downloaded, let the install complete.
    #*Restart Firefox and check your plugins again.
    #*'''<u>Download link and more information</u>''': http://support.mozilla.com/en-US/kb/Using+the+Shockwave+plugin+with+Firefox
    #'''Update Adobe Reader (PDF plugin):'''
    #*From within your existing Adobe Reader ('''<u>if you have it already installed</u>'''):
    #**Open the Adobe Reader program from your Programs list
    #**Click Help > Check for Updates
    #**Follow the prompts for updating
    #**If this method works for you, skip the "Download complete installer" section below and proceed to "After the installation" below
    #*Download complete installer ('''if you do <u>NOT</u> have Adobe Reader installed'''):
    #**SAVE the installer to your hard drive (save to your Desktop so that you can find it after the download). Exit/Close Firefox. Run the installer you just downloaded.
    #**Use either of the links below:
    #***https://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox ''(click on "Installing and updating Adobe Reader")''
    #***''<u>Also see Download link</u>''': http://get.adobe.com/reader/otherversions/
    #*After the installation, start Firefox and check your version again.
    #'''Update the [[Managing the Flash plugin|Flash]] plugin''' to the latest version.
    #*Download and SAVE to your Desktop so you can find the installer later
    #*If you do not have the current version, click on the "Player Download Center" link on the "'''Download and information'''" or "'''Download Manual installers'''" below
    #*After download is complete, exit Firefox
    #*Click on the installer you just downloaded and install
    #**Windows 7 and Vista: may need to right-click the installer and choose "Run as Administrator"
    #*Start Firefox and check your version again or test the installation by going back to the download link below
    #*'''Download and information''': http://www.adobe.com/software/flash/about/
    #**Use Firefox to go to the above site to update the Firefox plugin (will also install plugin for most other browsers; except IE)
    #**Use IE to go to the above site to update the IE ActiveX
    #*'''Download Manual installers'''.
    #**http://kb2.adobe.com/cps/191/tn_19166.html#main_ManualInstaller
    #**Note separate links for:
    #***Plugin for Firefox and most other browsers
    #***ActiveX for IE

  • Ability to process several raw files with the same content but with different exposure into the single picture

    Can you add to the Lightroom an ability to process several raw files with the same content but with different exposure into the single picture?
    Base raw files can be given with exposure bracketing during shooting, for example.
    The goal - to get maximum details in darks and lights (if we use the "ligths recovery" or "fill lights" we lose the quality because raw file just have no all required information).
    The similar (but not the same, only the idea) thing - is High Dynamic Range Photography in Adobe Photoshop
    Thank you

    The plugin LR/Enfuse does this already. And of course Photomatix have a plugin available for Lightroom. This essentially amounts to pixel editing, which is beyond the range of Lightroom's metadata editing.

  • How to download the same song(track) with different keys? iTunes seems to think I have already downloaded the song and will not download the song in a different key of the Demo Track

    How to download the same song(track) with different keys? iTunes seems to think I have already dowloaded the song and will not let me download the song in a different key or the Demo.

    Hello Jigz19,
    It sounds like you are unable to play a couple of songs from your library becuase you get a message that the computer is unauthorized to play, but other content purchased that same day works without issue. I would verify that the affected songs were purchased with the same Apple ID first:
    Recovering a forgotten iTunes Store account name
    http://support.apple.com/kb/ht1920
    Open iTunes
    Highlight one of the items you have purchased (You can find your purchases in your Purchases playlist).
    Choose File > Get Info.
    Click the Summary tab.
    The Account Name area will list the account used to purchase the item. Unless you have changed accounts, this is your iTunes Store account name.
    If so, then delete the songs:
    How to delete content you've downloaded from the iTunes Store, App Store, iBooks Store, or Mac App Store
    http://support.apple.com/kb/HT5772
    Then re download them with this article:
    Download past purchases
    http://support.apple.com/kb/ht2519
    Thank you for using Apple Support Communities.
    All the best,
    Sterling

  • Reading the Context Node in the same Component

    Dear Gurus,
    I have made enhancement to standard view and functionality is working fine.
    Now i need to read the different context node (Different view) from the same component.
    I try to do the way Webdynrpo read the context node  but here there is Wizard and i stucked :-(.
    Can you plz suggest or post small code to read context node.
    Regards.
    ****Poorna****

    Hi,
    If those two views are assinged to one viewset in runtime repositoty, you can read the secod view by following code:
    lv_viewname = me->get_viewarea_content( 'Upper' ).      " here(me =view1)                               
      IF lv_viewname IS NOT INITIAL.
        lr_viewctrl = me->get_subcontroller_by_viewname( lv_viewname ).
        IF lr_viewctrl IS BOUND.
    from here you can read the context nodes.
    Regards,
    S Reddy

  • Binding 2 Models in the Same component controller

    I'm using 2 Import Adaptive RFC Models. I want to bind both the models in the component controller of the same web dynpro component.
    But when I try to do model binding for the second model, it does not allow me to do so. If I try to bind the same model in a different project, it happens perfectly and works fine. That means the model i.e. the BAPI is perfectly ok.
    Can anyone please tell why is it not allowing to bind 2 models in the component controller of the same web dynpro component?

    Hi Satyadev,
       If I undersatand your description properly, you have 2 models nodes in a webdynpro component, and you want to bind these two together. If this is the question, then, yes you cant do the bindings declaralatively, you have to do it dynamically...
    Look at the code snippet below, it may help you...
    Suppose ChildNode1 and ChildNode2 are the model node in the context of the component controller. Then you can map these two nodes dynamically....
    wdContext.wdGetAPI().reset();
         IWDNodeInfo testNodeInfo1 = wdThis.wdGetAPI().getContext().getRootNode().getChildNode("ChildNode1", IWDNode.LEAD_SELECTION).getNodeInfo();
         IWDNodeInfo testNodeInfo2 = wdThis.wdGetAPI().getContext().getRootNode().getChildNode("ChildNode2", IWDNode.LEAD_SELECTION).getNodeInfo();
         testNodeInfo2.setMapping(testNodeInfo1, true);
         testNodeInfo2.addAttributesFromDataNode();
    Hope this helps,
    Please let me know if I have not understood your question properly...
    Regards,
    Vishnu Prasad Hegde

  • HT2498 If I use camera window to download my pictures to my computer, and then I copy and paste the pictures to iPhoto. Would I be ending up having the same pictures in two different files in my computer, and so wasting space in my hard drive?

    I recently bought a canon camera. The instructions of the camara recommend to use the canon software (camara window) to download pictures to my computer.  I would like to have my pictures in i-photo because it syncs them to my ipad.
    I want to download the pictures from my camera to camara window, and then drag and drop the pictures to i-photo. If I keep my pictures in both programs would I be wasting space in my computer hard drive by having the same pictures in two different files?

    Yes.
    Ignore the Canon software. It gains you nothing and adds complexity. Just use iPhoto for the lot.
    Regards
    TD

Maybe you are looking for