Updating the value in frame1 if changed in frame2

hi,
i have two frames....frame 1 has button calculate....frame 2 has button update which can update the data on frame two.....so the scene can be like that user might or might not want to update data on form 2 but in either case will calculate.....The approach that i was thinking of is that if i update it i store it in a JtextField2 on frame2 ...read the value in frame1 and compare with the value when updated wasnt hit....if values are same the result can be the standard value else it will store the value from JtextField.....now i have a question....
1) is this approach fine??.....How can i tell calculate that Update was hit or not?????...is there any way by which i can get that a button in frame2 was hit or not???
private void jButtonAction2Performed(java.awt.event.ActionEvent evt) {
            table1 t1 = new table1();                    //frame 2
            String a1 = t1.jTextField1.getText();   //frame2....reads the data from textfield 1
            String a4 = jTextField1.getText();  //frame1
           double anum1, anum4;
        anum1 = Double.parseDouble(a1);
         anum4 = Double.parseDouble(a4);
          double asum = anum1*anum4 ;
      System.out.println("i am NOT UPDATED value--> "+asum );
          String tabsum = t1.jTextField2.getText();    //text field2 has the updated value of the product with which asum will be compared
      double tsum1 = Double.parseDouble(tabsum);
     System.out.println("i am UPDATED value--> "+tsum1);for some reason it is not reading the content of jTextField2 of frame2 and showing the error -------> Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "jTextField2"
Thanks

or find a workaround?
but since am using NETBEANS making SSCCE takes me even longer thats why i was trying to do it myselfThen don't use Netbeans.
The point is to make a simple example that you understand. Once you get the simple example working you incorporate the knowledge you learned into your main program.
It makes no difference if a component is defined on a second frame or the same frame. As long as you have the correct reference you can update it from any frame.
We can't help you with your currently stated question, because the problem is probably contained outside the posted code. As I told you earlier, the problem is likely that you have an incorrect reference to one of your components. Since we can't see where you declared each variable we can't help you.

Similar Messages

  • Program updating the value with succeeding 0

    Hi
    We have got a problem.
    We have developed a program to update the value of the condition type. The upload file will have the SO, line item, condition type and value.
    In the background, the sales order change BAPI is called and the value of the condition type is updated. There is no bug in the program for this functionality with reference to the problem.
    When I upload, the value is getting uploaded correctly. But for some users, the value is updated with an additional 0 at the end. For example if 78 is the value of a condition type, the update happens as 780. The strange behaviour is that if I take that user id and password and upload in my laptop, the value is correctly uploaded without any addtional 0.
    We have checked the user profile of all the problamatic users. They are fine. The xls sheet decimal notation is checked and they are also fine. There is no bug in the program, as it is working fine for many users.
    What else should I be checking to solve this issue. An ABAPer advised to check the GUI level difference. I dont know how to do that but there should not be any such difference in the GUI versions for the users.
    Can somebody put some light on this issue.

    Hi Navaneetha,
    The Excel version is the same for you and the user?
    Can the same be debugged and rectified?
    Regards
    Saurabh

  • How to read and update the value of property file

    Hi,
    I am not able read the values from property file.
    Please tell me how to read and update the values from property file using Properties class
    This is my property file : - Config.properties its located in D:\newfolder
    Values
    SMTP = localhost
    Now i need to change the value of the SMTP
    New value :
    SMTP =10.60.1.9
    Pls Help me
    Thanks
    Merlin Rosina,

    Post a small (<1 page) example program that forum members can copy and run that demonstrates your problem.

  • How to update the value in xml file using transformer after setNodeValue

    Hi,
    This is my code
    I want to set update the values in xml file using transformer..
    Any one can help me
    This is my Xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <place>
    <name>chennai</name>
    </place>
    Jsp Page
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@ page import="javax.xml.parsers.DocumentBuilderFactory,
    javax.xml.parsers.DocumentBuilder,org.w3c.dom.*,org.w3c.dom.Element"
    %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    </head>
    <body>
    <% String str="";
    String str1="";
    try
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse("http://localhost:8084/XmlApplication1/sss.xml");
    out.println("Before change");
    NodeList n11 = doc.getElementsByTagName("name");
    Node n22= n11.item(0).getFirstChild();
    str1 = n22.getNodeValue();
    out.println(str1);
    out.println("After change");
    String name = "Banglore";
    NodeList nlst = doc.getElementsByTagName("name");
    Node node= nlst.item(0).getFirstChild();
    node.setNodeValue(name);
    NodeList n1 = doc.getElementsByTagName("name");
    Node n2= n1.item(0).getFirstChild();
    str = n2.getNodeValue();
    out.println(str);
    catch(Exception e)
    out.println(e) ;
    %>
    <h1><%=str%></h1>
    <%--
    This example uses JSTL, uncomment the taglib directive above.
    To test, display the page like this: index.jsp?sayHello=true&name=Murphy
    --%>
    <%--
    <c:if test="${param.sayHello}">
    <!-- Let's welcome the user ${param.name} -->
    Hello ${param.name}!
    </c:if>
    --%>
    </body>
    </html>

    hi check this exit...
    IWO10012

  • Function Module to Update the values in STPO!! VERY URGENT!!!!!!!!!!!!!!!!!

    Hi All,
    Can any one tell me is there any Remote function module to update the values of components in STPO table while creating Sales order BOM, Material BOM, and WBS BOM. For example I want to update the Spare Part Indicator for Item components based on Plant.
    Please do the needful..
    Regards
    Yathish

    Hi Naren,
    Thanks for ur reply,
    The BAPI that you have gave is to update only Material BOM. But I want to Change  and create spare part indicator for 4 BOM's, ie Sales Order BOM, Eqipment BOM and also Material BOM and WBS BOM.
    Can u please shed some light on it,so that it would be helpfull to me.
    Thanks
    Yathish

  • Is there a way to update the itunes match to reflect changes that i have made on my computer

    Every time i update itunes match it looses my alterations to my playlists and undoes any alterations to any albums i have made. Is there a way to update the itunes match to reflect changes that i have made on my computer?(Only copies new playlists and reverts old playlists to the way they were the first time I uploaded them) Any star ratings for albums are lost too if I put a star rating on them AFTER I first upload them to ITunes match.
    Any help would be greatly appreciated and Merry Christmas you guys!
    Mark O'Flaherty

    HI
    You don't need to select update iTunes match. It does not do what you expect!! You only need to make the changes and they will filter through to match naturally.
    jim

  • How do I update the value of a hidden field?

    Jsp has hidden field. The value of the hidden field is set.
    <%= RequestCtx.getSessionInfoAsHiddenParam() %>
    <INPUT type ="HIDDEN" name=billtoContactPartyId" Value="<%=billtoContactPartyId %>">
    Based on some logic I've added to the jsp. I want to update the value of the hidden field. This does not work. How do I update the value?
    windowForm.elements['billtoContactPartyId'].value = windowForm.elements['defaultcontactPartyId'].value;

    Hi,
    If you create a function to return wwctx_api.get_user you could
    call this inside an update trigger, you could put in an
    exception to return USER if there is an error, this would then
    work for users connected directly and users using Portal.
    Regards Michael
    e.g.
    CREATE OR REPLACE FUNCTION F_PORTAL_USER RETURN VARCHAR2 IS
         vRet VARCHAR2(50) := wwctx_api.get_user;
    BEGIN
         RETURN(vRet);
    EXCEPTION
         WHEN OTHERS THEN
              RETURN (USER);
    END F_PORTAL_USER;

  • How do we update the value of a textfield in a dialog box by clicking a button/ textbutton ?

    How do we update the value of a textfield in a dialog box by clicking a button/ textbutton ?

    Hi,
    If you create a function to return wwctx_api.get_user you could
    call this inside an update trigger, you could put in an
    exception to return USER if there is an error, this would then
    work for users connected directly and users using Portal.
    Regards Michael
    e.g.
    CREATE OR REPLACE FUNCTION F_PORTAL_USER RETURN VARCHAR2 IS
         vRet VARCHAR2(50) := wwctx_api.get_user;
    BEGIN
         RETURN(vRet);
    EXCEPTION
         WHEN OTHERS THEN
              RETURN (USER);
    END F_PORTAL_USER;

  • Api to update the values in per_periods_of_placement table

    Hi,
    can anyone let me know whether any hrms api is available to update the values in the table PER_PERIODS_OF_PLACEMENT.
    I want to update the values under the column TERMINATION_REASON in per_periods_of_placement for few set of contingent workers(for those a wrong reason was entered need to replace with correct value now).
    Please revert asap.
    Thanks,
    Jithendra

    Here is my stand alone PL/SQL block :
    I am supplying the start_date fro mthe per_periods_of_ placement table itself...
    DECLARE
    CURSOR get_cwk_details IS
    SELECT person_id cwk_person_id,
    object_version_number ovn,
    date_start service_start_date
    FROM per_periods_of_placement pdp, hr_lookups l
    WHERE l.lookup_type(+) = 'HR_CWK_TERMINATION_REASONS'
    AND l.lookup_code(+) = pdp.termination_reason
    AND HR_GENERAL.DECODE_LOOKUP ('HR_CWK_TERMINATION_REASONS',
    PDP.TERMINATION_REASON) = 'Deceased' ;
    l_person_id NUMBER(20);
    l_ovn NUMBER(10);
    l_date_start DATE;
    BEGIN
    FOR get_cwk_details_rec in get_cwk_details
    LOOP
    l_person_id := 153564;--get_cwk_details_rec.cwk_person_id;
    l_ovn := get_cwk_details_rec.ovn;
    l_date_start := get_cwk_details_rec.service_start_date;
    dbms_output.put_line('l_person_id = ' || l_person_id);
    dbms_output.put_line('l_ovn = ' || l_ovn);
    dbms_output.put_line(' l_date_start = ' || l_date_start);
    apps. hr_periods_of_placement_api.update_pdp_details(
    P_VALIDATE => FALSE,
    P_EFFECTIVE_DATE => l_date_start,
    P_OBJECT_VERSION_NUMBER => l_ovn,
    P_PERSON_ID => l_person_id,
    P_DATE_START => l_date_start,
    P_TERMINATION_REASON => 'DW');
    COMMIT;
    END LOOP;
    END;

  • Function module to update the values in STPO table :   VERY URGENT!!!!!!!!!

    Hi All,
    Can any one tell me is there any Remote function module to update the values of components in STPO table while creating Sales order BOM, Material BOM, and WBS BOM. For example I want to update the Spare Part Indicator for Item components based on Plant.
    Please do the needful..
    Regards
    Yathish

    For material bom: CSAP_MAT_BOM_CREATE
    and CSAP_ORD_BOM_CREATE for Order BOM.
    Regards,
    Ravi

  • Update the values in the table on select of a particular row

    hi
    I want to update the values in the table on selecting the particular row.
    im able to select the particular row using Leadselect.
    can any one help me in updating the values in the table?
    regards
    raji

    hi,
    values are coming from my database ( SQLServer.)
    on click of the button i am able to display the values from the database.
    My problem is on selection of any row , i should be able to edit/update the values in the table .
    regards
    raji

  • Function module for updating the values in table VTTK

    Hi,
    I am working on a report in which I need to update the value of field tdlnr of table vttk for a particular shipment number. I need to do this using functional module and I am not been able to find one. If anyone knows answer to this plz help.
    Thanks in advance,
    Priyanka.

    As noted above, RETURN table must be supplied empty, it is for BAPI to return the messages back to the calling program. You simply need to define an internal table, pass it to BAPI as is and then analyze this table after the BAPI call. For example:
    DATA: BEGIN OF it_return OCCURS 0.
            INCLUDE STRUCTURE bapiret2.
    DATA: END OF it_return.
    CALL FUNCTION 'BAPI_SHIPMENT_CHANGE'
    <...>
      TABLES
    <...>
        return = it_return.
    LOOP AT it_return.
      MESSAGE
           ID      it_return-id
           TYPE    it_return-type
           NUMBER  it_return-number
       WITH
                   it_return-message_v1
                   it_return-message_v2
                   it_return-message_v3
                   it_return-message_v4.
    ENDLOOP.
    Hope this helps.

  • Loop through xml and update the value

    I have the following xml table. I need to update the Field which name="data"
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <Root name="xyz">
    <Row id="1">
    <Field name="data">456</Field>
    <Field name="time">2005-02-08 10:43:51</Field>
    </Row>
    <Row id="2">
    <Field name="data">123</Field>
    <Field name="time">2005-02-08 10:43:16</Field>
    </Row>
    </Root>
    After update, the table should look like this
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <Root name="xyz">
    <Row id="1">
    <Field name="data">abc</Field>
    <Field name="time">2005-02-08 10:43:51</Field>
    </Row>
    <Row id="2">
    <Field name="data">edf</Field>
    <Field name="time">2005-02-08 10:43:16</Field>
    </Row>
    </Root>
    How do I update the value through java program? I do not want to load the data to database to update the value. The constrain is that i must have the value updated in java application before I loaded it to the database.
    Please any advise?
    Thank you!

    Use a DOM parser to parse the xml document...you will get a Document object, which you can use XPath or traverse the DOM tree and perform the updating.

  • How to update the value of setter and getter..!!

    Hii all i am developing an portal application in which i display the metadata information related to a document(Stored in UCM) in a popup in my application...
    The user can also update the information through the application.
    in my popup i have a trh : table layout in which i have a Select Onechoice field as
    <trh:cellFormat id="xcfcSecurityGrp">
    <af:selectOneChoice value="#{MetaDataFields.DSecurityGroup}" id="ddldSecurityGroup" showRequired="false"
    autoSubmit="true"
    immediate="true">
    <f:selectItems value="#{ContentDataBean.TSecurityGrpList}" id="si1"/>
    </af:selectOneChoice>
    </trh:cellFormat>
    The MetaDataFields.DSecurityGroup show the current security group on document
    and
    ContentDataBean.TSecurityGrpList provide the user with the list of security group to update.
    The current security group i am getting through a map which consist of metadata information for a document :-
    public void setDSecurityGroup(String dSecurityGroup) {
    this.dSecurityGroup = dSecurityGroup;
    public String getDSecurityGroup() throws IdcClientException, IOException {
    Map<String,String> mapValue=ep.getDocumentPropertiesSystem();
    dSecurityGroup=mapValue.get("dSecurityGroup");
    return dSecurityGroup;
    The problem is that whenever i am updating the value for the security group, i am getting the old value, the problem is that i have to every time get value from the map only as it consist metadata information for the current selected document..
    Is there is any way through which i can update the value for this field..??
    Thanks
    JDeveloper - 11.1.1.6.0

    Hi,
    Try binding ValueChangeListener on the selectList. Also set autoSumit property to true.
    Thanks,
    Pandu

  • How to update the value inside a field symbol ?

    ASSIGN COMPONENT 'MENGE' OF STRUCTURE <fs_line> TO <fs_field>.
    <fs_field> = itab_stpo-menge.
    COLLECT <fs_line> INTO <fs_table>.
    .processing some code......
    ASSIGN COMPONENT 'MENGE' OF STRUCTURE <fs_line> TO  <fs_field>.
    <fs_field> = ( itab_stpo-menge * itab_plpo-vgw03 ).
    COLLECT <fs_line> INTO <fs_table>.
    Hi, guys,
    May i know is there a way to update the value in inside a field symbol?
    I feel hard to figure out the way to solve this situation. Kindly give me some help or perhaos tell me other altenative way to do it also can.
    Thanks in advance.
    Edited by: Jiansi Lim on Apr 25, 2008 8:09 PM

    hi check this...
    For a structured data object s, you can use the statement
    ASSIGN COMPONENT comp OF STRUCTURE s TO FS.
    Here the comp is the component name or its index number in the structure.
    Find the following sample code -
    DATA: BEGIN OF LINE,
    COL1 TYPE I VALUE '11',
    COL2 TYPE I VALUE '22',
    COL3 TYPE I VALUE '33',
    END OF LINE.
    DATA COMP(5) VALUE 'COL3'.
    FIELD-SYMBOLS: <F1>, <F2>, <F3>.
    ASSIGN LINE TO <F1>.
    ASSIGN COMP TO <F2>.
    DO 3 TIMES.
    ASSIGN COMPONENT SY-INDEX OF STRUCTURE <F1> TO <F3>.
    WRITE <F3>.
    ENDDO.
    ASSIGN COMPONENT <F2> OF STRUCTURE <F1> TO <F3>.
    WRITE / <F3>.
    The output is:
    11 22 33
    33
    I need to update one field in Internal table
    regards,
    venkat

Maybe you are looking for

  • Can I install OS X Mountain Lion on my AMD based PC?

    Hi guys, I was just wondering, If I were to purchase a copy of OS X Mountain Lion, would it be compatible with my PC (currently running Win7 x64, will partition or get an additional hard drive) which is built using an AMD processor? Here are my specs

  • Problem after a hard reset

    I recently had a ecard problem (can recall what number) with my palm so I did a hard reset and now it wont pas from the part were it asks to tap the center of the target. What can I do.  Thank you for your help.  Sincerely Jose Roberto Castaneda   Po

  • VL10a - Dialog vs. Background

    Hi All, I need input regarding this scenario with tcode VL10a. I have a Sales Order and I create delivery for it through VL10a. My SO has 3 line items. When I process the SO in Dialog mode, a delivery is created for all three line items. When I use t

  • Purchase Order AIA

    Hi AIA community, I have a Purchase Order AIA interface developed using SOA 11.1.1.5. The are 5 components: File Adapter to pick up the PO file, Requestor ABCS, EBS, Provider ABCS, and a DB adapter to insert into target system. This interface is work

  • Exception thrown during OSM7 installation-unresolved lib references

    Hi, I am using jdevstudio11113install.exe to install WL Server + ADF. During OSM 7.0.3 installation, i am getting exception as <Oct 17, 2012 4:53:31 PM IST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with