Why Overridden method do not throw Broder exception

Why Overridden method of derived class do not throw Broder exception than the method that is in base class

Why Overridden method of derived class do not throw
Broder exception than the method that is in base classWhat is a Broder Exception?
I don't understand your question?
You are asking something about overriding a method:
http://java.sun.com/docs/books/tutorial/java/IandI/override.html

Similar Messages

  • LookupXRef not throwing any exception

    Hi All,
    We are using ESB Cross referencing out of box functionality provided with 10.1.3.3 SOA Suite.We have a case where we need to have some busineess logic when the value we are trying to look up in the Cross Ref table doesnot exists , in that case we tried to use needAnException(set to true()) field in the lookupXRef function inside the transformation.However its not throwing any exception in the BPEL Process.Instead it is avoiding other fields in getting populated underneath it in that complex type.As a result we are losing important business data inside the BPEL Process.Same is the case for PopulateXRefRow function as well while we are trying to insert a duplicate value into the Cross referencing table from BPEL Process.
    We need an exception for the above two cases.Are there any work arounds for these.
    We are in an urgent need of it.Can any one help us?
    Regards,
    Venkat.

    hi,
    after using XREFTOOL to create my cross referencing:
    D:\productORACLE\10.1.3.1\SOA\Oracle_1\integration\esb\bin>xreftool.bat -shell
    listTablesTotal number of xref tables: "1"
    No. TableName
    1. MONREF
    listColumns MONREFTotal number of columns for xref table "MONREF" : "2"
    No. ColumnName
    1. SAP
    2. SIEBEL
    >
    i try to use (after a reboot of soa suite), xpath function xref:populateXRefRow inside a assign task of my bpel 10.1.3.3.
    i have the following exception :
    Message handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessage"; the exception is: XPath expression failed to execute.
    Error while processing xpath expression, the expression is "xref:populateXRefRow('monref','sap','123','siebel','2','ADD')", the reason is FOTY0001: type error.
    Please verify the xpath query.
    ORABPEL-05002
    Message handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessage"; the exception is: XPath expression failed to execute.
    Error while processing xpath expression, the expression is "xref:populateXRefRow('monref','sap','123','siebel','2','ADD')", the reason is FOTY0001: type error.
    Please verify the xpath query.
    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:171)
    at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
    at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
    at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    Is there a solution or did i miss something ??
    i try to use the same xpath function inside a ESB project (xslt transformation)
    <xsl:value-of select='xref:populateXRefRow("MONREF","SAP",/tns:name,"SIEBEL",ora:generateGUID(),"ADD")'/>
    and i've got the error message :
    XML-22016: (Error) Extension function namespace should start with 'http://www.oracle.com/XSL/Transform/java/'.

  • Why constructor of rmi server throws remote exception

    why is it that the constructor of the class extending UnicastRemoteObject i.e rmi server has to throw RemoteException?

    Writing an RMI server is a matter of defining a class, exporting it when constructed and implementing one or more remote interfaces. How to export?
    auto export happens when u call super() in the constructor. It is then registered with the rmi system and made to listen to a TCP port. The various constructors for UnicatRemoteObject allow the derived classes to export at the default port.
    Because this automatic export step occurs at construction the constructors throw this exception.

  • Why a method can not be invoked in JSP ???

    I define a method in a JAVA Class file,as this:
    public Enumeration getElementsNamed(String name, String parentname) {
    Element elem = doc.getDocumentElement();
    NodeList nodes = elem.getElementsByTagName(name);
    int size = nodes.getLength();
    Vector elemVec = new Vector(size);
    for (int i = 0; i < size; i++) {
    Node node = nodes.item(i);
         if (nodes     .item(i).getParentNode().getLocalName().equals(parentname)) {
              elemVec.addElement(new UddiObject((Element) node));
              return elemVec.elements();
    I want to get a Element who's Localname is the name and his parent Element's laocalname is the parentname from a DOM tree.
    This can be run well in a normal Java environment just as JDK1.4.
    and is a JSP file,I import the Class first.
    and invkoed the method in somewhere, the TOMCAT give me an error:
    The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException     
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    the JSP file is :
    <%@ page import="java.util.*,org.w3c.dom.*, edu.hunnu.uddi.*, java.sql.*,java.io.*,edu.hunnu.uddiserver.util.*,edu.hunnu.uddiserver.inquiry.*" %>
    <h1>Get tModel</h1>
    <%
         Connection con = SqlConnection.getConnection();
    String Description="";
         String detail ="<get_tModelDetail generic=\"2.0\" xmlns=\"urn:uddi-org:api_v2\"><tModelKey>"+tModelKey+"</tModelKey></get_tModelDetail>";
         ByteArrayInputStream bas = new ByteArrayInputStream(detail.getBytes());
         TModelDetails tmodelDetails = new TModelDetails( new Get_TModelDetail(bas), con);
    UddiObject obj=tmodelDetails.getData();
         obj=obj.getElement(UddiTags.TMODEL);
         Description=Description+((TModel)obj).getDescription();
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              Error at this
              %>
    <%%>
    WHY??? and HOW????

    oh~It is my mistake.
    and the JSP file would be:
    <%@ page import="java.util.*,org.w3c.dom.*, edu.hunnu.uddi.*, java.sql.*,java.io.*,edu.hunnu.uddiserver.util.*,edu.hunnu.uddiserver.inquiry.*" %>
    <h1>Get tModel</h1>
    <%
         Connection con = SqlConnection.getConnection();
    String Description="";
         String detail ="<get_tModelDetail generic=\"2.0\" xmlns=\"urn:uddi-org:api_v2\"><tModelKey>"+tModelKey+"</tModelKey></get_tModelDetail>";
         ByteArrayInputStream bas = new ByteArrayInputStream(detail.getBytes());
         TModelDetails tmodelDetails = new TModelDetails( new Get_TModelDetail(bas), con);
    UddiObject obj=tmodelDetails.getData();
         obj=obj.getElement(UddiTags.TMODEL);
         Enumeration enum=obj.getElementsNamed("description","tModel");
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              Error at this
              %>
    and the variable "obj" :
    <tModel operator="www.hunnu.edu.cn"tModelKey="uuid:50C693A0-7AB8-11D5-93A0-CFE2D4CCB519"><name>simple.services</name><description>This is a basic tModel for service providers and consultant</description><overviewDoc><overviewURL>http://www.hunnu.edu.cn</overviewURL><description>Service documentation can be obtainedfrom the URL provided</description></overviewDoc><identifierBag/><categoryBag/></tModel>

  • Persist does not throw any exception in a JUnit test

    I am implementing a JUnit test using Toplink as JPA provider. I must be missing something because I try to persist two times the same entity and no exception is thrown. Neither PersistenceException nor any other type of exception. The code cannot be easier:
    @Test
    public void testAddExistingTeam() throws Exception {
    Team team = new Team("team2");
    try{     
    EntityManagerFactory emf =
    Persistence.createEntityManagerFactory("fofo");
    EntityManager em = emf.createEntityManager();
    em.getTransaction().begin();
    em.persist(team);
    em.persist(team);
    em.getTransaction().commit();
    em.close();
    catch(Exception e){
    e.printStackTrace();
    Notice the two em.persist(team).
    This code does not seem to either enter the catch block or produce any sort of exception. On the other hand, I have checked that after the first
    em.persist(team); the team is really managed.
    The relevant parts of the Team class definition follow:
    @Entity
    @Table (name ="TEAM")
    public class Team implements Serializable {
    @Id
    @Column (name="NAME")
    private String name;
    @ManyToOne
    @JoinColumn (name="CLUB_NAME", referencedColumnName="NAME")
    private Club club;
    private Category category;
    private String email;
    @ManyToMany(mappedBy="teams")
    private List<Competition> competitions;
    public Team (String name){
    this.name = name;
    this.club = null;
    this.competitions = new ArrayList<Competition>();
    ....getters/setters....and more constructors.
    I am really puzzled by this issue. Somebody could help??? I would be really grateful!!!
    Josepma

    This is expected behavior as persist is a no-op if called on a managed entity (other than to cascade over relationships marked with cascade.Persist), and the first persist call makes the passed in team entity managed.
    Try calling em.flush(); and em.clear(); between the persist calls to get an exception.
    The first flush will ensure the team is inserted in the database, while clear will detach it so that the second persist call will try to insert the team. JPA providers are not required to throw the entityExistsException on persist - it can be delayed until the transaction is flushed or committed, so you are likely to get a PersistenceException from the commit instead of EntityExistsException from persist.
    Best Regards,
    Chris

  • Dbms_job.submit - job is restarting but - not throwing any exceptions

    We have a job that is a simple loop that looks for (wakes up by) looking for messages coming in using DBMS_PIPE.
    The job has been restarting arbitrarily but - we're not seeing messages generated via any of the associated exception handlers.
    No idea why it's restarting when it fails.... currently - I'm just looking for a way to have the dbms_job.submit call NOT automatically restart if it has issues.
    Currently just calling as such:
    DBMS_JOB.submit(jobno, 'pkg_package.listen;');
    Running on 10.2.0.4.0
    Any insight is appreciated.
    Is there a way to prevent it from automatically restarting and - is there something I should be looking for specifically around dbms_job when it comes to the exception handling in the packages/procedures it's running??
    Thanks.

    We generate a log record in a table using an autonomous procedure when an exception is raised.
    Where I'm seeing the log records stating an issue with the job - I'm also seeing the tracefile / alerts being generated.
    When the job starts - we log a record stating it's started....
    In many instances - I'm seeing it log a start but - there's no corresponding trace file (i.e. - it wasn't manually started - it was processing and - then - without exception 'died' - didn't generate an error but - just started up again).
    I've no idea what's going on here. I've validated that everywhere through the underlying package the job is running that the exceptions are being logged. Yet - it's arbitrarily starting up again on some occassions (and - I can't seem to find any general commonality around when this is happening or - what would be causing it).
    So - I'm thinking this is an issue with the DBMS_JOB or - something else funky going on....
    As an FYI - This job is simply a loop that waits to receive a message on DBMS_PIPE that then fires off a package procedure when it receives the message.
    In the interim - to alleviate data issues as a result of it processing the same data twice - I'm trying to prevent it from auto restarting... is there a way to do this?

  • Why my method can not receive the string from JNI

    JNIEXPORT jstring JNICALL Java_playaudio_BeatTrack_myBeatTrack
    (JNIEnv *env, jobject obj, jstring wavfile)
    const char* filename = env->GetStringUTFChars(wavfile,0);
    BeatTrack(filename);
    env->ReleaseStringUTFChars(wavfile,filename);
    return NULL;
    }for my BeatTrack method, I just need the filename, then it can run, if I comment the BeatTrack(filename);, then no problem, for the java calling, of course, my BeatTrack(const *char filename) has no problem, cause I have test it,,
    but I call this method in java, the error is as follows,
    Java VM: Java HotSpot(TM) Client VM (10.0-b19 mixed mode, sharing windows-x86) # Problematic frame: # C [beattrack.dll+0x130b] # # An error report file with more information is saved as: # D:\programs\playAudio\hs_err_pid11684.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. any idea??

    1) What class is "missing?"
    2) Where is it?

  • Why my method is not working can anyone tell me plz how to write the 2darry

    public class fourth {
    int z;
    int h;
    public int[][] table(int z)(int h ){
    int[][] two = new int[z][h];
    for (int i=0; i < z; i++) {
    for (int j = 0; j < h; j++) {
    two[z][h] = (int) (z * h);
    return two;
    }

    I hope you are looking for the following code.
    Try to learn the syntax, it will help you in writting code.
         public class fourth {
              int z;
              int h;
              public int[][] table(int z, int h) {
                   int[][] two = new int[z][h];
                   for (int i = 0; i < z; i++) {
                        for (int j = 0; j < h; j++) {
                             two[z][h] = (int) (z * h);
                   return two;
         }

  • Why lookup method waits for the crossover cable to plugged in?

    Hi all,
    In solaris 220 machine i am facing the following problem While executing lookup method.
    If the crossover cable is properly connected lookup method is working fine.
    If the crossover cable is unplugged, lookup method is waiting indefinitely until the cable is plugged in. (Lookup method is not throwing any exception )
    Is there any way to avoid this ?
    Please help me with this issue..
    Thanks in advance...

    Hmmm.. well I tried the idea of establishing the connection using the Network Browser feature of Classic os9 under the brand new twin 2.7Ghz powermac I have to the old clone, and found a bunch of missing extensions inc. the Network Browser!
    This is an untouched Classic OS9 install of 9.2.2 that came with the Tiger OSX that came with the machine, but using the folders and prefs. ported over from a 10.3.9 machine I was running an account on using the Migration Assistant. The Extensions manager on the new powermac cant find the file cuz it wasnt installed under Tiger, obviously...
    Is Apple suggesting not to try networking in the classic layer? Is it an experiment I shoudnt bother with?
    I have no idea why an OS 8.5 machine can see the Tiger tower, but not connect... and why the Tiger cant see the old 8.5 thats on the clone Im trying to directly Cat5 cable over to through the network card... this is frustrating... would be nice to get the clone without monitor to be a part of this grouping , to become a lackey/drone/server of sorts....

  • PrintWriter methods throw NO exceptions!

    Hi,
    According to the PrintWriter javadoc:
    "Methods in this class never throw I/O exceptions. The client may inquire as to whether any errors have occurred by invoking checkError()."
    I think this sounds strange in Java language, since it has the Exceptions mechanism...does any one know the reason why it is like this?
    Regards

    With unchecked exception, it will still terminate my function mid-way!
    Here is a concrete example:
    public void method1() {
       try {
          ... open database then read 1 entry ...
          file.println("Entry is "+x);
          method2();
          ... close the DB connection properly.
       } catch(DBException ex) {
          ... deal with the DB failure accordingly
    public void method2() {
       try {
          ... open a webconnection then read 1 webpage ...
          file.println("Webpage is" + y);
          ... now close the web connection
       } catch(webException ex) {
          ... deal with the Web failure in a web-specific way
    }If println throws exception (checked or unchecked), then I must wrap method1 AND method2
    in yet another try/catch block. Otherwise, the function will die halfway, and my database or web connection
    will be in a funky state.
    By not throwing any exception (unless OutOfMemory or other dire situation),
    I can write method1 and method2 without worrying about it.
    And then at the end, I just check to see if all the writes succeeded or not.

  • GetBlobReferenceFromServerAsync (and non-async) throw an exception with 404 (not found) if the blob doesn't exist.

    I'm trying to determine if a particular file exists in a blob store. I'm using container.GetBlobReferenceFromServerAsync and if the named blob does't exist I get an exception with a 404. ICloudBlob (which is returned by the method) defines an Exists method
    but it's functionally useless because the GetBlobReferenceFromServerAsync method call itself throws the exception. I do get the behavior I'm looking for if I call container.GetBlockBlobReference instead but there's no async version of that method.

    As I said I'd found that GetBlockBlobReference works but there's no async version of that method. I'm trying to determine IF a blob exists not create one. Since the GetBlobReferenceFromServer returns an ICloudBlob and ICloudBlob defines and Exists method
    you'd assume that it could be used to determine if a blob exists. I'd argue that the fact that it throws and exception when the blob does not exist is a bug in the implementation because it makes the Exist method on the ICloudBlob object functionally useless.
    Also, it seems like a fairly significant miss that there's no async version of GetBlockBlobReference. A query to a cloud resource is exactly the perfect use case for the async/await pattern.
    Does anyone know of an async way to check for the existence of a blob that doesn't involve catching a 404 exception?

  • How to throw an exception that is not treated as error

    Hi,
    I have a repository manager displayed as /root/myrepository. Now when someone who's not authorized clicked it, I wish an error message will display on top in red, but not throw an exception as System Error.
    Now my implementation is to throw an ResourceException in getChildren() of the node. But when the user clicked on /root/repository, a System Error screen appeared, but what I want is just an error message.
    Any help is much appreciated~
    I don't know how to attach the screenshots. My MSN is [email protected]
    Thanks,
    Ray

    If you want to disallow getChildren altogether, throw an AccessDeniedException. If you want to hide specific children, just don't put them into the result list.
    Best regards, Julian

  • NCo throws an Exception calling BAPI_MATERIAL_SAVEDATA?

    I've been successful in calling BAPIs from NCo (BAPI_CHARACT_CREATE, BAPI_CLASS_CREATE, BAPI_VENDOR_FIND, BAPI_VENDOR_GETDETAIL)....
    However when calling BAPI_MATERIAL_SAVEDATA, I always get the following Exception being thrown:
    Index was outside the bounds of the array.
       at SAP.Connector.Rfc.RfcStructureUtil.ToRfcStructure(Object obj, Byte[] dest, Type t, Encoding encoding, Boolean isUnicode, PropertyInfo[] propinfos, RfcStructInfo structInfo)
       at SAP.Connector.Rfc.RfcStructureUtil.GetITabFromList(SAPConnection conn, Object list, Type t, RfcStructInfo structInfo, Int32 itab)
       at SAP.Connector.Rfc.RfcClient.PrepareClientParameters(Type classType, MethodInfo m, Boolean isTQRfc, Object[] MethodParamsIn, RFC_PARAMETER[]& paramsIn, RFC_PARAMETER[]& paramsOut, RFC_TABLE[]& tables, ParameterMap[]& paramMaps)
       at SAP.Connector.Rfc.RfcClient.RfcInvoke(SAPClient proxy, String method, Object[] methodParamsIn)
       at SAP.Connector.SAPClient.SAPInvoke(String method, Object[] methodParamsIn)
       at SAP_MM_Test.SAPProxy1.Bapi_Material_Savedata(BAPI_MARA Clientdata, BAPI_MARAX Clientdatax, String Flag_Cad_Call, String Flag_Online, BAPI_MPOP Forecastparameters, BAPI_MPOPX Forecastparametersx, BAPIMATHEAD Headdata, String No_Dequeue, String No_Rollback_Work, BAPI_MPGD Planningdata, BAPI_MPGDX Planningdatax, BAPI_MARC Plantdata, BAPI_MARCX Plantdatax, BAPI_MVKE Salesdata, BAPI_MVKEX Salesdatax, BAPI_MARD Storagelocationdata, BAPI_MARDX Storagelocationdatax, BAPI_MLGT Storagetypedata, BAPI_MLGTX Storagetypedatax, BAPI_MBEW Valuationdata, BAPI_MBEWX Valuationdatax, BAPI_MLGN Warehousenumberdata, BAPI_MLGNX Warehousenumberdatax, BAPIRET2& Return0, BAPIPAREXTable& Extensionin, BAPIPAREXXTable& Extensioninx, BAPI_MEANTable& Internationalartnos, BAPI_MAKTTable& Materialdescription, BAPI_MLTXTable& Materiallongtext, BAPI_MFHMTable& Prtdata, BAPI_MFHMXTable& Prtdatax, BAPI_MATRETURN2Table& Returnmessages, BAPI_MLANTable& Taxclassifications, BAPI_MARMTable& Unitsofmeasure, BAPI_MARMXTable& Unitsofmeasurex) in C:\Dev\SAP_MM_Test\SAPProxy1.vb:line 220
       at SAP_MM_Test.Form1.Button1_Click(Object sender, EventArgs e) in C:\Dev\SAP_MM_Test\Form1.vb:line 114"     String
    I even tried calling the Method with all parameters set to Nothing and also get the same error.  I tested some of the other BAPI I listed will all Nothing parameters and it does not throw any exceptions.  Almost seems as if the Proxy generated classes did not get created properly or something?
    Has anyone else successfully called BAPI_MATERIAL_SAVEDATA from NCo 2.0?
    PS...I was successful in calling the BAPI from SE37 with the exact same data, therefore I know I have all the mandatory parameters specified (HeadData, ClientData, ClientDatax...etc)
    Anything obvious in the following code?:
    =======================================
         ' Connection String
         Dim cs As String = "ASHOST=10.83.180.239 SYSNR=10 CLIENT=110 USER=CMCHUG2 PASSWD=********"
         ' construct the proxy with connection string
         Dim proxy As New SAPProxy1(cs)
         ' Header Data
         Dim HeadData As New BAPIMATHEAD
         HeadData.Material = "000000000000000754"            ' Material NUmber (PAD to 18)
         HeadData.Ind_Sector = "U"                           ' Industry Sector
         HeadData.Matl_Type = "ERSA"                         ' Material Type (ERSA=Space Parts / HERS=Manufacturer Part)
         HeadData.Basic_View = "X"                           ' Need at least 1 view
         ' Client Data
         Dim ClientData As New BAPI_MARA
         ClientData.Matl_Group = "01"                        ' Material Group
         ClientData.Base_Uom = "EA"                          ' Base Unit of Measure
         ' Set the ClientData Indicator Table
         Dim ClientDataX As New BAPI_MARAX
         ClientDataX.Matl_Group = "X"
         ClientDataX.Base_Uom = "X"
         ' Short Description (TABLE)
         Dim ShortDesc As New BAPI_MAKTTable
         Dim sDescr As New BAPI_MAKT
         sDescr.Langu = "E"                                  ' Language
         sDescr.Matl_Desc = "Short Desc Test"               ' Short Description (Max 40)
         ShortDesc.Add(sDescr)
         Dim tblRet As New BAPIRET2
         Dim tblRetMsg As New BAPI_MATRETURN2Table
         proxy.Bapi_Material_Savedata(ClientData, ClientDataX, Nothing, Nothing, Nothing, Nothing, HeadData, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, tblRet, Nothing, Nothing, Nothing, ShortDesc, Nothing, Nothing, Nothing, tblRetMsg, Nothing, Nothing, Nothing)
    Exception Thrown Here!!!

    Reiner,
    Tried what you suggested, still get the same results.  This the 3rd development system I try this from. In all cases I generated proxies via drop and drop of the SaveData Method under StandardMaterial (BOR).  Since it was just generated the MetaData should be up to date?, good suggestion thought, I could see where that might be a problem going against different backends.
    My lastest attempt (I am quickly running out of ideas), was to generate a Standalone Proxy containing the SaveData method.  Same Results :{ 
    I was able to create Standalone Proxies for the other Business Objects I'm using (Characteristics, Class..etc) without a hitch. (Except for "Class", complaining about the Class name generated (Public Class Class...so I renamed to sapClass).  Using the Standalone Proxy Class I might try from Visual Studio 2005 to see if I get the same results.
    Also encountered another problem when trying to Add the whole BOR object StandardMaterial to the Proxy (so I would have access to a few of the Methods....this failed with some Java out of memory error....I would have to attempt this again to capture the exact error....when I get time I'll put that in another post).

  • Repaint() method is not working in MAC IE

    Hi All
    why repaint method is not working in MAC IE ? What i am doing is in one class which is inheriting Canvas class getting the keybord input then adding it to main applet.
    Please help me i am trying it for whole week and i couldn't find any solution. I didn't put my code but if anyone is willing to help me i can post it.
    Thanks in advancs
    Shan

    Hi
    Thanks for your reply. Actually i wrote simple applets and those are working well.
    So i did debug the code and i found that when i am running the following code in Apple MAC IE, nothing is happening in handleEvent method. Especially it is not going into the if statement (if (evt.id==401)). here i am checking for KEY_PRESS. I also tried with keyDown method but same problem in MAC IE.
    I am pasting the code that is giving me problem.
    import java.awt.*;
    import java.applet.*;
    public class testApplet extends Applet
    public void init()
    setLayout(new BorderLayout());
    editableArea = new EditableArea();
    editableArea.setBackground(Color.yellow);
    add("Center", editableArea);
    EditableArea editableArea;
    import java.awt.*;
    public class EditableArea extends Canvas
    String s = "";
    public boolean handleEvent(Event evt)
    if (evt.id==401)
    if(evt.key >= 32 && evt.key <= 255)
    char c = (char)evt.key;
    s = s + c;
    repaint();
    return super.handleEvent(evt);
    public void paint( Graphics g )
    g.setColor(Color.blue);
    g.drawString( s,5,15);
    --------------------------------------------------------------------

  • Why is my else not working!?

         public void welcome()
              char welcomeChoice;
              InOut.println("Welcome to Dylan's Hospital records.");
              InOut.println("Would you like to proceed to the main menu? Y/N");
              welcomeChoice = InOut.readChar();
              if((welcomeChoice == 'y')||(welcomeChoice=='Y'))
                   InOut.print("\n");
                   mainMenu();
                   else if((welcomeChoice == 'N')||(welcomeChoice=='n'));
                   //exit
              else
                   InOut.println("invalid response");
         }//welcomeim not an expert at java but i cannot see why this method should not work. the else is underlined and tells me "Syntax error on token "else", delete this token". But do i not need the else for the if statement to work!?

    You can also do this instead of doing your "or"
    statements
    if(welcomeChoice.equalsIgnoreCase("y"))
    Not when welcomeChoice is a char.Whoops didn't see that. Nevermind!

Maybe you are looking for

  • ITunes Match songs don't appear on other mobile devices

    Hi, I uploaded all my music on iTunes Match and there are a couple problems when I tried to play it on my iPhone or iPad. First, on my iPhone, some songs won't play even though I downloaded the whole playlist with all the songs on it. I would select

  • Quantum Gateway G1100 router - can't get ethernet ports to work?!

    I just got a Quantum Gateway G1100 router, and the improvement in wireless networking speed over my old Actiontec router is as advertised. However, I find that I can't get any of my wired devices to connect to the router via any of the four yellow Et

  • Workflow - move document set and the content

    Hi,  I am working on "simple" solution to move document set and its content to different library.  Source and destination libraries were created using the same template.  I can copy documents from inside the doc set to other library but workflow does

  • Using PPR in PL/SQL generated webpages

    I have a question about using PPR with web pages written in PL/SQL. I have a dropdown menu that I want to limit by the value selected in the preceding dropdown (pick-list). So far I have not found much information on PPR other than on OTN, and was un

  • Nokia C3-01 Touch messaging application with qwert...

    It will be good if we can have touch application with qwerty setup for messaging. Also, why angry birds game is not developed for S40 6th edition phone...? Will it be available soon?