Public method not visible

I'm new to Java and am having trouble with a "method not visible" error when trying to use a package by another person (which works in its own context.) As far as I can tell all the relevant classes and methods should be public and accessible.
Here is the basic form of the code I'm trying to make use of:
package org.p2c2e.zag;
public final class Zag {
     public void start() {
}And here is my stripped down code. The z.start() line produces the error message "The method start() from the type Zag is not visible."
import org.p2c2e.zag.*;
public class BasicTest {
  public static boolean simpleOpen(File fi) {
     Zag z = new Zag(fi, iStart);
     z.start();
}The Zag class and the start() method within it are both public. Am I missing a general concept here or is something up with the rest of the code?
Thanks in advance,
--Aaron                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Based on what you've posted, the only thing I can think of is that you've got an older version of Zag in which start() was not public. Might be a classpath issue, might just be that you didn't recompile Zag.

Similar Messages

  • Public parts not visible across SCs

    Hello,
    in one product we have two software components: one for COMMON functionality and another for our SERVICE. In the COMMON SC we defined our exception classes and made them available as public parts. All steps until approval have been made and the new version of COMMON was imported for development for the SERVICE SC.
    Unfortunately, we are not able to reference the public part for the exception classes in the SC "SERVICE". Any idea why the public parts are not visible accross the software components?
    Regards,
    Volker

    Renjith,
    I had similar problem and its fixed now. What you need to do is..
    If you are adding an SC from Track A to Track B, then
    1. Choose track B in CMS
    2. Click on ¡§Landscape Configurator¡¨
    3. Add the SC of track A into ¡§Required Software Components¡¨
    4. In Track Data tab, select the SC in ¡§Software Components for Development¡¨ area.
    5. Click ¡§View/Edit XML content..¡¨
    6. Add the 2 lines in between ***
    **<used-compartment>vendorname_TrackA_1</used-compartment>**
    </dependencies>
    <build-variants>
    <build-variant name="default" required-for-activation="yes">
    <variant-mappings>
    <variant-mapping used-compartment="sap.com_SAP_JTECHS_1" used-variant-name="default"/>
    <variant-mapping used-compartment="sap.com_SAP-JEE_1" used-variant-name="default"/>
    <variant-mapping used-compartment="sap.com_SAP_BUILDT_1" used-variant-name="default"/>
    **<variant-mapping used-compartment=" vendorname_TrackA_1" used-variant-name="default"/>**
    </variant-mappings>
    </build-variant>
    </build-variants>
    7. Click on ¡§Back¡¨
    8. Save the track B.
    9. Click on ¡§Transport Studio¡¨
    10. Import each SC (there should be 4 listed. 3 from sap.com and 1 from track A) one at a time. First import sap.com¡¦s SCs.
    Thanks,
    Kiran

  • CRM 2007 Upgrade - Std Comm. Method not visible in "More Fields"

    Hi Gurus
    We recently upgraded from CRM 5.0 to CRM 2007.
    I'm verifying the Identify Account views, when I compare the "More Fields" view between CRM 5.0 and CRM 2007, the "Std Comm. Method field is not there.
    I though I could add this via configuration mode but the only Comm Method field I can find does not have a drop down list associated with it which doesn't make sense.
    Has anyone else had this same issue and how resolved.
    Many Thanks
    Panduranga

    The Comm Type field is supplied but without a drop down list as it did in CRM 5.0
    We have to modify the field to include the drop down.
    A loss in Standard Functionality!!!

  • ADF 11g: Client Interface method not 'visible' in create of Action Binding

    Hello!
    I have a simple AM method that I have exposed through client interface. Now I am trying to create action binding in one of the PageDef files so that I can execute some code before the page renders. This worked fine in JDEV 10g. However, for some reason when I try to create action binding and select AM, 'Operation' gets disabled and hence I am unable to use my method?
    Anyone with similar problem?

    I'm not sure what changed , but you are aware that you can do this using a bounded task flow and put your method call as start activity in the task flow before going to the page.
    If that's not what you intend to do, please describe your use case.
    Timo

  • Receipt method not visible in transactions

    I have attached a receipt method to a customer in r12. When i am manually creating an invoice for the customer in the same operating unit, i am not getting any Receipt method. it states that there's no list of values. I have define receipt method and have attached a bank too for the operating unit. Please let me know from where this receipt method field in transaction form is coming. Am i missing any profile options or anything else. The instance is R12.1.2
    Thanks & Regards,
    Mainak

    Hi Ramesh,
    If you take a look at the answer I gave you to one of your questions (Re: Payroll and Payslip generation you will see that you have to run "Prepayments".
    You can view the results (including the payment method) on the following forms:
    1) View > Payroll Process Results
    or
    2) View > Assignment Process Results
    Regards,
    Pablo

  • Inherited methods--not visible

    Hi All,
    I am trying to create a class zabc by inherting class CL_BSP_MODEL.
    But, i can not see any methods , interfaces and attributes of class CL_BSP_MODEL in the newly created class.
    What could be the error.Please suggest.
    Thanks
    --Pradeep

    Need to unmark check box Filter in methods tab

  • Public Folders not visible in outlook 2010 for some

    Migrated exchange 2007 to 2013. I know Public Folders are a mailbox now.
    My question is why do some users with outlook 2010 see the Public Folders under "Tasks" on the left vertical bottom of outlook with "Folder List" highlighted and other DON'T -They just don't see anything under "Tasks" on the
    left vertical bottom of outlook with "Folder List" highlighted
    Also (in a newly created email) if they go to the address book drop down click on Public Folders entry its empty.
    any help would be appreciated
    RJM

    Hi RJM,
    Except above links, I also recommend you refer to the following article to migrate the PF from exchange 2007 to 2013:
    http://blogs.technet.com/b/meamcs/archive/2013/07/25/part-4-step-by-step-exchange-2007-to-2013-migration.aspx
    Check the status
    Once the migration reached the AutoSuspended state as shown below, proceed to the next steps, otherwise you must wait as this may take some time based on your PF size.
    Get-PublicFolderMigrationRequest | Get-PublicFolderMigrationRequestStatistics
    Lock Down PF for Migration (Down time is required, as during this phase PF will bot be accessible for all users)
    Set-OrganizationConfig -PublicFoldersLockedForMigration:$true
    Set-PublicFolderMigrationRequest -Identity \PublicFolderMigration -PreventCompletion:$false    
    Resume-PublicFolderMigrationRequest -Identity \PublicFolderMigration
    Test and Unlock the PF Migration
    I will configure a test user to use the new PF using the following command:
    Set-Mailbox -Identity mohsaeed -DefaultPublicFolderMailbox mailbox1
    Open the test user mailbox and run some tests: Create new post, view old posts, check permissions
    If all tests passed successful proceed to next step.
    Get-Mailbox -PublicFolder | Set-Mailbox -PublicFolder -IsExcludedFromServingHierarchy $false    
    Set-OrganizationConfig -PublicFolderMigrationComplete:$true
    Best regards,
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Niko Cheng
    TechNet Community Support

  • Credit card payment method not visible

    How can that be? Im in Vietnam, my billing address is danish.

    Hi Ramesh,
    If you take a look at the answer I gave you to one of your questions (Re: Payroll and Payslip generation you will see that you have to run "Prepayments".
    You can view the results (including the payment method) on the following forms:
    1) View > Payroll Process Results
    or
    2) View > Assignment Process Results
    Regards,
    Pablo

  • The method clone() from the type Object is not visible

    Hi,
    This is my 1st post here for a few years, i have just returned to java.
    I am working through a java gaming book, and the "The method clone() from the type Object is not visible" appears, preventing the program from running. I understand "clone" as making a new copy of an object, allowing multiple different copies to be made.
    The error occurs here
    public Object clone() {
            // use reflection to create the correct subclass
            Constructor constructor = getClass().getConstructors()[0];
            try {
                return constructor.newInstance(new Object[] {
                    (Animation)left.clone(),
                    (Animation)right.clone(),
                    (Animation)deadLeft.clone(),
                    (Animation)deadRight.clone()
            catch (Exception ex) {
                // should never happen
                ex.printStackTrace();
                return null;
        }The whole code for this class is here
    package tilegame.sprites;
    import java.lang.reflect.Constructor;
    import graphics.*;
        A Creature is a Sprite that is affected by gravity and can
        die. It has four Animations: moving left, moving right,
        dying on the left, and dying on the right.
    public abstract class Creature extends Sprite {
            Amount of time to go from STATE_DYING to STATE_DEAD.
        private static final int DIE_TIME = 1000;
        public static final int STATE_NORMAL = 0;
        public static final int STATE_DYING = 1;
        public static final int STATE_DEAD = 2;
        private Animation left;
        private Animation right;
        private Animation deadLeft;
        private Animation deadRight;
        private int state;
        private long stateTime;
            Creates a new Creature with the specified Animations.
        public Creature(Animation left, Animation right,
            Animation deadLeft, Animation deadRight)
            super(right);
            this.left = left;
            this.right = right;
            this.deadLeft = deadLeft;
            this.deadRight = deadRight;
            state = STATE_NORMAL;
        public Object clone() {
            // use reflection to create the correct subclass
            Constructor constructor = getClass().getConstructors()[0];
            try {
                return constructor.newInstance(new Object[] {
                    (Animation)left.clone(),
                    (Animation)right.clone(),
                    (Animation)deadLeft.clone(),
                    (Animation)deadRight.clone()
            catch (Exception ex) {
                // should never happen
                ex.printStackTrace();
                return null;
            Gets the maximum speed of this Creature.
        public float getMaxSpeed() {
            return 0;
            Wakes up the creature when the Creature first appears
            on screen. Normally, the creature starts moving left.
        public void wakeUp() {
            if (getState() == STATE_NORMAL && getVelocityX() == 0) {
                setVelocityX(-getMaxSpeed());
            Gets the state of this Creature. The state is either
            STATE_NORMAL, STATE_DYING, or STATE_DEAD.
        public int getState() {
            return state;
            Sets the state of this Creature to STATE_NORMAL,
            STATE_DYING, or STATE_DEAD.
        public void setState(int state) {
            if (this.state != state) {
                this.state = state;
                stateTime = 0;
                if (state == STATE_DYING) {
                    setVelocityX(0);
                    setVelocityY(0);
            Checks if this creature is alive.
        public boolean isAlive() {
            return (state == STATE_NORMAL);
            Checks if this creature is flying.
        public boolean isFlying() {
            return false;
            Called before update() if the creature collided with a
            tile horizontally.
        public void collideHorizontal() {
            setVelocityX(-getVelocityX());
            Called before update() if the creature collided with a
            tile vertically.
        public void collideVertical() {
            setVelocityY(0);
            Updates the animaton for this creature.
        public void update(long elapsedTime) {
            // select the correct Animation
            Animation newAnim = anim;
            if (getVelocityX() < 0) {
                newAnim = left;
            else if (getVelocityX() > 0) {
                newAnim = right;
            if (state == STATE_DYING && newAnim == left) {
                newAnim = deadLeft;
            else if (state == STATE_DYING && newAnim == right) {
                newAnim = deadRight;
            // update the Animation
            if (anim != newAnim) {
                anim = newAnim;
                anim.start();
            else {
                anim.update(elapsedTime);
            // update to "dead" state
            stateTime += elapsedTime;
            if (state == STATE_DYING && stateTime >= DIE_TIME) {
                setState(STATE_DEAD);
    }Any advice? Is it "protected"? Is the code out-of-date?
    thankyou,
    Lance 28

    Lance28 wrote:
    Any advice? Is it "protected"? Is the code out-of-date?Welcome to the wonderful world of Cloneable. In answer to your first question: Object's clone() method is protected.
    A quote from Josh Bloch's "Effective Java" (Item 10):
    "A class that implements Cloneable is expected to provide a properly functioning public clone() method. It is not, in general, possible to do so unless +all+ of the class's superclasses provide a well-behaved clone implementation, whether public or protected."
    One way to check that would be to see if super.clone() works. Their method uses reflection to try and construct a valid Creature, but it relies on Animation's clone() method, which itself may be faulty. Bloch suggests the following pattern:public Object clone() throws CloneNotSupportedException {
       ThisClass copy = (ThisClass) super.clone();
       // do any additional initialization required...
       return copy
    if that doesn't work, you +may+ be out of luck.
    Another thing to note is that Object's clone() method returns a +shallow+ copy of the original object. If it contains any data structures (eg, Collections or arrays) that point to other objects, you may find that your cloned object is now sharing those with the original.
    Good luck.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Instance Dependent Public Method is not working for Workflow

    Hello Experts,
    I have made Custom class for  a workflow. This class is triggering the WF fine but the problem is while trying to execute a WF task which contains a Instance Dependent & Public  method its not working , the WF task is not processing though I'm passing the instance of the class  properly from WF to WF task . When I'm changing the method to Static & Public then the workitem is executing perfectly. Can you please help & suggest the way to find the problem ?
    Thanks & Regards ,
    Jeet

    Are you absolutely sure that you have the instance of the object in the workflow container? Open the technical log the see if the object instance is there - or is the container element initial (or "not set")?
    yes it is instantiated properly no error over there.
    What about if you test the method directly in SE24 (as an instance method)? Is it working then? If you can make it work in SE24 as an instance method and you are sure that the instance exists in the workflow,
    I have checked the class in a stand alone run in this case also it runs fine as before.
    The obvious question of course is that have you implemented the IF_WORKFLOW interface methods (the two first ones).
    it is coded like below
    BI_PERSISTENT~FIND_BY_LPOR
      create object result
          type
            (lpor-typeid)
          exporting
            ip_key = lpor-instid.
    CONSTRUCTOR
       me->m_KEY    = ip_key.
       me->m_por-catid = 'CL'.
       me->m_por-typeid = CL_ZZZ'.
       me->m_por-instid = me->m_key
    BI_PERSISTENT~LPOR
    result =  me->m_por.
    Main confusion is Method is working only if declared STATIC & PUBLIC  but not for the INSTANCE DEPENDENT & PUBLIC.

  • Public method of javabean not executed when invoked with FBEAN.INVOKE_NUM

    Hi,
    i write a trivial javabean with public method named 'somme' that return int value and take no arguments.
    i my PL/SQL trigger code, i register an instance of the bean and take a call to the public method 'somme' that return a int value that i display in display item of my form.
    the java bean is well registered and i verified that the code in the constructor is well executed. But the call to the public methode dont work.
    thank you for your help.

    Hello,
    it's a mistake for me. when i instanciate the javabean from another java classe in jdev, the execution is well and the process exited with code 0.
    but when i instanciate it from pl/sql the problem occurs.
    i commented all the lines of my code except the line that register the javabean
         FBean.Register_Bean(hBean, 1, 'amar.FbeanExemple');
    and i have the same problem even though the code in the constructor is executed.
    the error occurs after the code in the concstructor is executed.
    i folllow all the information about this error:
    Contenu de la console Java
    JInitiator: Version 1.3.1.18
    Utilisation de la version JRE 1.3.1.18-internal Java HotSpot(TM) Client VM
    Répertoire d'accueil de l'utilisateur = C:\Documents and Settings\amsai1
    Configuration du proxy : aucun proxy
    JAR cache enabled
    Location: C:\Documents and Settings\amsai1\Oracle Jar Cache
    Maximum size: 50 MB
    Compression level: 0
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    Loading http://sit-p-amsai1.sit.ulaval.ca:8889/forms90/java/banicons.jar from JAR cache
    Loading http://sit-p-amsai1.sit.ulaval.ca:8889/forms90/java/bannerui71.jar from JAR cache
    Loading http://sit-p-amsai1.sit.ulaval.ca:8889/forms90/java/banspecial.jar from JAR cache
    Loading http://sit-p-amsai1.sit.ulaval.ca:8889/forms90/java/banorep71.jar from JAR cache
    Loading http://sit-p-amsai1.sit.ulaval.ca:8889/forms90/java/bannerid71.jar from JAR cache
    Loading http://sit-p-amsai1.sit.ulaval.ca:8889/forms90/java/f90all_jinit.jar from JAR cache
    Loading http://sit-p-amsai1.sit.ulaval.ca:8889/forms90/java/missing.jar from JAR cache proxyHost=null proxyPort=0 connectMode=HTTP, native. La version Forms Applet est : 9.0.4.0
    *** VBean null PropertyManager for id = FOREGROUND
    *** VBean Got FOREGROUND = null
    *** VBean null PropertyManager for id = BACKGROUND
    *** VBean Got BACKGROUND = null *** VBean Setting debugMode to ALL *** VBean Setting beanName to amar.FbeanExemple
    Loading http://sit-p-amsai1.sit.ulaval.ca:8889/forms90/java/fbeanexemple.jar from JAR cache
    Instance hhhjhyu du bean est créée op1 = 0 op2 = 0
    *** VBean Failed to instantiate class: amar.FbeanExemple java.lang.ClassCastException: amar.FbeanExemple
    Ma classe Java
    package amar;
    public class FbeanExemple
         private int op1;
         private int op2;
    public FbeanExemple()
    System.out.println("Instance hhhjhyu du bean est créée");
    System.out.println("op1 = " + this.op1);
    System.out.println("op2 = " + this.op2);
    public int additionner()
    return this.op1 + this.op2;
    public int soustraire()
    return this.op1 - this.op2;
    public int sommer(int a, int b)
    return a + b;
    public void faire()
    System.out.println("je suis passe par ici");
    public void setOp1(int a)
    this.op1 = a;
    public void setOp2(int a)
    this.op2 = a;
    public int getOp1()
    return this.op1;
    public int getOp2()
    return this.op2;
    Mon code PL/SQL
    declare
         hBean ITEM := Find_Item('CTL.BEAN_AREA4');
         result INTEGER;
    begin
         FBEAN.SET_LOGGING_MODE(hBean,1,FBEAN.LOG_ALL);
         FBean.Register_Bean(hBean, 1, 'amar.FbeanExemple');
         result := FBean.Invoke_Num(hBean, 1, 'additionner');
         :CTL.R := result;
    end;
    Thank you for your help.

  • SAP RM: How can I create a Node when the node is not visible for the user

    Hi,
    Product: SAP records Management for Public Sector
    Version: 7.00
    is it possible to create a instance node when the model not is not visible for the active user?
    I looked in the CL_SRM_XML_REC_MODEL but every methode I used gave me no results with the special user.
    Regards and thanks for every beginning
    Fanninger Thomas

    Hi,
    here an example.
    When I use the method CL_SRM_XML_REC_INSTANCE->IF_SRM_XML_POID~GET_ALL( POID_TAB COUNT_USER_REST COUNT_POID_AUTH ).
    When I used the user with no right for viewing the invisible nodes I get no elements in the tabelle POID_TAB and 38 in the value COUNT_USER_REST.
    So did any one know a solution you can I create a nodes and change the restriction for the new node with the normal user?
    Regards
    Fanninger Thomas
    Edited by: Thomas Fanninger on Feb 5, 2008 8:15 AM

  • Output not visible !

    Can you see why the BouncingBalls are not visible ?
    Something is wrong with the bounce() method in the BallDemo class
    I tried to pick it apart one line at a time. No compilation errors.
    Here is the bounce() method and the BallDemo class in which it resides and the BoungingBall class that defines the balls.
    Norman
    //bounce method
    public void bounce()
               int ground = 400;   // position of the ground line
               int numberOfBalls = 0;
               myCanvas.setVisible(true);
               ArrayList balls = new ArrayList();
               // draw the ground
               myCanvas.drawLine(50, ground, 550, ground);
               //ex 5.50 (a)
               System.out.println("Type in the number of balls you would like to see bouncing and hit enter");
                 numberOfBalls = input.readInt();
                 BouncingBall myBall;
              myBall =   new BouncingBall( 100,  0,  24,  Color.blue,
                                ground,  myCanvas);
                //(b)
                for(int i = 0; i < numberOfBalls; i++)
                  //(c) (d)
               Random rg = new Random(255);
                BouncingBall newBall =  new BouncingBall(i + 100, 0, 16, new Color(rg.nextInt(255),rg.nextInt(255),rg.nextInt(255)), ground, myCanvas);
                //add the ball to the ArrayList object
               balls.add(newBall);
              for(int i = 0; i < numberOfBalls; i++)
                     BouncingBall ball = (BouncingBall)balls.get(i);
                     ball.draw();
                 // make the balls bounce
                 boolean finished =  false;
                 while(!finished) {
                  myCanvas.wait(50);           // small delay
                  ball.move();
                   // stop once ball has travelled a certain distance on x axis
                   if(ball.getXPosition() >= 550 )
                       finished = true;
               }//move loop
                     ball.erase();
             }//for loop
           }//bounce method
    import java.awt.*;
    //(d)
    import java.awt.Color;
    import java.util.Random;
    import java.awt.geom.*;
    //ex5.50 (a)
    import java.util.*;
    import java.io.*;
    * Class BallDemo - provides two short demonstrations showing how to use the
    * Canvas class.
    //(a) Change the bounce() method in the BallDemo class to let the user
    //choose how many balls should be bouncing
    //(b) Use a collection to store the balls
    //(c) Place the balls in a row along the top of the canvas.
    public class BallDemo
        private Canvas myCanvas;
        FormattedInput input;
         * Create a BallDemo object. Creates a fresh canvas and makes it visible.
        public BallDemo()
            myCanvas = new Canvas("Ball Demo", 600, 500);
            input = new FormattedInput();
            myCanvas.setVisible(true);
         * This method demonstrates some of the drawing operations that are
         * available on a Canvas object.
        public void drawDemo()
            myCanvas.setFont(new Font("helvetica", Font.BOLD, 14));
            myCanvas.setForegroundColor(Color.red);
            myCanvas.setBackgroundColor(Color.yellow);
            myCanvas.drawString("We can draw text, ...", 20, 50);
            myCanvas.wait(1000);
            myCanvas.setForegroundColor(Color.black);
            myCanvas.drawString("...draw lines...", 60, 70);
            myCanvas.wait(500);
            myCanvas.setForegroundColor(Color.blue);
            myCanvas.drawLine(200, 20, 300, 450);
            myCanvas.wait(500);
            myCanvas.setForegroundColor(Color.blue);
            myCanvas.drawLine(220, 100, 570, 260);
            myCanvas.wait(500);
            myCanvas.setForegroundColor(Color.green);
            myCanvas.drawLine(290, 10, 620, 220);
            myCanvas.wait(1000);
            myCanvas.setForegroundColor(Color.white);
            myCanvas.drawString("...and shapes!", 110, 90);
        //    myCanvas.setForegroundColor(Color.red);
                    // the shape to draw and move
            int xPos = 10;
            Rectangle rect = new Rectangle(xPos, 150, 30, 20);
            // move the rectangle across the screen
            for(int i = 0; i < 600; i ++) {
                myCanvas.fill(rect);
                myCanvas.wait(10);
                myCanvas.erase(rect);
                xPos++;
                rect.setLocation(xPos, 150);
            // at the end of the move, draw once more so that it remains visible
            myCanvas.fill(rect);
           //ex 5.48
           public void drawFrame()
             Dimension myDimension =new Dimension( myCanvas.getSize());
             //Rectangle rectangle = new Rectangle(10,10,myDimension.width,  myDimension.height);
             //page 136
            Rectangle rectangle = new Rectangle(10,10,580,480);
             myCanvas.fill(rectangle);
             public void bounce()
               int ground = 400;   // position of the ground line
               int numberOfBalls = 0;
               myCanvas.setVisible(true);
               ArrayList balls = new ArrayList();
               // draw the ground
               myCanvas.drawLine(50, ground, 550, ground);
               //ex 5.50 (a)
               System.out.println("Type in the number of balls you would like to see bouncing and hit enter");
                 numberOfBalls = input.readInt();
                 BouncingBall myBall;
              myBall =   new BouncingBall( 100,  0,  24,  Color.blue,
                                ground,  myCanvas);
                //(b)
                for(int i = 0; i < numberOfBalls; i++)
                  //(c) (d)
               Random rg = new Random(255);
                BouncingBall newBall =  new BouncingBall(i + 100, 0, 16, new Color(rg.nextInt(255),rg.nextInt(255),rg.nextInt(255)), ground, myCanvas);
                //add the ball to the ArrayList object
               balls.add(newBall);
              for(int i = 0; i < numberOfBalls; i++)
                     BouncingBall ball = (BouncingBall)balls.get(i);
                     ball.draw();
                 // make the balls bounce
                 boolean finished =  false;
                 while(!finished) {
                  myCanvas.wait(50);           // small delay
                  ball.move();
                   // stop once ball has travelled a certain distance on x axis
                   if(ball.getXPosition() >= 550 )
                       finished = true;
               }//move loop
                     ball.erase();
             }//for loop
           }//bounce method
         }//endof class
    import java.awt.*;
    import java.awt.geom.*;
    * Class BouncingBall - a graphical ball that observes the effect of gravity. The ball
    * has the ability to move. Details of movement are determined by the ball itself. It
    * will fall downwards, accelerating with time due to the effect of gravity, and bounce
    * upward again when hitting the ground.
    * This movement can be initiated by repeated calls to the "move" method.
    * @version 1.1  (23-Jan-2002)
    public class BouncingBall
        private static final int gravity = 3;  // effect of gravity
        private int ballDegradation = 2;
        private Ellipse2D.Double circle;
        private Color color;
        private int diameter;
        private int xPosition;
        private int yPosition;
        private final int groundPosition;      // y position of ground
        private Canvas canvas;
        private int ySpeed = 1;                // initial downward speed
         * Constructor for objects of class BouncingBall
         * @param xPos  the horizontal coordinate of the ball
         * @param yPos  the vertical coordinate of the ball
         * @param ballDiameter  the diameter (in pixels) of the ball
         * @param ballColor  the color of the ball
         * @param groundPos  the position of the ground (where the wall will bounce)
         * @param drawingCanvas  the canvas to draw this ball on
        public BouncingBall(int xPos, int yPos, int ballDiameter, Color ballColor,
                            int groundPos, Canvas drawingCanvas)
            xPosition = xPos;
            yPosition = yPos;
            color = ballColor;
            diameter = ballDiameter;
            groundPosition = groundPos;
            canvas = drawingCanvas;
         * Draw this ball at its current position onto the canvas.
        public void draw()
            canvas.setForegroundColor(color);
            canvas.fillCircle(xPosition, yPosition, diameter);
         * Erase this ball at its current position.
        public void erase()
            canvas.eraseCircle(xPosition, yPosition, diameter);
         * Move this ball according to its position and speed and redraw.
        public void move()
            // remove from canvas at the current position
            erase();
            // compute new position
            ySpeed += gravity;
            yPosition += ySpeed;
            xPosition +=2;
            // check if it has hit the ground
            if(yPosition >= (groundPosition - diameter) && ySpeed > 0) {
                yPosition = (int)(groundPosition - diameter);
                ySpeed = -ySpeed + ballDegradation;
            // draw again at new position
            draw();
         * return the horizontal position of this ball
        public int getXPosition()
            return xPosition;
         * return the vertical position of this ball
        public int getYPosition()
            return yPosition;
    }

    I don't even have to study your code - all I have to do is search the HTML on this screen and see there is no reference to run() or threads. You won't make squat move unless you use threads.

  • DIR through CV01n -not visible in easy DMS

    Dear all,
    1)I have created DIR through CV01n . But its not visible in public/private folder in the easy DMS. but when i do search the same DIR,  it is visible in search folder.when i am trying to move same DIR to public folder or any folder system has given a pop-up and asks  "do you want to like or copy this DIR " .
    wht is that?
    2) Is it possible to link the DIR directly to the folder at time of creation or uploading through browser or other method.
    kindly help

    Hi Harish,
    regarding your questions I have to inform you that the reason for this is that the create document info record is not inlcuded in the document BOM (e.g. header EDIPUBLICFOLDER). So you would have to add the new DIR to the document structure first.
    If you create a new document directly in EasyDMS then it will be automatically added to the related folder structure.
    In the backend I think you can use the new document browser functionality in CV01N to create new documents which are also just added to a document BOM.  Therefore please press the button 'Select Document via' in transaction CV01N and choose weither 'Browser' or 'Selection Screen and Browser'. In the context menu of the browser you will find to item 'Create'.
    Best regards,
    Christoph

  • Class functions of .jar library not visible..

    hi...
    i have created some classes in the default package. i then created a jar file of the whole project and imported this jar to another project as library..The classes of the imported library are visible..however i am not able to see any of the functions of that class....despite everything being public....wat cld be the problem..?

    Ok i have shifted it to a different package...still the methods are not visible..i can see all the classes but none of their methods...all are public...is there ne MANIFES editing problem...?

Maybe you are looking for

  • SQL script calling HOST

    Hi, all. We've got a SQL script that will call the HOST and pass some parameters. One parameter, JOB_TYPE is set from a function call. The other variables are passed into the SQL script as parameters and they work fine. However, the JOB_TYPE variable

  • How to use function of an abstract class??

    Hi all, I want to use the format(object obj) function of the package java.text.Format. But as the Format class is an abstract class i could not instantiate it, so that i can call the format(object obj) method using the dot(.) operator. I know what is

  • WARN  kodo.jdbc.Schema  - Existing column "JDOID" on table

    Sorry, I've posted this before and never got back with some debug. I'm getting WARN kodo.jdbc.Schema - Existing column "JDOID" on table "<TABLE NAME HERE>" is incompatible with the same column in the given schema definition. I running kodo.jdbc.meta.

  • Acceleration thru GPU in Photoshop CS4 (Intel GMA X4500HD)

    Does Intel GMA 4500MHD support GPU acceleration in Adobe Photoshop CS4? (According to recommendation about OpenGL and Shared Model this GPU should support it, but Intel GPUs are not included in Adobe list of supported GPUs at all and I have found 2 p

  • Pixelated/ Digitized Images

    I finished a shoot earlier in the week and attempted to import the images to Aperture. The images look fine on my LCD screen on the back of my D70 an DD200. However, after importing they are distorted. Has anyone ever experienced this problem? If so,