Howto make an class paint itself when called???

Hi!
This class is a subclass of Circle, the main class.
I want this class to display an image and a string when i initialize it from Circle, and I have tried everything. I'm quite new to Java, please help me!
(I don't get any errors or exceptoins when I run the program.)
public class Page extends Circle {
int x;
int y;
String Name;
Image bilde;
public Page(int x2, int y2, String Name2) {
setX(x2);
setY(y2);
setName(Name2);
Toolkit tk = Toolkit.getDefaultToolkit();
tk.createImage("end.gif");
bilde = tk.getImage("end.gif");
repaint();
public void tegnBilde() {
bilde = newEnd; //image got from Circle
public void setX (int j) { x = j; }
public void setY (int h) { y = h; }
public void setName (String g) { Name = g; }
public void paint(Graphics g){
g.drawString(this.Name, x,y + 35); //draw text under the image
g.drawImage(this.bilde,this.x,this.y,this);

Hi!
This is the "essential" code from Circle.
I get no errors, decapritated or warnings.
public class Circle extends JApplet implements MouseListener {
Image newIndex, newEnd, newExp;
public void init() {
circle = new Ellipse2D.Double();
Circ1 = new Area(circle);
Circ2 = new Area(circle);
Circ3 = new Area(circle);
Page page1;
newEnd = getImage(getCodeBase(), "end.gif");
page2 = new Page(100,200,"idi.html", newEnd);
public void paint (Graphics g) {
}

Similar Messages

  • Howto make a class paint itself when initialized?

    Hi!
    This class is a subclass of Circle, the main class.
    I want this class to display an image and a string when i initialize it from Circle, and I have tried everything. I'm quite new to Java, please help me!
    (I don't get any errors or exceptoins when I run the program.)
    public class Page extends Circle {
    int x;
    int y;
    String Name;
    Image bilde;
    public Page(int x2, int y2, String Name2) {
    setX(x2);
    setY(y2);
    setName(Name2);
    Toolkit tk = Toolkit.getDefaultToolkit();
    tk.createImage("end.gif");
    bilde = tk.getImage("end.gif");
    repaint();
    public void tegnBilde() {
    bilde = newEnd;
    public void setX (int j) { x = j; }
    public void setY (int h) { y = h; }
    public void setName (String g) { Name  = g; }
    public void paint(Graphics g){
    g.drawString(this.Name, x,y + 35); //draw text under the image
    g.drawImage(this.bilde,this.x,this.y,this);
    } //PAGE

    Circle is the class with init(). (I couldn't change the name in Jbuilder)
    Here is the "essential" code witch deals with Page:
    public class Circle extends JApplet implements MouseListener {
    Ellipse2D.Double circle;
    Area Circ1, Circ2, Circ3;
    int FilLengde;
    int MatriseLengde = 6;
    int MatriseBredde = 3;
    String[][] matrise = new String[MatriseLengde][MatriseBredde];
    String LinkFil = "links.dat";
    Image newIndex, newEnd, newExp;
    Point origo;
    Page page1;
    public void init() {
    circle = new Ellipse2D.Double();
    Circ1 = new Area(circle);
    Circ2 = new Area(circle);
    Circ3 = new Area(circle);
    FilLengde = FinnLengde();
    LesInn();
    //SkrivUtMatrise();
    newIndex = getImage(getCodeBase(),"index.gif");
    newEnd = getImage(getCodeBase(), "end.gif");
    newExp = getImage(getCodeBase(),"exp.gif");
    addMouseListener(this);
    Page page2 = new Page(100,200,"idi.html");
    public void paint (Graphics g) {
    All "imports" is there also.

  • The XML document builds on itself when called twice. Help!!!

    When I run the Sample program for the Oracle classgen for Java
    the XML document node repeats itself when called the second
    time. This is what I mean:
    import oracle.xml.classgen.*;
    import oracle.xml.parser.*;
    public class TestWidl
    static WIDL w1 = new WIDL();
    public static void main (String args[])
    test();
    test();
    static void test ()
    try
    DTD dtd = w1.getDTDNode();
    w1.setNAME("WIDL1");
    w1.setVERSION(WIDL.VERSION_1_0);
    SERVICE s1 = new SERVICE("Service1", "Service_URL");
    s1.setINPUT("File");
    s1.setOUTPUT("File");
    BINDING b1 = new BINDING("Binding1");
    b1.setTYPE(BINDING.TYPE_INPUT);
    BINDING b2 = new BINDING("Binding2");
    b2.setTYPE(BINDING.TYPE_OUTPUT);
    VARIABLE v1 = new VARIABLE("Variable1",
    VARIABLE.NULLOK_FALSE);
    v1.setTYPE(VARIABLE.TYPE_STRING);
    v1.setUSAGE(VARIABLE.USAGE_INTERNAL);
    v1.setVALUE("value");
    VARIABLE v2 = new VARIABLE("Variable2",
    VARIABLE.NULLOK_TRUE);
    v2.setTYPE(VARIABLE.TYPE_STRING1);
    v2.setUSAGE(VARIABLE.USAGE_HEADER);
    VARIABLE v3 = new VARIABLE("Variable3",
    VARIABLE.NULLOK_FALSE);
    v3.setTYPE(VARIABLE.TYPE_STRING2);
    v3.setUSAGE(VARIABLE.USAGE_FUNCTION);
    v3.setMASK("mask");
    CONDITION c1 = new CONDITION("CRef1", "CMatch1");
    c1.setSERVICE("Service1");
    c1.setTYPE(CONDITION.TYPE_SUCCESS);
    CONDITION c2 = new CONDITION("CRef2", "CMatch2");
    c2.setTYPE(CONDITION.TYPE_RETRY);
    CONDITION c3 = new CONDITION("CRef3", "CMatch3");
    c3.setSERVICE("Service3");
    c3.setTYPE(CONDITION.TYPE_FAILURE);
    REGION r1 = new REGION("Region1", "Start", "End");
    b1.addNode(r1);
    b1.addNode(v1);
    b1.addNode(c1);
    b1.addNode(v2);
    b2.addNode(c2);
    b2.addNode(v3);
    w1.addNode(s1);
    w1.addNode(b1);
    w1.addNode(b2);
    w1.validateContent();
    w1.print(System.out);
    catch (Exception e)
    System.out.println(e.toString());
    e.printStackTrace();
    The XML output looks like this:
    First Call to test():
    <?xml version = '1.0' encoding = 'ASCII'?>
    <!DOCTYPE WIDL SYSTEM "file:/home/hmiranda/tmp/WIDL_dtd.txt">
    <WIDL NAME="WIDL1" VERSION="1.0">
    <SERVICE NAME="Service1" URL="Service_URL" INPUT="File"
    OUTPUT="File"/>
    <BINDING NAME="Binding1" TYPE="Input">
    <REGION NAME="Region1" START="Start" END="End"/>
    <VARIABLE NAME="Variable1" NULLOK="False" TYPE="String"
    USAGE="Internal" VALUE="value"/>
    <CONDITION REF="CRef1" MATCH="CMatch1" SERVICE="Service1"
    TYPE="Success"/>
    <VARIABLE NAME="Variable2" NULLOK="True" TYPE="String1"
    USAGE="Header"/>
    </BINDING>
    <BINDING NAME="Binding2" TYPE="Output">
    <CONDITION REF="CRef2" MATCH="CMatch2" TYPE="Retry"/>
    <VARIABLE NAME="Variable3" NULLOK="False" TYPE="String2"
    USAGE="Function" MASK="mask"/>
    </BINDING>
    </WIDL>
    Second Call to test:
    Please note how service1 repeats itself. I would expect that
    the XML string would look like the first output:
    How can I fix this??
    <?xml version = '1.0' encoding = 'ASCII'?>
    <!DOCTYPE WIDL SYSTEM "file:/home/hmiranda/tmp/WIDL_dtd.txt">
    <WIDL NAME="WIDL1" VERSION="1.0">
    <SERVICE NAME="Service1" URL="Service_URL" INPUT="File"
    OUTPUT="File"/>
    <BINDING NAME="Binding1" TYPE="Input">
    <REGION NAME="Region1" START="Start" END="End"/>
    <VARIABLE NAME="Variable1" NULLOK="False" TYPE="String"
    USAGE="Internal" VALUE="value"/>
    <CONDITION REF="CRef1" MATCH="CMatch1" SERVICE="Service1"
    TYPE="Success"/>
    <VARIABLE NAME="Variable2" NULLOK="True" TYPE="String1"
    USAGE="Header"/>
    </BINDING>
    <BINDING NAME="Binding2" TYPE="Output">
    <CONDITION REF="CRef2" MATCH="CMatch2" TYPE="Retry"/>
    <VARIABLE NAME="Variable3" NULLOK="False" TYPE="String2"
    USAGE="Function" MASK="mask"/>
    </BINDING>
    <SERVICE NAME="Service1" URL="Service_URL" INPUT="File"
    OUTPUT="File"/>
    <BINDING NAME="Binding1" TYPE="Input">
    <REGION NAME="Region1" START="Start" END="End"/>
    <VARIABLE NAME="Variable1" NULLOK="False" TYPE="String"
    USAGE="Internal" VALUE="value"/>
    <CONDITION REF="CRef1" MATCH="CMatch1" SERVICE="Service1"
    TYPE="Success"/>
    <VARIABLE NAME="Variable2" NULLOK="True" TYPE="String1"
    USAGE="Header"/>
    </BINDING>
    <BINDING NAME="Binding2" TYPE="Output">
    <CONDITION REF="CRef2" MATCH="CMatch2" TYPE="Retry"/>
    <VARIABLE NAME="Variable3" NULLOK="False" TYPE="String2"
    USAGE="Function" MASK="mask"/>
    </BINDING>
    </WIDL>
    Any Help is appreciated.
    Hector.
    null

    Hector Miranda (guest) wrote:
    : When I run the Sample program for the Oracle classgen for Java
    : the XML document node repeats itself when called the second
    : time. This is what I mean:
    : import oracle.xml.classgen.*;
    : import oracle.xml.parser.*;
    : public class TestWidl
    : static WIDL w1 = new WIDL();
    : public static void main (String args[])
    : test();
    : test();
    : static void test ()
    : try
    : DTD dtd = w1.getDTDNode();
    : w1.setNAME("WIDL1");
    : w1.setVERSION(WIDL.VERSION_1_0);
    : SERVICE s1 = new SERVICE("Service1", "Service_URL");
    : s1.setINPUT("File");
    : s1.setOUTPUT("File");
    : BINDING b1 = new BINDING("Binding1");
    : b1.setTYPE(BINDING.TYPE_INPUT);
    : BINDING b2 = new BINDING("Binding2");
    : b2.setTYPE(BINDING.TYPE_OUTPUT);
    : VARIABLE v1 = new VARIABLE("Variable1",
    : VARIABLE.NULLOK_FALSE);
    : v1.setTYPE(VARIABLE.TYPE_STRING);
    : v1.setUSAGE(VARIABLE.USAGE_INTERNAL);
    : v1.setVALUE("value");
    : VARIABLE v2 = new VARIABLE("Variable2",
    : VARIABLE.NULLOK_TRUE);
    : v2.setTYPE(VARIABLE.TYPE_STRING1);
    : v2.setUSAGE(VARIABLE.USAGE_HEADER);
    : VARIABLE v3 = new VARIABLE("Variable3",
    : VARIABLE.NULLOK_FALSE);
    : v3.setTYPE(VARIABLE.TYPE_STRING2);
    : v3.setUSAGE(VARIABLE.USAGE_FUNCTION);
    : v3.setMASK("mask");
    : CONDITION c1 = new CONDITION("CRef1", "CMatch1");
    : c1.setSERVICE("Service1");
    : c1.setTYPE(CONDITION.TYPE_SUCCESS);
    : CONDITION c2 = new CONDITION("CRef2", "CMatch2");
    : c2.setTYPE(CONDITION.TYPE_RETRY);
    : CONDITION c3 = new CONDITION("CRef3", "CMatch3");
    : c3.setSERVICE("Service3");
    : c3.setTYPE(CONDITION.TYPE_FAILURE);
    : REGION r1 = new REGION("Region1", "Start", "End");
    : b1.addNode(r1);
    : b1.addNode(v1);
    : b1.addNode(c1);
    : b1.addNode(v2);
    : b2.addNode(c2);
    : b2.addNode(v3);
    : w1.addNode(s1);
    : w1.addNode(b1);
    : w1.addNode(b2);
    : w1.validateContent();
    : w1.print(System.out);
    : catch (Exception e)
    : System.out.println(e.toString());
    : e.printStackTrace();
    : The XML output looks like this:
    : First Call to test():
    : <?xml version = '1.0' encoding = 'ASCII'?>
    : <!DOCTYPE WIDL SYSTEM "file:/home/hmiranda/tmp/WIDL_dtd.txt">
    : <WIDL NAME="WIDL1" VERSION="1.0">
    : <SERVICE NAME="Service1" URL="Service_URL" INPUT="File"
    : OUTPUT="File"/>
    : <BINDING NAME="Binding1" TYPE="Input">
    : <REGION NAME="Region1" START="Start" END="End"/>
    : <VARIABLE NAME="Variable1" NULLOK="False" TYPE="String"
    : USAGE="Internal" VALUE="value"/>
    : <CONDITION REF="CRef1" MATCH="CMatch1"
    SERVICE="Service1"
    : TYPE="Success"/>
    : <VARIABLE NAME="Variable2" NULLOK="True" TYPE="String1"
    : USAGE="Header"/>
    : </BINDING>
    : <BINDING NAME="Binding2" TYPE="Output">
    : <CONDITION REF="CRef2" MATCH="CMatch2" TYPE="Retry"/>
    : <VARIABLE NAME="Variable3" NULLOK="False" TYPE="String2"
    : USAGE="Function" MASK="mask"/>
    : </BINDING>
    : </WIDL>
    : Second Call to test:
    : Please note how service1 repeats itself. I would expect that
    : the XML string would look like the first output:
    : How can I fix this??
    : <?xml version = '1.0' encoding = 'ASCII'?>
    : <!DOCTYPE WIDL SYSTEM "file:/home/hmiranda/tmp/WIDL_dtd.txt">
    : <WIDL NAME="WIDL1" VERSION="1.0">
    : <SERVICE NAME="Service1" URL="Service_URL" INPUT="File"
    : OUTPUT="File"/>
    : <BINDING NAME="Binding1" TYPE="Input">
    : <REGION NAME="Region1" START="Start" END="End"/>
    : <VARIABLE NAME="Variable1" NULLOK="False" TYPE="String"
    : USAGE="Internal" VALUE="value"/>
    : <CONDITION REF="CRef1" MATCH="CMatch1"
    SERVICE="Service1"
    : TYPE="Success"/>
    : <VARIABLE NAME="Variable2" NULLOK="True" TYPE="String1"
    : USAGE="Header"/>
    : </BINDING>
    : <BINDING NAME="Binding2" TYPE="Output">
    : <CONDITION REF="CRef2" MATCH="CMatch2" TYPE="Retry"/>
    : <VARIABLE NAME="Variable3" NULLOK="False" TYPE="String2"
    : USAGE="Function" MASK="mask"/>
    : </BINDING>
    : <SERVICE NAME="Service1" URL="Service_URL" INPUT="File"
    : OUTPUT="File"/>
    : <BINDING NAME="Binding1" TYPE="Input">
    : <REGION NAME="Region1" START="Start" END="End"/>
    : <VARIABLE NAME="Variable1" NULLOK="False" TYPE="String"
    : USAGE="Internal" VALUE="value"/>
    : <CONDITION REF="CRef1" MATCH="CMatch1"
    SERVICE="Service1"
    : TYPE="Success"/>
    : <VARIABLE NAME="Variable2" NULLOK="True" TYPE="String1"
    : USAGE="Header"/>
    : </BINDING>
    : <BINDING NAME="Binding2" TYPE="Output">
    : <CONDITION REF="CRef2" MATCH="CMatch2" TYPE="Retry"/>
    : <VARIABLE NAME="Variable3" NULLOK="False" TYPE="String2"
    : USAGE="Function" MASK="mask"/>
    : </BINDING>
    : </WIDL>
    : Any Help is appreciated.
    : Hector.
    Move
    WIDL w1 = new WIDL();
    out of test() and modify it as
    public class TestWidl
    static WIDL w1 = new WIDL(); ...
    and this will work.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Correct clipping when calling "paint()" from thread

    How do I achieve correct clipping around JMenus or JTooltips when calling paint() for a Component from a background thread?
    The whole story:
    Trying to implement some blinking GUI symbols (visualizing alerts), I implemented a subclass of JPanel which is linked to a Swing timer and thus receives periodic calls to its "actionPerformed()" methods.
    In the "actionPerformed()" method, the symbol's state is toggled and and repainting the object should be triggered.
    Unfortunately, "repaint()" has huge overhead (part of the background would need to be repainted, too) and I decided to call "paint( getGraphics() )" instead of it.
    This works fine as long as there is nothing (like a JMenu, a JComboBox or a JTooltip) hiding the symbol (partially or completely). In such case the call to paint() simply "overpaints" the object.
    I suppose setting a clipping region would help, but where from can I get it?
    Any help welcome! (I alread spent hours in search of a solution, but I still have no idea...)

    For all those interested in the topic:
    It seems as if there is no reliable way to do proper clipping when calling
    "paint()".
    The problem was that when my sub-component called "repaint()" for itself, the underlying component's "paintComponent()" method was called as well. Painting of that component was complex and avoiding complexity by restricting
    on the clipping region is not easily possible.
    I have several sub-components to be repainted regularly, resulting in lots of calls to my parent component's "paintComponent()" method. This makes the
    repainting of the sub-components awfully slow; the user can see each one begin painted!
    Finally I decided I had to speed up the update of the parent component. I found two possible solutions:
    a) Store the background of each of the sub-components in a BufferedImage:
    When "paintComponent()" is called: test, if the clipping rectangle solely
    contains the region of a sub-component. If this is true check if there
    is a "cached" BufferedImage for this region. If not, create one, filling
    it with the "real" "paintComponent()" method using the Graphic object of
    the BufferedImage. Once we have such a cached image, simply copy it the
    the screen (i.e. the Graphics object passed as method parameter).
    b) To avoid the handling of several of such "cached" image tiles, simply
    store the whole parent component's visible part ("computeVisibleRect()")
    in a BufferedImage. Take care to re-allocate/re-paint this image each
    time the visible part changes. (I need to restrict the image buffer to
    the visible part since I use a zooming feature: Storing the whole image
    would easily eat up all RAM!) In the "paintComponent()", simple check
    if the currently buffered image is still valid - repaint if not -
    and copy the requested part of it (clip rect) to the screen. That's it!
    The whole procedure works fine.
    Best regards,
    Armin

  • When to make a class a bean?

    I can understand that if you have a GUI type class where you might want to make the class a Bean so that it can be used in tools like BeanBox.
    But what if it is a non visible class? For example say a class that is used to interface to piece of equipment over the serial port? Are there any advantages to making the class a Bean?

    Ok. My info may be a little out of date, but I'll try.
    In object oriented programming, we have these things called patterns. They are called that because that's what they are caled in the original book by the "gang of four", whose names I can't recall. An example of a pattern is the idea of passing an event around, or having graphical objects "inside" other ones, or making a class that serves as an interface to a complex set of other classes. These patterns are not always directly supported by the APIs or language, they are more abstract than that - ways that we programmers go about architecting solutions to certain kinds of problems. (nb: a pattern is not the same thing as an algorithim). Of course, some patterns are supported directly by the APIs: EventObject, EventListener etc.
    One common pattern is an object that holds a set of values, that fires events and so on. Of course any object can do this, but architecturally speaking, some objects work that way more naturally than others. In Java, we call such an object a JavaBean.
    Java supplies a standard for JavaBeans at http://java.sun.com/products/javabeans/docs/spec.html . This standard specifies that a java bean has a null argument constructor, it has getters and setters and that if a bean has a getFoo() method and a setFoo() method, then these together mean that the bean has a "property" named Foo, and so on.
    Now physically, the only thing that a java bean must have is:
    it must be public,
    it must have a public, no-argument constructor
    However, architecturally, we make a load of assumptions. For instance, if your class has a getFoo() and setFoo() method, but they have absolutely nothing to do with each other, then you class isn't a JavaBean, even though physically the compiler and tools have no way to know this. Likewise, if your class has a public no-arg constructor, but your class requires that you call the setup() method for it to work properly, then it is not a JavaBean. JavaBeans can be initialised into a reasonable starting state with the constructor alone.
    So JavaBean or not JavaBean is not a class you inherit or an API you use, it's a way of doing things.
    Having said that, there is api support for JavaBeans in the java.bean package. You can create "BeanInfo" classes for your beans that contain metadata about the beans: long textual descriptions for the properties, icons for tools to use when displaying the beans and so on.
    As for JSPs:
    From memory, you can tell your JSP that an instance of a bean is to be created for each session that the JSP deals with. So say we make a bean that acts as a shopping cart, with items that themselves are beans (item number, quantity). Inside the JSP you can do things like "print shopping cart.item[2].name", and the JSP will know to convert this to a call to foobean.getItem(2).getName(). The reason for making it a bean is to make it possible for the web server to manage the creation of these things and the retreiving of them on a session-by-session basis. They can also be passed as arguments and so on. Another nice reason to use a bean is that you can encode derived values as getter methods on the bean (eg: getTotalPrice()). This is a nice place to put such logic.
    The JSP spec is at http://www.jcp.org/aboutJava/communityprocess/final/jsr053/ . (dont confuse it with the servlet Spec, which is on the same page). See section 4.1: Standard Actions/usebean.

  • When I try to restore my iPod, it stops restoring at the same place and doesn't work. How do I fix this and make it completely restore itself?

    When I try to restore my iPod, it stops restoring at the same place and doesn't work. How do I fix this and make it completely restore itself?

    Did you make sure that your security software allows iTunes to contact Apple during the restore process? http://support.apple.com/kb/TS3125

  • Java.lang.Class- getFields() results in JVM crash when called through JNI

    From a C++ application, I use Invocation APIs to create a JVM and call some Java methods using JNI
    I get a crash in jvm.dll with EXCEPTION_ACCESS_VIOLATION
    when I try to call "getFields" method of java.lang.Class in order to get the Fields of the java class
    This method call, should return a java/lang/reflect/Fields[] on success
    I am able to get the method ID of this method by using pEnv->GetMethodID(..)
    However, when I call this method using CallObjectMethod(..), HotSpt JVM crashes with access violation with the dump given below.
    Any clues on how to debug and find the problem?
    Or has anyone tried getting the fields of a Java class from C++ by calling reflection APIs uing JNI?
    Thanks in advance!
    Sample code
    jclass testerClass = pEnv->FindClass("com/test/Tester");
    jmethodID cid = pEnv->GetMethodID(testerClass,"<init>","()V");
    if(NULL == cid)
    pEnv->ExceptionDescribe();
    jobject testerObject = pEnv->NewObjectV(testerClass, mid);
    jmethodID mid = pEnv->GetMethodID(testerClass, "getClass",
                             "()Ljava/lang/Class;");
    jobject clsObj = (jobject)pEnv->CallObjectMethod(testerObject, mid);
    pEnv->ExceptionDescribe();
    jclass      jCls = pEnv->GetObjectClass(clsObj);
    jmethodID midGetFields = pEnv->GetMethodID(jCls, "getFields",
                                            "()[Ljava/lang/reflect/Field;");
    jobjectArray jobjArray = (jobjectArray)pEnv->CallObjectMethod(testerObject, midGetFields);
    pEnv->ExceptionDescribe();
    Crash dump
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x809E69F
    Function=JVM_FindSignal+0x11505
    Library=D:\Java\j2re1.4.2_03\bin\client\jvm.dll
    Current Java thread:
         at java.lang.Class.privateGetDeclaredFields(Unknown Source)
         at java.lang.Class.privateGetPublicFields(Unknown Source)
         at java.lang.Class.getFields(Unknown Source)
    Dynamic libraries:
    0x00400000 - 0x00419000      E:\SC\SC12.1\SCApplications\SNMP\Bin\JNITester.exe
    0x77F50000 - 0x77FF7000      C:\WINDOWS\System32\ntdll.dll
    0x77E60000 - 0x77F46000      C:\WINDOWS\system32\kernel32.dll
    0x10000000 - 0x10023000      E:\SC\SC12.1\SCApplications\SNMP\Bin\JniUtils.dll
    0x00320000 - 0x00332000      E:\SnmpIpmNativeTestDriver\MTFStubHelper.dll
    0x00340000 - 0x0035B000      E:\SnmpIpmNativeTestDriver\MTFXMLFileAPI.dll
    0x12000000 - 0x122B1000      e:\sc\sc12.1\bin\xerces-c_2_2_0D.dll
    0x77DD0000 - 0x77E5D000      C:\WINDOWS\system32\ADVAPI32.dll
    0x78000000 - 0x78086000      C:\WINDOWS\system32\RPCRT4.dll
    0x10200000 - 0x1026C000      e:\sc\sc12.1\bin\MSVCRTD.dll
    0x102A0000 - 0x102B7000      e:\sc\sc12.1\bin\MSVCIRTD.dll
    0x5F800000 - 0x5F8E9000      e:\sc\sc12.1\bin\MFC42uD.DLL
    0x77C70000 - 0x77CB0000      C:\WINDOWS\system32\GDI32.dll
    0x77D40000 - 0x77DCC000      C:\WINDOWS\system32\USER32.dll
    0x5F700000 - 0x5F746000      e:\sc\sc12.1\bin\MFCD42uD.DLL
    0x5F500000 - 0x5F5C6000      e:\sc\sc12.1\bin\MFCO42uD.DLL
    0x10480000 - 0x104FE000      e:\sc\sc12.1\bin\MSVCP60D.dll
    0x15020000 - 0x15042000      e:\sc\sc12.1\bin\SCTraceLib.dll
    0x6D510000 - 0x6D58D000      C:\WINDOWS\System32\dbghelp.dll
    0x77C10000 - 0x77C63000      C:\WINDOWS\system32\msvcrt.dll
    0x77C00000 - 0x77C07000      C:\WINDOWS\system32\VERSION.dll
    0x00360000 - 0x0037D000      e:\sc\sc12.1\bin\SCFileManager.dll
    0x76BF0000 - 0x76BFB000      C:\WINDOWS\System32\PSAPI.DLL
    0x00420000 - 0x00580000      e:\sc\sc12.1\bin\BctCoreCL.dll
    0x5D920000 - 0x5D929000      C:\WINDOWS\System32\RPCNS4.dll
    0x71B20000 - 0x71B31000      C:\WINDOWS\system32\MPR.dll
    0x71C20000 - 0x71C6E000      C:\WINDOWS\System32\NETAPI32.dll
    0x71AB0000 - 0x71AC5000      C:\WINDOWS\System32\WS2_32.dll
    0x71AA0000 - 0x71AA8000      C:\WINDOWS\System32\WS2HELP.dll
    0x15000000 - 0x15012000      e:\sc\sc12.1\bin\CTEventLog.dll
    0x773D0000 - 0x77BC2000      C:\WINDOWS\system32\SHELL32.dll
    0x70A70000 - 0x70AD4000      C:\WINDOWS\system32\SHLWAPI.dll
    0x771B0000 - 0x772D1000      C:\WINDOWS\system32\ole32.dll
    0x77120000 - 0x771AB000      C:\WINDOWS\system32\OLEAUT32.dll
    0x1F7A0000 - 0x1F7D6000      C:\WINDOWS\System32\ODBC32.dll
    0x77340000 - 0x773CB000      C:\WINDOWS\system32\COMCTL32.dll
    0x763B0000 - 0x763F5000      C:\WINDOWS\system32\comdlg32.dll
    0x08000000 - 0x08138000      D:\Java\j2re1.4.2_03\bin\client\jvm.dll
    0x76B40000 - 0x76B6C000      C:\WINDOWS\System32\WINMM.dll
    0x5FD00000 - 0x5FD0D000      C:\WINDOWS\System32\MFC42LOC.DLL
    0x71950000 - 0x71A34000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805\comctl32.dll
    0x1F840000 - 0x1F857000      C:\WINDOWS\System32\odbcint.dll
    0x5DAC0000 - 0x5DAC7000      C:\WINDOWS\System32\rdpsnd.dll
    0x00FE0000 - 0x00FE7000      D:\Java\j2re1.4.2_03\bin\hpi.dll
    0x01000000 - 0x0100E000      D:\Java\j2re1.4.2_03\bin\verify.dll
    0x01010000 - 0x01029000      D:\Java\j2re1.4.2_03\bin\java.dll
    0x01030000 - 0x0103D000      D:\Java\j2re1.4.2_03\bin\zip.dll
    0x76C90000 - 0x76CB2000      C:\WINDOWS\system32\imagehlp.dll
    Heap at VM Abort:
    Heap
    def new generation total 576K, used 132K [0x15050000, 0x150f0000, 0x15530000)
    eden space 512K, 25% used [0x15050000, 0x15071250, 0x150d0000)
    from space 64K, 0% used [0x150d0000, 0x150d0000, 0x150e0000)
    to space 64K, 0% used [0x150e0000, 0x150e0000, 0x150f0000)
    tenured generation total 1408K, used 0K [0x15530000, 0x15690000, 0x19050000)
    the space 1408K, 0% used [0x15530000, 0x15530000, 0x15530200, 0x15690000)
    compacting perm gen total 4096K, used 964K [0x19050000, 0x19450000, 0x1d050000)
    the space 4096K, 23% used [0x19050000, 0x191410e0, 0x19141200, 0x19450000)
    Local Time = Wed Aug 25 21:06:44 2004
    Elapsed Time = 0
    # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION
    # Error ID : 4F530E43505002EF
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode)

    You are right, I tried getting the java.lang.Class reference for the com.test.Tester by calling getClass() on com.test.Tester
    And using this jclass reference for java.lang.Class, I tried getting the method ID of getFields and eventually the Field[]
    Thanks for the help
    I have some more questions.
    Assumption - Using JNI, I got the fields array of com.test.Tester and I am iterating through the fields
    1.Assuming that the Tester class had an Integer field say m_nIntVal, then once I get the jobject equivalent of this Field in C++.
    Now I need to get the type of the field (I call the method java.lang.reflect.getType() from JNI)
    This gives me a jclass reference to it's type i.e java.lang.Integer
    2.I need to get the name of this type i.e I want to get the name of the type in a string as "java.lang.Integer"
    For this, on the jclass reference of java.lang.Integer got in Step 1, I call getClass() from JNI (to get the java.lang.Class) and then getName()
    Now, for calling getClass(), I need a temporary object reference corresponding to the jclass of java.lang.Integer, The problem is that Integer does not have a default constructor, so my call to create the jobject fails.
    But, since I do not know that I am constructing an Integer (remember that is what I am trying to find out - getType), I cant pass any values to constructor
    Now, how do I go about creating a jobject of Integer, without knowing that I am constructing that, as this does not have a default constructor without parameters
    Also, I tried using AllocObject to get the jobject and then tried to get the method ID of getClass(). Even this failed
    3. If the com.test.Tester class had a primitive "int" field, say m_nPrimitiveInt
    for which java provides a Class representation, I am able to get the jclass reference to the type of m_nPrimitiveInt
    Now, how do I get the name of the type as "int" in a string?
    Forllowing a similar procedure like in Step 2 fails when I try to pass the jclass reference to the type of m_nPrimitiveInt to the GetMethodID
    with the error FATAL ERROR in native method: JNI received a class argument that is not a class
    Can you tell me what is the way out?
    Thanks in advance,
    Also, can I mail you with some doubts that I have? If its ok, please contact me at [email protected]

  • Error when calling method INIT in class cl_hrxss_rem for salary statements

    after configuring the our hrform to work with the new ess system in ecc 6.0 we configured the hrfor decision tree to $cedt$ and pointed the form variant to the edtin feature.
    Now we are getting a class error.
    com.sap.pcuigp.xssfpm.java.FPMRuntimeException: Error when calling method INIT of class CL_HRXSS_REM
         at com.sap.pcuigp.xssfpm.java.MessageManager.raiseException(MessageManager.java:111)
         at com.sap.pcuigp.xssfpm.java.MessageManager.raiseException(MessageManager.java:121)
         at com.sap.xss.hr.rep.fcrfw.FcRepFramework.reportBapiRet2Error(FcRepFramework.java:525)
         at com.sap.xss.hr.rep.fcrfw.FcRepFramework.callRfcExecAction(FcRepFramework.java:374)
         at com.sap.xss.hr.rep.fcrfw.FcRepFramework.initModel(FcRepFramework.java:292)
         at com.sap.xss.hr.rep.fcrfw.wdp.InternalFcRepFramework.initModel(InternalFcRepFramework.java:256)
         at com.sap.xss.hr.rep.fcrfw.FcRepFrameworkInterface.initModel(FcRepFrameworkInterface.java:136)
         at com.sap.xss.hr.rep.fcrfw.wdp.InternalFcRepFrameworkInterface.initModel(InternalFcRepFrameworkInterface.java:198)
         at com.sap.xss.hr.rep.fcrfw.wdp.InternalFcRepFrameworkInterface$External.initModel(InternalFcRepFrameworkInterface.java:258)
         at com.sap.xss.hr.rem2.selection.VcRem2Selection.onInit(VcRem2Selection.java:245)
         at com.sap.xss.hr.rem2.selection.wdp.InternalVcRem2Selection.onInit(InternalVcRem2Selection.java:249)
         at com.sap.xss.hr.rem2.selection.VcRem2SelectionInterface.onInit(VcRem2SelectionInterface.java:161)
         at com.sap.xss.hr.rem2.selection.wdp.InternalVcRem2SelectionInterface.onInit(InternalVcRem2SelectionInterface.java:144)
         at com.sap.xss.hr.rem2.selection.wdp.InternalVcRem2SelectionInterface$External.onInit(InternalVcRem2SelectionInterface.java:220)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.doProcessEvent(FPMComponent.java:564)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.doEventLoop(FPMComponent.java:438)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.wdDoInit(FPMComponent.java:196)
         at com.sap.pcuigp.xssfpm.wd.wdp.InternalFPMComponent.wdDoInit(InternalFPMComponent.java:110)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:108)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:430)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:362)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:748)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:283)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingPortal(ClientSession.java:733)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:668)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.clientserver.session.core.ApplicationHandle.doProcessing(ApplicationHandle.java:73)
         at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.sendDataAndProcessActionInternal(AbstractApplicationProxy.java:860)
         at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.create(AbstractApplicationProxy.java:220)
         at com.sap.portal.pb.PageBuilder.updateApplications(PageBuilder.java:1246)
         at com.sap.portal.pb.PageBuilder.createPage(PageBuilder.java:354)
         at com.sap.portal.pb.PageBuilder.init(PageBuilder.java:547)
         at com.sap.portal.pb.PageBuilder.wdDoRefresh(PageBuilder.java:591)
         at com.sap.portal.pb.PageBuilder$1.doPhase(PageBuilder.java:822)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processPhaseListener(WindowPhaseModel.java:755)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doPortalDispatch(WindowPhaseModel.java:717)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:136)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:313)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:684)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Thanks

    Hi,
    Maintain the EDTIN feature
    &CEDT$
    And UR problem solve

  • HT201401 my iPhone 5 randomly switched itself when somebody was calling me and now won't turn on. it had 90% battery, I've tried factory reset, connecting to iTunes and nothing works. the phone is approx 18 months old so surprise surprise out of warranty.

    my iPhone 5 randomly switched itself when somebody was calling me and now won't turn on. it had 90% battery, I've tried factory reset, connecting to iTunes and nothing works. the phone is approx 18 months old so surprise surprise out of warranty.

    My 5S just started doing this on Thursday: every fraction of a second or so it oscillates between connecting and disconnecting with the charger (USB or wall, doesn't matter). Since it's still under the limited warrantee, I took it to the local Mac dealer (I live in a small town w/out an Apple store) and they shipped it off. I'm waiting now for the replacement--telephonless, too!
    What concerns me is that many people seem to be having this issue.
    You were right to be suspicious of the Apple store employees. Once they replicated the behavior that you experienced, they should have immediatly offered to exchange your phone. Anything else, in my opinion, is unacceptable. As long as your phone is still doing it, I'd go back, ask for the manager and tell them to exchange your phone.

  • HT204380 How can I make the screen full screen when I am calling?

    How can I make the screen full screen when I am calling on Facetime on a Macbook Pro Laptop?

    Ok but if the iPhone 5s and 5 can go full screen the why can't the iPad Air as it too is new the problem shouldn't be hard to solve as I have looked the apple site and it show it just fine in full screen so I'm sure you understand when I say there is most definitely away of doing it so can Apple just sort it out I'm always telling my m8 how good Apple devices are and I've been let down on this so come on fix it PLEASE

  • How to specify realm name when calling weak( ) method on ServletAuthentication class?

    I've created a bunch of custom realms and for a specific user logon (form based "uname" and "pword"), the system knows exactly which custom realm to look up against. However, in using ServletAuthentication class, one can only specify realm name in strong(req, res, realmName), not the weak() method. Any clue?
    -john

    Hi John,
    Did you find the answer to this question? I'm having a similar problem when calling the ServletAuthentication.assertIdentity() method.
    Cheers,
    Vidar

  • How to make bean for embedded task flow stay in scope when calling TF?

    I have a bounded task flow with page fragments: ManageRecommendationRuleTF.xml that defines a single managed bean with pageFlowScope: ManageRecommendationRuleBean.java
    This task flow has one page ManageRecommendationRule.jsff that embeds two other bounded task flows as regions: ManageRuleTF.xml and ManageRuleConditionsTF.xml
    Each of these task flows defines a single manage bean with pageFlowScope: ManageRuleBean.java and ManageRuleConditionsBean.java
    From the ManageRecommendationRuleTF I call a bounded task flow: SelectTargetProductsTF.xml. When this task flow returns, the ManageRuleBean.java and ManageRuleConditionsBean.java are re-created. Why? I want the state of the beans before the SelectTargetProductTF is called. I do not want to resort to making this a session bean.
    Build JDEVADF_11.1.1.5.0_GENERIC_110409.0025.6013

    Hi,
    the calling task flow is stacked when calling another task flow (using task flow call activity). When the called task flow is returning to the caller then the expected behavior is that the caller task flow is re-established. If this is not what you see, please provide a test case and file a Service Request with support to investigate why this is not working for you. You could e.g. add log messages to the task flow finalizers to see if when navigating off to the called task flow the two region task flows are finalized. If the regions are dynamic regions with the bean in view scope, try and change this to pageFlowScope
    Frank

  • How to make a class an array

    Hello, i am very confused as to how to make an array inside a class and use it from another class. For example, when making a "Book of hotties" where i would create entries in a book(objects) of hot women ,with parameters
    name, last name, phone number, and rating, and i am supposed to make a class for the book itself with a Person [ ] blackBook, and also a separete class called Person where i would create each person. How would i go about creating this array and where would i create it? and from that how can i access it in order to perform methods like sorting and checking entries? Tnx in advance.
    Edited by: Secmugen on May 5, 2009 6:19 AM
    Edited by: Secmugen on May 5, 2009 6:20 AM

    You probably need to start here: http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html
    There is also a Java collection called ArrayList which is suitable for storing and retreiving objects such as BlackBook, Person etc...
    To access elements of an array within a class you would most likely use a public getter method. eg.
    public class BlackBook {
       private ArrayList<Person> persons = new ArrayList<Person>();
      public ArrayList<Person> getPersons() {
         return this.persons;
      public Person getPerson(int index) {
        this.persons.get(index);
    };etc..

  • Canvas paint never gets called - Repaint and ServiceRepaints.

    I have a problem that My Canvas never gets Drawn or the Image never gets Displayed;
    I am not sure if there is a DeadLock or If there is nothing to be painted,
    but when I enable the Debugger I notice that it never enters the paint method. ( I call Repaint and ServiceRepaints)
    If however I make the thread that calls setImage external to my Canvas Class the images do get Displayed.
       //Create the Canvas Class, Start Thread Display Canvas
       frame = new ImageCanvas();
        frame.addCommand(exitCommand);
        frame.addCommand(backCommand);
        frame.setCommandListener(this);
        frame.start();
        display.setCurrent(frame);
    //Display Image
    public class ImageCanvas extends Canvas implements Runnable {
    protected void paint(Graphics g) {
      g.drawImage(offscreen, Constants.XPOS, Constants.YPOS,  Graphics.LEFT | Graphics.TOP);
      private void setImage(Image img, String title) {
        this.setTitle(title);
        offscreen = img;
        repaint();
        serviceRepaints();
    public void run() {
         while(true){
           if (Constants.IMGLOCK != null) {
             synchronized (Constants.IMGLOCK) {
                setImage(Constants.IMAGE, title);
                Constants.IMGLOCK.setLockBoolValue(false);
                 image_created = true;
          } else {
               Constants.IMGLOCK.wait(10);
    }

    I found the BUG, But do not understand Why this is Needed to add,
    the Canvas every Time to the Display.
    Can someone please Explain ???
    private void setImage(Image img, String title) {
        this.setTitle(title);
        offscreen = img;
        repaint();
        display.setCurrent(this);  //<<<<<<WHY ????
        serviceRepaints();
      }

  • How do you make the program repeat itself?

    How would I make it so that when the if statement at the end of the code the program starts over from the begining?
    Any help appreciated. Here is the code if you wanna see it.
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    class SuperTester{
         public static void main ( String[] args ){
         // Create array that will hold deck
         Deck[] decko = new Deck[52];     
         // Fill the array with a deck
         decko = Deck.makeDeck();
         // Print new deck
         System.out.println( "PRINT NEW DECK" );
         System.out.println( "" );
         Deck.printDeck( decko );
         // Shuffle the deck ( simulated riffle shuffling )!
         decko = Deck.shuffleDeck( decko );
         // Print the shuffled deck
         System.out.println( "" );
         System.out.println( "PRINT SHUFFLED DECK" );
         System.out.println( "" );
         Deck.printDeck( decko );
         // Print first 5
         System.out.println( "" );
         System.out.println( "PRINT TOP 5" );
         System.out.println( "" );
         Deck.printFirstFive( decko );
         // Print single card
         System.out.println( "" );
         System.out.println( "PRINT SINGLE CARD" );
         System.out.println( "" );
         Deck.printCard ( decko [2] );
         System.out.println( "" );     
         BufferedReader in = new BufferedReader( new InputStreamReader (System.in));
         int input;
         System.out.println( " Do you want to re-run program? " );
         System.out.println( " Push 1 for yes " );
         System.out.println( " Push 2 for no " );
         System.out.println( "" );
    try
         input = Integer.parseInt( in.readLine() );
    catch( Exception e ){
    if ( input == 1 ){
    //WHAT DO I PUT HERE TO MAKE THE PROGRAM REPEAT ITSELF?
         } // end method
    } // end class

    So i should just do something like?
    int x = 0;
    while (x == 0){
    //code
    if (inpu == 1) {
        x == 0;
    }else{ x == 1; }                                                                                                                                                                                                                                                       

Maybe you are looking for