Need help for traping imported java bean exception

hi everyone
i have imported a java bean into my forms 9i using java importer utility which tries to rename a file on a give path(bean works fine when executed through sql client).
i have problem when called from when button pressed trigger, it throws me an ("FRM-40735 and ORA-105101 NON ORACLE EXCEPTION") error.
i have imported java.lang.exception class and constructed an exception handler to trap java exception in the trigger
as
EXCEPTION
     WHEN ORA_JAVA.JAVA_ERROR then
          message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
          --check for ORA-105101
     WHEN ORA_JAVA.EXCEPTION_THROWN THEN
          ex:= ORA_JAVA.LAST_EXCEPTION;
          message('Java Exception --: '||BIException.toString(ex));
          ORA_JAVA.CLEAR_EXCEPTION;
     WHEN OTHERS THEN
          message('error :'||SQLERRM);
when i imported java.lang.exception i did not find any wrapper pl/sql function or procedure declared to read or get the error messages except for the functions named "new" ,my exception handler failed.
so i tried with BIException which also fails to trap the error i have no idea about BIException and its usage with in forms ,Please do help me out with this issue ASAP.
thanks in advance
Rgds
yash

Hi,
don't understand what the BIException is supposed to do in your code, can you try
     WHEN ORA_JAVA.EXCEPTION_THROWN then
     ex := ORA_JAVA.LAST_EXCEPTION;
     message('Exception: '||Exception_.toString(ex));
where Exception_ is the imported java.lang.Exception package.
Frank

Similar Messages

  • Need help in countdowntimer in java bean for jsp page

    hi..im student..i need help with countdowntimer in jsp page..with java bean component..im use XHTML MP for my jsp page so i can use it in cellular phone with WAP 1..can anybody help me with this problem..thx

    hi..im student..i need help with countdowntimer in jsp page..with java bean component..im use XHTML MP for my jsp page so i can use it in cellular phone with WAP 1..can anybody help me with this problem..thx

  • Need ideas for new PJC/Java Beans

    Hello everybody,
    I am always looking for new ideas about the Java Bean and PJC stuff. Sometimes I have good ideas about this, but sometimes it is quite a pain to find something new and innovative.
    If you have ideas or needs about this, let me know in this thread.
    (Sorry Oracle staff if I am going beyond my rights by using the Forum for that purpose)
    Francois

    Francois ,
    I think that we all need to thank you for all your hard work promoting Oracle Forms.
    Your input and constant support on this forum is greatly appreciated.
    But I personally think that all this needs to be addressed by Oracle.
    Your wrote
    Sometimes I have good ideas about this, but sometimes it is quite a pain to find something new and innovative.
    And I agree with you.
    You can go as far as the Forms let you go...
    Thanks,
    Michael

  • Need help for automated import/export of comments in XFDF

    Hi !
    I created 2 Buttons on my toolbar. One for send comments and one for receive comments! If I click the send button, a window opens and ask for the directory where I want to save the xfdf file.
    How can i realize, that I can save the xfdf-file automatic in a folder, which is specified in the javascript file? The same for import!
    In web I found:
    cExec: "this.importAnXFDF({bAnnotations: true, cPath: /c/PDFTest/Demo.xfdf});",     and
    cExec: "this.exportAsXFDF({bAnnotations: true, cPath: /c/PDFTest/Demo.xfdf});",
    but if click the button...nothing happens. How can I implement this??
    This is the sourcecode of the created config.js file
    var strtest= "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + // 0
    "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + // 1
    "FFE4DBD4FF8F9CC8FFD2D3E0FFDBDCD9FFC7E8F9FFC7E8F9FF999FC6FFEEEDEDFFFEFFFFFFB6C8E 7FFB2D0E3FFF8F8F8FFFFFFFFFFC2A47BFFD2BC9EFFD0B898FFEEEDED" + // 2
    "FFB0AFCDFFE7F2FBFFD1D1D0FFE4E4E4FFC3DAE7FFC7E8F9FF7674A5FFB3C9DCFFAAC4E8FF5D8FC 8FFB9D5E6FFD3C9D8FFFEFEFEFFC6AA84FFECE6DFFFFEFDFAFFD2C9C8" + // 3
    "FFC3DAE7FFB2BFCBFFA4B3C9FF9CB8D9FF7199B3FFA4B3C9FF8A8BBBFF9993A9FFAC9DA7FFA5989 2FF769BC4FFC6C2B8FFEEEEEFFFC2A47BFFF5F1ECFFAA8657FFD8D6D6" + // 4
    "FFDAD6E1FFDAD6E1FFCACFD3FF88899AFFB6AAB3FFD8D8D8FFE1E1E1FFE9E9E9FFEEEEEFFFE7E4E 5FF31312DFFDCDCDDFFFCFCFCFFF3F3F3FFCDBCA7FFC6C2B8FFE9E9E9" + // 5
    "FFEEE9E4FFE4E3EBFFE9E9E9FFE1E1E1FF9C966AFFDFDFDFFFD8D6D6FF8E3F43FF99987CFFCFBD6 FFFB7A289FFE9E9E9FFFFFFFFFFFFFFFFFFF8F8F8FFC6C2B8FFE6E6E6" + // 6
    "FFF9F9F9FFFDFDFDFFFEFEFEFFFFFFFFFFF9F9F9FFB0B0A5FFC5AE62FFE8D98FFF512C25FF845A4 3FFD2CC9FFFF3EAB8FFA79D79FF8C8674FFEBE5B6FFD6D7D7FFFBFBFB" + // 7
    "FFFBFBFBFFFEFEFEFFFFFFFFFFFFFFFFFFFDFDFDFFE4E4E4FF9F8940FFBDB689FFCFBD6FFFFBE89 1FFFDF4C0FFCFC384FFF3EAB8FFEBE5B6FFEDD26EFFDDDDDDFFFEFEFE" + // 8
    "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0C1C3FF616D6BFF6E7B79FF5D676 8FF616665FFDADBDBFFD8D6D6FFD9D9D9FFE6E6E6FFFBFBFBFFFFFFFF" + // 9
    "FFFDFDFDFFF8F8F8FFFFFFFFFFFFFFFFFFFFFFFFFFF6F6F6FF616D6BFF6E7B79FF5B6562FF525A5 8FF616D6BFF6B7574FFFBFBFBFFFDFDFDFFFFFFFFFFFFFFFFFFFFFFFF" + // 10
    "FFF5F5F5FF686C6CFF6E7B79FF6D7877FF6E7B79FF646F6EFF616D6BFF464B47FF969999FF383E3 CFF616D6BFF6B7574FF48504DFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFF" + // 11
    "FFFFFFFFFFFCFCFCFFECECECFFD5D6D6FFBABCBEFFC0C1C3FFDCDCDDFFEEEEEFFFFAFAFAFFF8F8F 8FFE9E9E9FF4D5653FF646F6EFF464B47FFF9F9F9FFFFFFFFFFFFFFFF" + // 12
    "FFFFFFFFFFFFFFFFFFF8F8F8FFE6E6E6FFDFDFDFFFDDDDDDFFE9E9E9FFF8F8F8FFFFFFFFFFFDFDF DFFF5F5F5FFB0B4B7FF5B6562FF565F5CFFF3F3F3FFFFFFFFFFFFFFFF" + // 13
    "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFEFEFEFFECECECFF525A58FFC0C1C3FFFEFEFEFFFFFFFF" + // 14
    "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFEFEFEFFF3F3F3FF868A8CFFFDFDFDFFFFFFFF" + // 15
    "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFEFEFEFFE9E9E9FFF8F8F8FFFFFFFF" + // 16
    "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + // 17
    "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + // 18
    "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"; // 19
    var pos = 0;
    var iconStreamObj = {
        read: function readMyIcon(nBytes){
            var t = "";
            console.println("request for " +nBytes);
            while (pos < nBytes){
                t = t+strtest;
                pos += strtest.length;
            return t;
        width:17,
        height:20
    // Create a toolbutton using the icon I loaded above
    app.addToolButton
        cName: "receive comments",
        oIcon: iconStreamObj,
        cExec: "this.importAnXFDF({bAnnotations: true });",
        cTooltext: "Press button for receiving comments!",
        nPos: 0
    var pos = 0;
    var iconStreamObj = {
        read: function readMyIcon(nBytes){
            var t = "";
            console.println("request for " +nBytes);
            while (pos < nBytes){
                t = t+strtest;
                pos += strtest.length;
            return t;
        width:17,
        height:20
    // Create a toolbutton using the icon I loaded above
    app.addToolButton
        cName: "send comments",
        oIcon: iconStreamObj,
        cExec: "this.exportAsXFDF({bAnnotations: true });",
        cTooltext: "Press button for sending comments!",
        nPos: 0
    Please help!!  Thanks

    Doc is the type of object, so you would not use Doc.exportAsXFDF.
    In most cases you can use "this", but be careful as "this" will not always refer to the current document, it will refer to whatever object you are currently working within the parameters of.
    The security restrictions are quite clear, but I will sum up just to be sure.  You CAN specify the cPath parameter in the following conditions:
    Batch Process
    Running the code manually from the console
    Executing exportAsXFDF through an OLE call via the JSObject from an external application written in C/C++/C#/VB.NET/etc.
    Those are the ONLY times that you can specify the cPath parameter in the exportAsXFDF call.  If you try to specify it in any other instance, the call will fail and nothing will be exported.  This means that you CAN NOT specify the cPath parameter from a document-level script, folder-level script, menu item call, etc.

  • !!!-Need help for terminating a Java thread in real time

    Hi everyone!
    I use J2SDK1.4.1 on a Unix platform.
    I want to terminate (or stop) a running java thread, which is dealing with time consuming tasks, in real-time (for example: the delay before the thread is terminated can't beyond one second), However, I don't know which techniques I can use to make sure the previous (or old) running java threads have been terminated?
    Could you please give me any help if you can?
    Any suggestion or reply will be kindly appreciated!
    Thanks!

    Thanks very much, jverd !
    I do set a flag that the thread should periodically check !
    Well, the scenario is like this:
    1. the thread read line by line (using BufferedReader) string from a probably huge-size file
    2. analyse each string read from the file if required (some strings may be omitted based on the user's operations), the analyzing process is a time-consuming task, and the analysing process may be terminated at any time the user want.
    3. record only the strings that have been analyzed by the previous process into a recording file
    The problem I meet is as follows: (Here, I suppose that it should take at least 30 seconds to finish analyse all the strings in a given huge file )
    1. the user start the analysing process, and run it for only 5 seconds,then stop the analyzing.
    2. the user start the analysing process again from the begining of the file(analyse the strings within the same file as previous step), and then stop the analysing process at 10 second. (it means, this time the analysing process is running for 10 seconds, still haven't finish analyse all the strings in the file).
    Once I open the record file, I saw some of the strings in the recording file have been repetitively record for 2 times, and the repetitive strings are just the strings the analysing time from at 5 second to at 10 second.
    And the repetitive times are depend on how many time the user start and stop the analysing process using the same file. for example, based on the above two steps, the user do the third step as follow:
    3. the user start the analysing process once again, analyse the same file,too. And run it for 15 seconds
    This time open the recording file, this time I saw some of the strings have been repetitively record for 3 times, and the repetitive strings are just the strings the analysing time from at 10 second to at 15 second.
    So, I guess the problem is probably because the previous analysing threads haven't been terminated completely, or say they just are blocked or set as inactive etc., then when the next time start the analysing process, the old threads will be reactive,and rerun ffrom the last time they are blocked.
    I hope you had catched what I mean, if you not, please ust let me know, I'll try to explain it again.
    Thanks once again!

  • Hey need help reading images using java bean

    Hey everyone,
    I will like to read some images from a directory using Java and display it on a JSP page, how do I accomplish this,
    thanks
    KT

    What happen is, I have to display 52 card depending on string concatenation, I have a java file that takes two elements from an array, depending on the two strings concatenation I want to display an image on a jsp page, any ideas on how to accomplish this?

  • Need help for importing oracle 10G dump into 9i database

    hi, Someone help me to import oracle 10G dump into 9i database. I'm studying oracle . Im using oracle 10G developer suite(downloaded from oracle) and oracle 9i database. I saw some threads tat we can't import the higher version dumps into lower version database. But i'm badly need help for importing the dump...
    or
    someone please tell me the site to download oracle 9i Developer suite as i can't find it in oracle site...

    I didnt testet it to import a dump out of a 10g instance into a 9i instance if this export has been done using a 10g environment.
    But it is possible to perform an export with a 9i environment against a 10g instance.
    I am just testing this with a 9.2.0.8 environment against a 10.2.0.4.0 instance and is working so far.
    The system raises an EXP-00008 / ORA-37002 error after exporting the data segments (exporting post-schema procedural objects and actions).
    I am not sure if it is possible to perform an import to a 9i instance with this dump but maybe worth to give it a try.
    It should potentially be possible to export at least 9i compatible objects/segments with this approach.
    However, I have my doubts if this stunt is supported by oracle ...
    Message was edited by:
    user434854

  • Need help in my assignment, Java programing?

    Need help in my assignment, Java programing?
    It is said that there is only one natural number n such that n-1 is a square and
    n + 1 is a cube, that is, n - 1 = x2 and n + 1 = y3 for some natural numbers x and y. Please implement a program in Java.
    plz help!!
    and this is my code
    but I don't no how to finsh it with the right condition!
    plz heelp!!
    and I don't know if it right or wrong!
    PLZ help me!!
    import javax.swing.JOptionPane;
    public class eiman {
    public static void main( String [] args){
    String a,b;
    double n,x,y,z;
    boolean q= true;
    boolean w= false;
    a=JOptionPane.showInputDialog("Please enter a number for n");
    n=Double.parseDouble(a);
    System.out.println(n);
    x=Math.sqrt(n-1);
    y=Math.cbrt(n+1);
    }

    OK I'll bite.
    I assume that this is some kind of assignment.
    What is the program supposed to do?
    1. Figure out the value of N
    2. Given an N determine if it is the correct value
    I would expect #1, but then again this seem to be a strange programming assignment to me.
    // additions followI see by the simulpostings that it is indeed #1.
    So I will give the tried and true advice at the risk of copyright infringement.
    get out a paper and pencil and think about how you would figure this out by hand.
    The structure of a program will emerge from the mists.
    Now that I think about it that advice must be in public domain by now.
    Edited by: johndjr on Oct 14, 2008 3:31 PM
    added additional info

  • Importing Java Bean Model in Webdynpro Development Component

    Hi All,
    Is there any simple tutorial, example  to import java bean model in webdynpro development component.
    I am using NWDS 7.0 SP14 and WAS 7.0.
    it really helps if you can  provide simple EJB as a development component with details how to create a public part and using this bean as java bean model in Webdynpro development component.
    what are the steps to be followed with precautions
    Thanks in Advance,
    Murali

    Hi,
    [Using the Java Bean Model in Web Dynpro|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4072c0d0-c21e-2b10-ab84-e2c183d355de]
    [Using EJBs in Web Dynpro|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e93a5c]
    you will get more if you search in the forum.
    more help on EJB's
    Re: Help needed in EJB
    http://help.sap.com/saphelp_nw70/helpdata/EN/19/f9bc3d8af79633e10000000a11405a/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70929198-0d36-2b10-04b8-84d90fa3df9c
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e93a5c
    PradeeP

  • Need help for flash builder

    i need help for flash builder 4 and papervison 3d. I need to create a slider with it ranges of value from 10 to 50 to adjust the camera values for the camera.fov and also need to create it for the yaw of the object from 0 to 360. I try to look for any slider event and classes in this program but cant find any, btw, i need to use the AS only project file.
    here is my codes:
    can you please tell me how i should modify the codes?
    package
        import flash.display.BitmapData;
        import flash.display.Sprite;
        import flash.events.Event;
        import org.papervision3d.materials.BitmapFileMaterial;
        import org.papervision3d.materials.BitmapMaterial;
        import org.papervision3d.objects.primitives.Sphere;
        import org.papervision3d.view.BasicView;
        [SWF (width="800", height="600", backgroundColor="0x000000",frameRate="30")]
        public class EarthBitmap extends BasicView
            private var sphere:Sphere;
            public function EarthBitmap()
                super(800 , 600);
                var earthmaterial:BitmapFileMaterial = new BitmapFileMaterial("../assets/Earth.jpg");
                sphere = new Sphere(earthmaterial,100,20,18);
                camera.fov = 25;
                scene.addChild(sphere);
                addEventListener(Event.ENTER_FRAME,rotateSphere);
            public function rotateSphere(evt:Event):void
                sphere.yaw(0.2);
                singleRender();

    Turn the click handler into a full on separate function. Then store all the views in an array and use Math.rand() to randomly choose one.
    Something like this:
    <fx:Script>
         <![CDATA[
              var questionsArray:Array = {question2,question3,question5,questionRed,questionGeography};
              function buttonClickHandler(event:MouseEvent){
                   var randomProblem:int = Math.floor(Math.random()*(questionsArray.length));     //generates a random integer between 0 and the total number of questions in the array (arrays are 0-based)
                   navigator.pushView(questionsArray[randomProblem]);
         ]]>
    </fx:Script>
    <s:Button id="randomProblemButton" label="Next Problem" click="buttonClickHandler(event)" />
    Haven't tested that, but something along that line should work

  • Need help for writing extract program

    hi
    i need help for writing extract program to retriew data from legacy system.
    i already developed bdc programs for me31k and me21.
    my requirement is to write extract program s for those t.codes.
    to retriew data from legacy system and stored in flat file.

    i need help with a java program. it is a program that allows the user to enter a student's GPA, number of extracurricular activities, and number of service activities. The user can not enter a gpa above 4.0 or below 0. The user can not enter a negative number for the number of both activities. If the student meets the following criteria: 1) GPA of 3.8 or above and at least one extracurricular activity and one service activity, 2) GPA below 3.8 but at least 3.4 and a total of at least three extracurricular and service activities, 3) GPA below 3.4 but at least 3.0 and at least two extracurricular activities and three service activities, the message "Scholarship candidate" should display. If the student does not meet the criteria above, then the message"not a candidate" should display. Can you help me, please?
    You haven't posted ANY 'java program' for us to help with.
    The forum is NOT a coding service. It is to help you with YOUR code.
    Post the code you have written and SHOW us (don't just tell us) how you compile it and execute it and the results you get. Then we can help you with any problems you are are having.
    If you need help understanding just what the program should be doing you need to ask your instructor to clarify the assignment.

  • Need Help for Blackberry8700g

    I need help for Blackberry8700g, It is the error message Java.lang.outofmemory Error. I can not make even phone calls. After reset it is same message pop up and does not off the power jum error523 

    You are in line to wipe and reload the OS on the BlackBerry.
    Follow the directions here and you will be fine.
    http://www.blackberryfaq.com/index.php/How_do_I_wipe_the_BlackBerry_using_Jl_Cmder%3F
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • I need help for Blackberry8700g

    New User! I need help for Blackberry8700g; It is the error message Java.lang.outofmemory Error. I can not make even phone calls. After reset it is same message pop up and does not off the power jum error523  100408 .I tried How_do_I_wipe_the_BlackBerry_using_Jl_Cmder%3F but it does not allow me to log in.Thanks,Rehan

    check this instruction:
    http://crackberry.com/blackberry-101-lecture-12-how-reload-operating-system-nuked-blackberry

  • Need help for code

    Hi friends,
    I need help to get the java code to be used in netbeans 5.0
    I have to develop:
    1. Merge files using JFileChooser in netbeans 5.0
    2.Create files in the format .html, .doc, .pdf, etc
    3. Browse the file and attach to the MS Outlook
    Can anybody help me out plz to get the code for this or any reference from where I can understand the code for the same.
    Edited by: vinodmatlani81 on Oct 28, 2007 2:05 PM

    You must be using an old Google version, mine found lots of stuff:
    1. Merge files using JFileChooser in netbeans 5.0\\
    Depends on what you're merging, but here's Sun's basic IO tutorial: http://java.sun.com/docs/books/tutorial/essential/io/
    How to use the JFileChooser: http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html
    2.Create files in the format .html, .doc, .pdf, etc\\
    For HTML, see the basic IO tutorial.
    PDF: http://www.lowagie.com/iText/
    DOC: http://schmidt.devlib.org/java/libraries-word.html
    3. Browse the file and attach to the MS Outlook\\
    http://www.sun.com/software/products/calendar_srvr/connector/index.xml

  • I need Help for that program

    i do aprogram for sample calculator by Java there it , i Hope if u have any sugesst say to me Or if u have a program for that.
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Z extends Applet implements ActionListener {
         int n4=0;
         StringBuffer E;
         Character x;
         String s;
         TextField T1;
         public void init(){
              T1=new TextField(20);
              this.add(T1);
         Button a=new Button("2");
         this.add(a);
         a.setActionCommand("2");
         a.addActionListener(this);
         Button b=new Button("3");
         b.setActionCommand("3");
         this.add(b);
         b.addActionListener(this);
         Button d=new Button("-");
         this.add(d);
         d.setActionCommand("-");
         d.addActionListener(this);
              Button f=new Button("+");
         this.add(f);
         f.setActionCommand("+");
         f.addActionListener(this);
    Button c=new Button("=");
         this.add(c);
    c.setActionCommand("+");
    c.addActionListener(this);}
    public void actionPerformed(ActionEvent y){
         s=(y.getActionCommand());
         E=new StringBuffer();
                   x= new Character (s.charAt(0));
         E.append(x.charValue());
              if(E.length() ==3){
                   Character n=new Character(E.charAt(0));
                        Character m=new Character(E.charAt(2));
                   int n1=Integer.parseInt(n.toString());
                   int n2=Integer.parseInt(m.toString());
              if(E.charAt(1)=='+'){
                   n4=n1+n2;}
                   if(E.charAt(1)=='-'){
                   n4=n1-n2;}
                   if(E.charAt(1)=='*'){
                   n4=n1*n2;}
                   if(E.charAt(1)=='/'){
                   n4=n1/n2;}
                   if(s=="="){
                   T1.setText(String.valueOf(n4));
         

    the program is used for do acalculature, i want to know ,why he donot work? .The idea of that program it
    When u click in any number(button) the action performed get that number , and store it in StringBuffer which that stringbuffer enabel me to store three things(the first number, the sign which be *or+, and the secand number)
    and then put the result in variable and then put the result as aString in Text Field.
    I hope u can understand me now and help me for that program, If u donot understand me ,Please Sugesst to me how to do the calculature program.thanks
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Z extends Applet implements ActionListener {
         int n4=0;
         StringBuffer E;
         Character x;
         String s;
         TextField T1;
         public void init(){
              T1=new TextField(20);
              this.add(T1);
         Button a=new Button("2");
         this.add(a);
         a.setActionCommand("2");
         a.addActionListener(this);
         Button b=new Button("3");
         b.setActionCommand("3");
         this.add(b);
         b.addActionListener(this);
         Button d=new Button("-");
         this.add(d);
         d.setActionCommand("-");
         d.addActionListener(this);
              Button f=new Button("+");
         this.add(f);
         f.addActionListener(this);
    Button c=new Button("=");
         this.add(c);
         c.setActionCommand("=");
    c.addActionListener(this);
    public void actionPerformed(ActionEvent y){
         s=(y.getActionCommand());
         E=new StringBuffer();
                   x= new Character (s.charAt(0));
         E.append(x.charValue());
              if(E.length() ==3){
                   Character n=new Character(E.charAt(0));
                        Character m=new Character(E.charAt(2));
                   int n1=Integer.parseInt(n.toString());
                   int n2=Integer.parseInt(m.toString());
              if(E.charAt(1)=='+'){
                   n4=n1+n2;}
                   if(E.charAt(1)=='-'){
                   n4=n1-n2;}
                   if(E.charAt(1)=='*'){
                   n4=n1*n2;}
                   if(E.charAt(1)=='/'){
                   n4=n1/n2;}
                   if(s=="="){
                   T1.setText(String.valueOf(n4));
         

Maybe you are looking for

  • FCP 5.0 won't open

    I just installed the FCP studio. Now when I try to open FCP it closes as soon as it opens. Also, when I try to open a project that I had previously, I get the error-10660. I think the projects won't open because they were created on FCP 4.0. But i do

  • Web services Driver

    Is there any inbuilt feature in SES to receive events through webservices. Can anyone guide me by pointing to right documents. Thanks Lakshmi

  • With older imacs, is there a point when you SHOULDN'T upgrade to latest OS?

    I may have worded that poorly but basically what I'm after is this: I know Apple lists the compatible Macs going back X number of years with each OS update, but is there a point where one is better off staying put with say Mountain Lion on iMac 21.5

  • Login pages

    Where can I find a tutorial of how to create a login page from scratch?

  • Please verify core duo vs. core 2 duo speed comparison

    Hi, I was looking for RAM to upgrade my MacBook CoreDuo 512mb to 2gb, and found this: http://eshop.macsales.com/Reviews/MacBook/Testing/Memory_Benchmarks If you go down, there is performance comparisons b/t core duo and core 2 duo, and between differ