Replacing layout component

Dear all,
I have created a JPanel and set it to GridLayout.......after adding all the components into the layout......i would like replace certain component(e.g. textfield) in the layout with another component (e.g. button)........is there a way that can directly substitute an added component at certain location of the layout without removing all components and adding them all again.....coz this will refresh the whole panel.............
thx

if so, how can i determine the index of the deleted component?I'm guessing the index is assigned in the same order the component is added to the container. So save the index when you are building the gui.
Or you could always write a loop using the getComponent(...) method of Container. When you find a matching component you know the index.
Not sure if this will work but you could try adding both components making one visible and the other invisible. Then maybe you could just toggle the visible property.

Similar Messages

  • How to replace a component in the JPanel?

    Hi,
    I want to replace a component in the JPanel. My panel has GridBagLayout.
    Thanks in advance.

    because my application demands me to use GridBagLayout.No it doesn't, that a choice you made. You are never forced to use a specific layout manager. In fact most layout problems are solved by using combinations of layout managers. You two main choices are:
    a) use a GridbagLayout for the main panel and then a CardLayout for the two components you want to sway, although it may look strange if the components are a different size as the preferred size of the panel will be the size of the largest component
    b) Simulate a card layout using:
    panel.remove(...)
    panel.add(...);
    panel.revalidate(...)

  • Replace Logical Component

    I need to complete a mass change of logical componets on my implementation project.  We initially were on ECC 5.0 with a logical componen on ECC.  We have recently upgraded to ECC 6.0 and have a new logical componeont of ECC_EHP.  In the Edit menu, there is an option to replace a logical component.  I can execute the step where I indicate what logical component I want to find and what logical component I want to replace it with, however, when I run it I receive a message:  "Logical Component Replc. Error".  Has anyone successfully got this to work?  Any help?

    I opened a message with SAP, the steps in their response worked:
    Start transaction SOLAR_PROJECT_ADMIN and open the project where
    you would like to replace the log. component.
    Here change to the tab: 'System Landscape' and select the tab 'Systems'
    Here now select the log. component you would like to replace and
    press the button: 'Replace. log component' at the bottom. (the second
    one from left)
    In the following popup select the desired log component.
    (if the one you are looking for is not visible, please press the
    button 'All logical components' and search for the one you would like)
    After you have selected the componet press the OK button.
    At the end you will receive a message that states that the logical
    component has been replaced.

  • SOLAR02-replace logical component

    Dear Friends,
      I am working with Solution Manager 4.0, patch level SP12. In SOLAR01 i have finalised my business structure. Now in SOLAR02, i have assigned some logical component to link to satellite systems. i am having about 500 transactions in SOLAR02. Later point of time i realized that i have wrongly assigned the logical components to my 500 transactions. Now i want to replace my existing logical component with new one.
    In Sol Man, i am having the option to mass replacement of logical component.
    (Ths path is,  Edit---Replace logical component)
    Here, i am entering, Log. Component to be Replaced &  Replace with logical component. If i do the consistency check, i am getting message that , " Log component SAPR3 can be replaced with ZSAPR3".
    But if i save, i am getting following error.
    <b>The requested object is locked by another transaction</b>
    <b>The details of the error is below:</b>
    The requested object is locked by another transaction
    Message no. MC602
    Diagnosis
    A lock requested by calling an ENQUEUE function module cannot be provided because the object in question has already been locked by its own transaction.
    Technical Information: The C_ENQUEUE routine returns the following values:
    COLLISION_OBJECT =  ESOLARTAB
    COLLISION_UNAME = ZS933SENTHIL
    System Response
    The ENQUEUE function module triggers an appropriate exception. If this exception was not intercepted by the application program, it leads automatically to the active SAP transaction being cancelled.
    Procedure
    Once the ENQUEUE function module is called, the application program should intercept this exception and react to it appropriately.
    Message Text
    The requested object is locked by another transaction
    Technical Data
    Message type__________ E (Error)
    Message class_________ MC (Aggregate: views, matchcodes, lock objects)
    Message number________ 602
    Message variable 1____ ZS933SENTHIL
    Message variable 2____ ESOLARTAB
    Message variable 3____ ZS933SENTHIL
    Message variable 4____ 
    Message Attributes
    Level of detail_______ 
    Problem class_________ 
    Sort criterion________ 
    Number________________ 1
    Please guide me to solve this problem.
    Regards
    senthil

    Hi Senthil,
    you have selected a tab that can contain logical components and then started the replace functionality. Select a tab that does not contain logical components (e. g. the gen. Documentation tab).
    Best regards,
    Michael

  • Replace logical component in Solution_directory

    Hi
    We have imported a project to Solution that used the logical component "ERP".
    The second proect was imported with its logical component "ERP2".
    This has turned out to be a wrong approach, and we want to replace the ERP2 component with "ERP".
    Does anyone know if this can be done without checking our productive solution out to the maintenance project and doing it here?
    I have tried, in the Solution to say "replace logical component", but apparently I cannot replace it with a component that is already in the Solution.
    Anyone???
    Kind regards
    Anja

    Hi Anja,
    if you have activated "Check-out/Check-in", it is not possible to replace the logical component in the solution, because it is only available in display mode. If it is possible for you to switch Check-out/Check-in" temporarily off, you can do the replacement via the menu "Edit --> Replace log. Comp...".
    Best regards,
    Michael

  • How to migrate Stellent 7.5.1 custom layout component to OCS 10gR3

    Hi,
    I am in the process of upgrading stellent 7.5.1 to OCS 10gR3. There is a custom layout component in 7.5.1 wanted to find out how can I migrate the layout component. As probably there are changes in 10gR3 so want to find out how to migrate the custom layout component and any changes required before migrating to 10gR3.
    Thanks.

    Hi
    am putting out the steps needed for upgrading an existing CS instance from version 7.5.1 to 10gR3. Its basically a 2 step process where we use Configuration Migration Utility to migrate the CS structure and Archiver to migrate the existing contents. The steps are as follows :
    1. Install a new CS 10gR3 instance on the server and configure it as per the install guide.
    2. Verify that the basic functionalities for the newly installed instance is working fine by doing some simple tests like checkin ,checkout , update etc. Then upgrade the CS to the latest patchset level which can be downloaded from http://updates.oracle.com/download/6907073.html.
    3. Install the latest version of Configuration Migration Utility component (which is found in the same uprgade patch set ) on both the 10gR3 CS (target) instance and the 7.5.1 CS (source).Enable them on both the CS instances and restart the same.
    4. Run the Configuration Migration Utility on the source CS and download the CMU Bundle created on it.
    5. Upload the CMU Bundle created in previous step to the Target CS and import the configurations from that.Verify that the CMU process is completed successfully on the Target CS instance.
    6. Create a new archiver instance on the Source CS and export all the contents in that.
    7. Open the Archiver Applet for the target CS instance and then Point the collections to the collections.hda of the source CS instance so that we can import the contents. Start the Import process on target server.
    8. Once the CMU and Archiver Process are completed then your 10gR3 CS would be an exact replica of the Source 7.5.1 Instance.
    You may also go through System Migration Guide to get more understanding on the Migration / Upgrade processes.
    Hope this helps
    Thanks
    Srinath

  • Adding a image in webcenter spaces using Image Layout Component

    Hi,
    i was trying to add a image in webcenter spaces using Image Layout Component , The following steps i did
    I placed some images in Webcenter server location .(c:/images)
    put the folder location in Image Source ( Image Layout Component Properties) as file://c:/images/top_image.jpg
    But the image did not display in WC. if i put some web url its working fine, so i just wonder whether we can point to a file location as the image source.
    Please reply me asap.
    Thanks,
    Swagatika

    I use this to add an image that I have saved in the applet folder
    Image image;
    public void init() {
    image = getImage(getDocumentBase(), "auburn.jpg");
    and I get this error when I try to run it in Jbuilder:
    java.lang.NullPointerException
         at java.applet.Applet.getDocumentBase(Applet.java:125)
         at JavaProject.<init>(JavaProject.java:103)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at java.lang.Class.newInstance0(Class.java:308)
         at java.lang.Class.newInstance(Class.java:261)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:617)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:546)
         at sun.applet.AppletPanel.run(AppletPanel.java:298)
         at java.lang.Thread.run(Thread.java:534)
    What could be the problem?

  • Page Layout component

    Hi,
    I'd like to implement a simple page layout component in my application. Users should be able to put text and image elements on a page, scale the image within a frame etc.
    I can start developing such a component but I wondered if there are any free or commercial components on the web somewhere?
    I did a search but found nothing.
    Anyone an idea?
    thx,
    Dany

    Kindly go through below link:
    [Web Dynpro ABAP Configuration|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/43/e86de5008b4d9ae10000000a155369/frameset.htm]
    Also check following things (which are generaly not required in normal enviornment):
    1) Check host file entry with server addres and server name
    goto start-> run-> type 'drivers' ->etc-> open host file in note pad -> make server entry
    2) check proxy settings of browser
    tools->internet options->connections->lan settings-> advanced->exceptions
    Regards,
    Saket

  • Replace the component name to universal?

    Hi!
    I have put some code into the "FocusLost" event of the jTextField. Here is it:
    private void jTFprobaFocusLost(java.awt.event.FocusEvent evt) { 
    if(jTFproba.getText().equals("wrong"))
    jTFproba.setBackground(Color.red);
    else
    jTFproba.setBackground(Color.white);
    jTFproba.setText("OK");
    It works, but I have about 20 similar TextBox in my application and I am interested in whether it is possible to replace the name of the component (jTFproba) to something universal like "this"?
    For example:
    private void jTFprobaFocusLost(java.awt.event.FocusEvent evt) { 
    if(this.getText().equals("wrong"))
    this.setBackground(Color.red);
    else
    this.setBackground(Color.white);
    this.setText("OK");
    But it does't work!
    Do you have any ideas to replace the component name?

    See the documentation of FocusEvent. It has a getComponent() method that I assume returns the component that has lost the focus (in your case, a JTextField instance). You can add the same listener to all JTextField instances, and cast the source to JTextField.
    It also has a getOppositeComponent() method that presumably returns the component that has gained the focus, if that matters.
    I assume for a focusGained() callback it's the contrary.
    Edited by: jduprez on Nov 4, 2010 2:55 PM
    Mixed method names, so reverted to a conservative "I assume" description

  • Replace a component by another in a Frame

    Hi all!
    I've a frame with several component (panels, buttons...) set with a gridbaglayout.
    I would like to know if i could replace a component by another.
    For instance.
    Frame f = new Frame();
    button b1 = new button("b1");
    panel p = new panel()....
    f.add(b1)
    /* replace b1 by p
    like :
    f.remove(b1);
    f.add(p);
    */Thanks!

    Sure, you can replace any component by enother one.
    add f.validate() in the end.

  • Flash CS4 Text Layout Component Problem

    Hi,
    We are trying to use multiple instances (around 25) of Flash
    CS4 Text Layout Component in one file to display arabic text. It
    works fine for some random number of instances. However, it gives
    problem if that number increases (The text doesnt show).
    Any help will be highly appreciated.
    Thanks!

    If you're referring to this:
    http://labs.adobe.com/technologies/textlayout/
    Then that's still in beta and you should take your discussion
    to the beta forum on that link.

  • *How to dynamically create a layout component*

    I have a table component that is bound to a database table ,I want to be able to add a layout component holding submit button and cancel button to the page at the end of the table component dynamically,so as to avoid the lenght of the table component overlaping the layout button.Pls I'll really appreciate a quick response.
    Thanks in advance.

    Hi!
    Try to read this:
    http://blogs.sun.com/winston/entry/button_header_table
    I hope it will help You.
    Thanks,
    Roman.

  • Replace logical component in solar01

    Hi,
    We have an issue with Logical component maintained in "transaction"  tab for business process under Project in solar01.
    Logical components for ERP systems have been changed from SAP ECC to SAP ERP. All ERP systems are now maintained in SAP ERP and corresponding Logical component. But the business processes mainatained refer logical component SAP ECC.
    We tried to replace and delete the logical components in solar_project_admin -> System Landscape but it does not allow to delete neither replace with new SAP ERP logical components.
    Get message "Logical component SAP ECC is still being used"
    Please help on solution.
    Thanks & Regards,
    Anthony.

    Thanks for reply.
    actually we tried to add new SAP ERP logical component and updated in the project.
    When we try to use Logical Component replace function we get below message :
    "The logical components SAP ECC and Z_ERP have different products"
    So the logical component in "transaction" tab still cannot be replaced.
    Moreover in few business process it does not list Z_ERP logical component to manually replace same in Logical component dropdown.
    we found one SAP note :
    SAP Note 1429697 - SMSY: Converting product versions
    this SAP note refers to a report SMSY_SWITCH_PRODUCT which can be used to switch logical componment SAP ECC to SAP ERP.
    But SAP ECC is used in atleast 15 more projects so need to know impact of running this report.,
    Thanks & Regards,
    Anthony

  • How to set up fixed height in ADF layout component

    I try to create a page by having my main content at the center of page within a box using a fixed height. The idea is when the content is too long, a vertical scrollbar should show up for that box instead of stretching that box. I tried to use trh:tableLayout and set height attribute for trh:cellFormat component. However, instead of showing a vertical scrollbar, it just stretches table cell. Does anyone have a solution to this issue? Thanks.

    Thanks for your fast reply. Yes, I already tried layout="vertical" which is not help. I am using JDeveloper 11.1.1.2.0. Actually what I want to do is I will display a block of information in a box area at the center of screen. If the information become too big for that box, I want a scrollbar to show up for that box instead of stretching that box to fit the content.

  • Replace the component after batch determination in the process order.

    Hi dudes,
    How we can replace component for which batch determination done with a new component in a process order. can any body suggest if its possible.
    thanks in advance.
    Robert

    Hi,
    i am not able to delete the component in the materials overview after the batch allocation done by batch determination rather giving batch manually.
    i.e if i give batch directly in the batch field i can able to delete that entire component row, but if do batch determination for that component once its done i can't  able to delete.
    thanks in advance
    Robert.

Maybe you are looking for

  • Problem with band names that start by "the"

    Since upgrading my iTunes to a newer version, it put all band names which start by "THE" (like for example "The Hives, The Beatles)into the "T"-Category!!! I just want it to put it in the right order again without deleting all these "The" letters fro

  • After Yosemite and iTunes 12 Upgrade

    My iPhone 6 will not appear or sync in iTunes and my Time Capsule backups stopped working.  Any ideas?

  • Can't Install CS2 Properly on WXP SP3

    Hi All, I recently bought Windows 7 and Adobe CS4 through my school's bookstore, well a few months ago. Before wiping out my XP install I made sure to do the "de-activiation" and for good measure, I even uninstalled CS2 (not sure if I really needed t

  • Keep zero in date format

    I've been searching and searching for this answer. I have a Date field in a form on LiveCycle. This is not a field that anyone enters the date, but it simply puts the current date in. I would like it to keep the 0's in the format.  So if the date is

  • VIEW PLSQL CODE GENERATED IN ETL MAPPING

    hi, can anyone help me to find the option in owb where i can view the plsql code generated after etl mapping thanks