Variable Not Found in Class Error

I have a project which I organized the source in 4 packages. I have 4 source programs which use an external class which I don't have the source. So I imported the class and brought a copy of the class straight under the classes directory. Via "Project Properties" I modified the "Profiles + Development + Path" with the pass of this added class into the "Additional Classpath:" section. When I compile I'm getting this error: "Error(765,18): variable InfraAPI not found in class com.eds.soc.common.SocSharesEvent". It is not finding the InfraAPI.class that I imported. What am I doing wrong?

You might want to use the JDeveloper library mechanism for this.
Create a JAR with the files you need, then in project properties->libraries add this jar.

Similar Messages

  • Newbie:( error "Variable not found in class" help ppls

    Hello, making a program for school having a problem with my code
    because i am combining and modifying programs to suit my requirements,
    the error is as follows
    Error:(185) variable EXIT_ON_CLOSE not found in class javax.swing.JFrame
    can anyone give me some idea's on how to fix this or where i have gone wrong have i left something vital out?
    thanks

    Hello, making a program for school having a problem
    with my code
    because i am combining and modifying programs to suit
    my requirements, Script kiddie. I see. Bad approach.
    the error is as follows
    Error:(185) variable EXIT_ON_CLOSE not found in class
    javax.swing.JFrame
    can anyone give me some idea's on how to fix this or
    where i have gone wrong have i left something vital
    out?Weird error, since EXIT_ON_CLOSE is defines in JFrame. Are you using an IDE? Save, clean, rebuild. Make sure you imported the class, too.

  • Variable not found in class....?????

    package untitled1;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    public class Applet1 extends Applet
    Button knop1, knop2, knop3;
    TextField tekstvakje;
    Font opmaak1, opmaak2, opmaak3;
    public void init()
    knop1 = new Button("knop 1");
    knop1.addActionListener(new Knop1Handler());
    knop2 = new Button("knop 2");
    knop2.addActionListener(new Knop2Handler());
    knop3 = new Button("knop 3");
    knop3.addActionListener(new Knop3Handler());
    tekstvakje = new TextField("test",10);
    opmaak1 = new Font("Serif", Font.BOLD, 10);
    opmaak2 = new Font("Serif", Font.ITALIC, 15);
    opmaak3 = new Font("Serif", Font.PLAIN, 20);
    add(knop1);
    add(knop2);
    add(knop3);
    add(tekstvakje);
    class Knop1Handler implements ActionListener
    public void actionPerformed(ActionEvent e)
    tekstvakje.setFont(opmaak1);
    class Knop2Handler implements ActionListener
    public void actionPerformed(ActionEvent e)
    tekstvakje.setFont(opmaak2);
    class Knop3Handler implements ActionListener
    public void actionPerformed(ActionEvent e)
    tekstvakje.setFont(opmaak3);
    error message:
    "Applet1.java": Error #: 300 : variable opmaak1 not found in class untitled1.Knop1Handler at line 38, column 28
    "Applet1.java": Error #: 300 : variable tekstvakje not found in class untitled1.Knop1Handler at line 38, column 9
    "Applet1.java": Error #: 300 : variable opmaak2 not found in class untitled1.Knop2Handler at line 45, column 28
    and so on........
    what's the reason he don't fount this variables??? the KnopHandlers are a subclass fromm Applet so I don't understand the subclass can't find the variables....
    sorry for this stupid question, but I just started with making Object Orientated code.

    moi,
    Ten eerste is Knop1Handler geen subclass van Applet maar van Object. Alle classen erfen van object of een subclass van Object.
    Ik neem aan dat Knop1Handler een aparte class is in een apart bestand. Dan kan hij nooit attribute van Applet1 gebruiken. Dat gaat enkel via inner classes.
    Je kan verschillende dingen doen:
    je maakt de Knop1Handler class een inner class wat in dit geval de mooiste oplossing is.
    je verplaatst Font opmaak1 naar class Knop1Handler.
    je maakt Font opmaak1 static en roept in class Knop1Handler Applet1.opmaak1. wat een slechte oplossing is

  • Variable not found in class - Newbie

    public void executeSearch() {
    try {
    File startSearchDir = new File(directory);
    } catch (NullPointerException npe) {
    System.out.println("The file path entered is not valid.");
    return;
    File [] fileArray = startSearchDir.listFiles();
    Why is the startSearchDir variable not found on the last line of this method?
    Thanks,
    Devon

    This is the whole class. I have tried the previous suggestion but then I get a duplicate declaration for the variable.
    package PgScan;
    import java.awt.*;
    import javax.swing.JPanel;
    import java.io.*;
    import java.lang.reflect.Array;
    * Title: Page Scanner
    * Description: Page scanner recurisively scans through subdirectories through a provided path and
    * for a provided tag.
    * Copyright: Copyright (c) 2001
    * @author
    * @version 1.0
    public class PgScan extends JPanel {
    BorderLayout borderLayout1 = new BorderLayout();
    private String directory = "";
    private String searchString = "";
    public PgScan() {
    try {
    jbInit();
    catch(Exception ex) {
    ex.printStackTrace();
    private void jbInit() throws Exception {
    this.setLayout(borderLayout1);
    //Main Method
    public static void main(String[] args) {
    PgScan pgScan1 = new PgScan();
    //Properties
    public String getDirectory() {
    return directory;
    public void setDirectory(String newDirectory) {
    directory = newDirectory;
    public String getSearchString() {
    return searchString;
    public void setSearchString(String newString) {
    searchString = newString;
    //Methods
    public void executeSearch() {
    try {
    File startSearchDir = new File(directory);
    } catch (NullPointerException npe) {
    System.out.println("The file path entered is not valid.");
    return;
    File [] fileArray = startSearchDir.listFiles();
    TIA,
    Devon

  • Variable NOT Found in Class. I'm Confused!

    Variable "no" not found in class. I don't understand. Also, this code is really a mess. If a User enters an integer, then another and another, it's suppose to count the number of integers and how many times each was chosen. Example 1.4.4.5.7.7.7.8. It would print out that 1 was entered 1 time, 4 was entered 2 times, 5 once, 7 entered three times, and 8 once, etc.. Anyway, below is the code with the varibale that can't be found.
    public class Arbitrary
      public static void main(String[] args)
        final int NUMNUMERIC = 50;
        String str, another = "y";
        while (another.equals("y"))
          int[]myNumbers = new int[NUMNUMERIC];
        char current;  //the current character being processed
        String line = Console.readString ("Enter an integer from 0-50:");
        for (int no = 0; no <line.length();no++);
          current = line.charAt(no);
        System.out.println("The total of numbers is:" +current);
        another = Console.readString ("Type another number or press 0 to quit:");
    }

    for (int no = 0; no <line.length();no++);                    try removing this ";" ----^

  • Method not found in class errors when compiling project

    Hi,
    I am getting the following errors when compiling my project:
    Error(3,8): ReqLinesNotificationsVORowImpl not found
    Error(25,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(31,9): method setAttributeInternal(java.lang.String, oracle.jbo.domain.Number) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(37,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(43,9): method setAttributeInternal(java.lang.String, oracle.jbo.domain.Number) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(49,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(55,9): method setAttributeInternal(java.lang.String, oracle.jbo.domain.Number) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(61,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(67,9): method setAttributeInternal(java.lang.String, java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(67,9): method setAttributeInternal(java.lang.String, java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(79,9): method setAttributeInternal(java.lang.String, java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(85,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(91,9): method setAttributeInternal(java.lang.String, java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(97,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(103,9): method setAttributeInternal(java.lang.String, java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(109,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(115,9): method setAttributeInternal(java.lang.String, java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(121,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(127,9): method setAttributeInternal(java.lang.String, oracle.jbo.domain.Number) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(133,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(139,9): method setAttributeInternal(java.lang.String, oracle.jbo.domain.Number) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(145,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(151,9): method setAttributeInternal(java.lang.String, oracle.jbo.domain.Number) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(157,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(163,9): method setAttributeInternal(java.lang.String, java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(169,25): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(175,9): method setAttributeInternal(java.lang.String, java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(181,23): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(187,9): method setAttributeInternal(java.lang.String, oracle.jbo.domain.Date) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(193,23): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    Error(199,9): method setAttributeInternal(java.lang.String, oracle.jbo.domain.Date) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImplError(205,23): method getAttributeInternal(java.lang.String) not found in class oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExRowImpl
    I have ReqLinesNotificationsVORowImpl and ReqLinesNotificationsVOImpl files in myprojects directory. Can anyone help please?
    Thanks

    Hi,
    From the error it seems that the code is refering ReqLinesNotificationsVOExRowImpl file.
    Please make sure that its class file is present in myclasses folder.
    Since u have mentioned that ReqLinesNotificationsVORowImpl is already placed in myclasses folder. Hope this should resolve your issue.
    Regards,
    Raj Papdeja

  • "method not found in class " error message !

    Dear People,
    I have an error message that says:
    "Clerk.java": Error #: 300 : method doTransaction(stan_ch15p622.Transaction) not found in class stan_ch15p622.Bank at line 36, column 12
    below is the Clerk class of the program.
    doTransaction() is defined below the constructor and is called at the
    bottom of the class.
    Thank you in advance
    Stan
    package stan_From_Ivor_Horton_ch15p622;
    public class Clerk implements Runnable
    private Bank theBank; // the employer. who the clerk works for
    private Transaction inTray; //holds a transaction
    public Clerk(Bank theBank)
    this.theBank = theBank;
    inTray = null; // no transaction initially
    //receive a transaction
    public void doTransaction(Transaction transaction)
    inTray = transaction;
    //The working clerk...
    public void run()
    while(true) // no transaction waiting ?
         while(inTray == null)
         try
         Thread.sleep(150); // then take a break
    catch(InterruptedException e)
         System.out.println(e);
         theBank.doTransaction(inTray);
         inTray = null;
    //you can check whether a clerk is busy by calling the isBusy() member
    // it returns true if the transaction is strill in progress
    public boolean isBusy()
    return inTray != null;
    }

    Dear Hambone3,
    Due to your help I was able to correct my error. I mispelled the
    method in the Bank class. I wrote "toTransaction" instead of
    "doTransaction".I have alwyas had a hard time interrpreting the
    error messages literally because many times I don't see the
    connection between the message and the error. Cold water over
    the brain is sometimes what I need.
    God bless you.
    Stan

  • Error: variable XMLInterface not found in class

    Hi,
    I am creating an XML Publisher Report Output from OAF Page.
    This is my code in CustAM
    public void initSunReportVO()
    SunReportVOImpl vo = getSunReportVO1();
    if(vo == null)
    MessageToken errTokens[] = {
    new MessageToken("OBJECT_NAME", "SunReportVO1")
    throw new OAException("AK", "FWK_TBX_OBJECT_NOT_FOUND", errTokens);
    } else
    vo.executeQuery();
    public void getSunReportDataXML()
    try {
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    OAViewObject vo = (OAViewObject)findViewObject("SunReportVO1");
    ((XMLNode) vo.writeXML(4, XMLInterface.XML_OPT_ALL_ROWS)).print(outputStream);
    System.out.println(outputStream.toString());
    catch(Exception e)
    throw new OAException (e.getMessage());
    I am getting the following errors.
    Error(1608,27): variable XMLInterface not found in class XXX.oracle.apps.po.requisition.server.custamImpl
    Could anyone help me how to resolve the above issues.
    Thanks in Advance.
    Sruthi

    Hi,
    WebExpensesAMImpl$ExpenseTypeAmount is an inner class that you cannot access from outside of the class in which it is specified
    Frank

  • Variable textArea not found in class javax.swing.JFrame...

    Making progress on this issue -- but still stuck. Again trying to get the text from a JTextArea on exit:
            frame.addWindowListener
           (new WindowAdapter() {
             public void windowClosing(WindowEvent e)
                System.out.println("Why me???" + frame.textArea.getText());
            });User MARSIAN helped me understand the scope fo the variables and now that has been fixed. Unfortunately I cannot access my variable textArea in the above code. If get this error:
    Error: variable textArea not found in class javax.swing.JFrame
    What am I doing wrong?
    import  java.net.*;
    import  javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import FragImpl.*;
    public class Framework extends WindowAdapter {
        public int numWindows = 0;
        private Point lastLocation = null;
        private int maxX = 500;
        private int maxY = 500;
        JFrame frame;
        public Framework() {
            newFrag();
            Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
            maxX = screenSize.width - 50;
            maxY = screenSize.height - 50;
            makeNewWindow();
        public void makeNewWindow() {
            frame = new MyFrame(this);  //*
            numWindows++;
            System.out.println("Number of windows: " + numWindows);
            if (lastLocation != null) {
                //Move the window over and down 40 pixels.
                lastLocation.translate(40, 40);
                if ((lastLocation.x > maxX) || (lastLocation.y > maxY)) {
                    lastLocation.setLocation(0, 0);
                frame.setLocation(lastLocation);
            } else {
                lastLocation = frame.getLocation();
            System.out.println("Frame location: " + lastLocation);
            frame.setVisible(true);
            frame.addWindowListener
           (new WindowAdapter() {
             public void windowClosing(WindowEvent e)
                System.out.println("Why me???" + frame.textArea.getText());
        //This method must be evoked from the event-dispatching thread.
        public void quit(JFrame frame) {
            if (quitConfirmed(frame)) {
                System.exit(0);
            System.out.println("Quit operation not confirmed; staying alive.");
        private boolean quitConfirmed(JFrame frame) {
            String s1 = "Quit";
            String s2 = "Cancel";
            Object[] options = {s1, s2};
            int n = JOptionPane.showOptionDialog(frame,
                    "Windows are still open.\nDo you really want to quit?",
                    "Quit Confirmation",
                    JOptionPane.YES_NO_OPTION,
                    JOptionPane.QUESTION_MESSAGE,
                    null,
                    options,
                    s1);
            if (n == JOptionPane.YES_OPTION) {
                return true;
            } else {
                return false;
         private void newFrag()
              Frag frag = new FragImpl();
        public static void main(String[] args) {
            Framework framework = new Framework();
    class MyFrame extends JFrame {
        protected Dimension defaultSize = new Dimension(200, 200);
        protected Framework framework = null;
        private Color color = Color.yellow;
        private Container c;
        JTextArea textArea;
        public MyFrame(Framework controller) {
            super("New Frame");
            framework = controller;
            setDefaultCloseOperation(DISPOSE_ON_CLOSE);
            setSize(defaultSize);
            //Create a text area.
            textArea = new JTextArea(
                    "This is an editable JTextArea " +
                    "that has been initialized with the setText method. " +
                    "A text area is a \"plain\" text component, " +
                    "which means that although it can display text " +
                    "in any font, all of the text is in the same font."
            textArea.setFont(new Font("Serif", Font.ITALIC, 16));
            textArea.setLineWrap(true);
            textArea.setWrapStyleWord(true);
            textArea.setBackground ( Color.yellow );
            JScrollPane areaScrollPane = new JScrollPane(textArea);
            //Create the status area.
            JPanel statusPane = new JPanel(new GridLayout(1, 1));
            ImageIcon icoOpen = null;
            URL url = null;
            try
                icoOpen = new ImageIcon("post_it0a.gif"); //("doc04d.gif");
            catch(Exception ex)
                ex.printStackTrace();
                System.exit(1);
            setIconImage(icoOpen.getImage());
            c = getContentPane();
            c.setBackground ( Color.yellow );
            c.add ( areaScrollPane, BorderLayout.CENTER )  ;
            c.add ( statusPane, BorderLayout.SOUTH );
            c.repaint ();
    }

    Yeah!!! It works. Turned out to be a combination of DrKlap's and Martisan's suggestions -- had to change var frame's declaration from JFrame to MyFrame:
        MyFrame frame;Next, created the external class -- but again changed JFrame references to MyFrame:
    public class ShowOnExit extends WindowAdapter {
    //   JFrame aFrame;
       MyFrame aFrame;
       public ShowOnExit(MyFrame f) {
          aFrame = f;
       public void windowClosing(WindowEvent e)
          System.out.println("Why me???" + aFrame.textArea.getText()); // aFrame here not frame !!!
    }This worked. So looks like even though the original code added a WindowListener to 'frame', the listener didn't couldn't access frame's methods unless it was explicitly passed in as a parameter. Let me know if that's wrong.
    Thanks again, all.

  • Compiler error "oracle.xml.parser.v2.XMLElement" not found in class com.ora

    Compiler error "oracle.xml.parser.v2.XMLElement" not found in class com.oracle.demos......?
    I am currently testing a simple sample application with a java code similar to the one shown at
    the bottom of this post.
    However during deployment/compilation the compiler gives an error:
    Error(26,23): XMLElement not found in class com.oracle.demos.orderbooking.ApproveImpl
    Additionally similar other errors appear:
    Error(23,66): JAXBException not found in class com.oracle.demos.orderbooking.ObjectFactory
    Error(51,58): UnmarshalException not found in class com.oracle.demos.orderbooking.ObjectFactory
    Error(9,92): Element not found in interface com.oracle.demos.orderbooking.Approve
    What's wrong?
    It seems to me that I have to add some (more) *.jar files/libraries to the project?
    Which *.jars and where should I add them in JDeveloper?
    source code:
    package com.oracle.demos.orderbooking;
    public class ApproveImpl extends com.oracle.demos.orderbooking.ApproveTypeImpl implements com.oracle.demos.orderbooking.Approve
    public ApproveImpl(oracle.xml.parser.v2.XMLElement node)
    super(node);
    }

    Hai James this the response I am getting can you please tell what should I write inside ora:getNodeValue() to get the value of node <genReturnText>
    The drag and dropping the variable name is not working, I have to write the path manually but I dont know how.
    <ns1:getRoutingAndFrameJumpersResponse xmlns:ns1="com.NetworkInstallations">
    -<com.GetRoutingAndFrameJumpersOutput>
    <destination>
    SW
    </destination>
    <e2EData>
    busProcOriginator
    </e2EData>
    <genReturnCode>
    40777
    </genReturnCode>
    <genReturnText>
    EMW_Get_Routing_And_FrameJumpers_Succeeded
    </genReturnText>
    <supplCode>
    ISY002
    </supplCode>
    <supplText>
    Transaction successfully completed.
    </supplText>
    <severityCode>
    S
    </severityCode>
    <retriable>
    false
    </retriable>
    </com.GetRoutingAndFrameJumpersOutput>
    </ns1:getRoutingAndFrameJumpersResponse>

  • "Class Circle not found in TryBouncingBalls" error message. Help !

    Dear People,
    I have an error message :
    "TryBouncingBalls.java": Error : class Circle not found in class stan_bluej_ch5_p135.TryBouncingBalls at line 67, "
    Circle circle = new Circle(xPos + 130, 30);
    below are the classes TryBouncingBalls, BouncingBall, BallDemo, Canvas
    Thank you in advance
    Stan
    package stan_bluej_ch5_p135;
    import java.awt.*;
    import java.awt.geom.*;
    public class TryBouncingBalls
    public static void main(String[] args)
    Canvas myCanvas = new Canvas("Creativity at its best");
    myCanvas.setVisible(true);
    BouncingBall ball = new BouncingBall(50,50,16, Color.red, 500, myCanvas);
    BouncingBall ball2 = new BouncingBall(70,80,20, Color.green, 500, myCanvas);
    BouncingBall ball3 = new BouncingBall(90,100,16, Color.red, 500, myCanvas);
    BouncingBall ball4 = new BouncingBall(30,30,20, Color.green, 500, myCanvas);
    ball.draw();
    ball2.draw();
    ball.draw();
    ball2.draw();
    // make them bounce
    boolean finished = false;
    while(!finished) {
    myCanvas.wait(50); // small delay
    ball.move();
    ball2.move();
    ball3.move();
    ball4.move();
    // stop once ball has travelled a certain distance on x axis
    if(ball.getXPosition() >= 550 && ball2.getXPosition() >= 550)
    finished = true;
    myCanvas.setFont(new Font("helvetica", Font.BOLD, 14));
    myCanvas.setForegroundColor(Color.red);
    myCanvas.drawString("We are having fun, ...\n\n", 20, 30);
    myCanvas.wait(1000);
    myCanvas.setForegroundColor(Color.black);
    myCanvas.drawString("...drawing lines...", 60, 60);
    myCanvas.wait(500);
    myCanvas.setForegroundColor(Color.gray);
    myCanvas.drawLine(200, 20, 300, 50);
    myCanvas.wait(500);
    myCanvas.setForegroundColor(Color.blue);
    myCanvas.drawLine(220, 100, 370, 40);
    myCanvas.wait(500);
    myCanvas.setForegroundColor(Color.green);
    myCanvas.drawLine(290, 10, 320, 120);
    myCanvas.wait(1000);
    myCanvas.setForegroundColor(Color.gray);
    myCanvas.drawString("...and shapes!", 110, 90);
    myCanvas.setForegroundColor(Color.red);
    myCanvas.drawString("to bring to focus creative ideas !", 310, 290);
    // the shape to draw and move
    int xPos = 10;
    Rectangle rect = new Rectangle(xPos + 40, 150, 30, 20);
    Rectangle rect2 = new Rectangle(xPos + 80, 120, 50, 25);
    Rectangle rect3 = new Rectangle(xPos+ 1200, 180, 30, 30);
    Rectangle rect4 = new Rectangle(xPos + 150, 220, 40, 15);
    myCanvas.fill(rect);
    myCanvas.fill(rect2);
    myCanvas.fill(rect3);
    myCanvas.fill(rect4);
    Circle circle = new Circle(xPos + 130, 30);
    // Circle circle2 = new Circle(xPos + 150, 50);
    // Circle circle3 = new Circle(xPos + 170, 30);
    // Circle circle4 = new Circle(xPos + 200, 40);
    // myCanvas.fill(circle);
    // myCanvas.fill(circle2);
    // myCanvas.fill(circle3);
    // myCanvas.fill(circle4);
    // move the rectangle and circles across the screen
    for(int i = 0; i < 200; i ++) {
    myCanvas.fill(rect);
    myCanvas.fill(rect2);
    myCanvas.fill(rect3);
    myCanvas.fill(rect4);
    myCanvas.wait(10);
    myCanvas.erase(rect);
    myCanvas.erase(rect2);
    myCanvas.erase(rect3);
    myCanvas.erase(rect4);
    xPos++;
    rect.setLocation(xPos, 150);
    rect2.setLocation(xPos, 120);
    rect3.setLocation(xPos, 180);
    rect4.setLocation(xPos, 220);
    // at the end of the move, draw once more so that it remains visible
    myCanvas.fill(rect);
    myCanvas.fill(rect2);
    myCanvas.fill(rect3);
    myCanvas.fill(rect4);
    package stan_bluej_ch5_p135;
    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.
    * @author Bruce Quig
    * @author Michael Kolling (mik)
    * @author David J. Barnes
    * @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;
    package stan_bluej_ch5_p135;
    import java.awt.*;
    import java.awt.geom.*;
    * Class BallDemo - provides two short demonstrations showing how to use the
    * Canvas class.
    * @author Michael Kolling and David J. Barnes
    * @version 1.0 (23-Jan-2002)
    public class BallDemo
    private Canvas myCanvas;
    * Create a BallDemo object. Creates a fresh canvas and makes it visible.
    public BallDemo()
    myCanvas = new Canvas("Ball Demo", 600, 500);
    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.drawString("We can draw text, ...", 20, 30);
    myCanvas.wait(1000);
    myCanvas.setForegroundColor(Color.black);
    myCanvas.drawString("...draw lines...", 60, 60);
    myCanvas.wait(500);
    myCanvas.setForegroundColor(Color.gray);
    myCanvas.drawLine(200, 20, 300, 50);
    myCanvas.wait(500);
    myCanvas.setForegroundColor(Color.blue);
    myCanvas.drawLine(220, 100, 370, 40);
    myCanvas.wait(500);
    myCanvas.setForegroundColor(Color.green);
    myCanvas.drawLine(290, 10, 320, 120);
    myCanvas.wait(1000);
    myCanvas.setForegroundColor(Color.gray);
    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 < 200; 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);
    * Simulates two bouncing balls
    public void bounce()
    int ground = 400; // position of the ground line
    myCanvas.setVisible(true);
    // draw the ground
    myCanvas.drawLine(50, ground, 550, ground);
    // crate and show the balls
    BouncingBall ball = new BouncingBall(50, 50, 16, Color.blue, ground, myCanvas);
    ball.draw();
    BouncingBall ball2 = new BouncingBall(70, 80, 20, Color.red, ground, myCanvas);
    ball2.draw();
    // make them bounce
    boolean finished = false;
    while(!finished) {
    myCanvas.wait(50); // small delay
    ball.move();
    ball2.move();
    // stop once ball has travelled a certain distance on x axis
    if(ball.getXPosition() >= 550 && ball2.getXPosition() >= 550)
    finished = true;
    ball.erase();
    ball2.erase();
    package stan_bluej_ch5_p135;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.geom.*;
    * Class Canvas - a class to allow for simple graphical
    * drawing on a canvas.
    * @author Michael Kolling (mik)
    * @author Bruce Quig
    * @version 1.8 (23.01.2002)
    public class Canvas
    private JFrame frame;
    private CanvasPane canvas;
    private Graphics2D graphic;
    private Color backgroundColor;
    private Image canvasImage;
    * Create a Canvas with default height, width and background color
    * (300, 300, white).
    * @param title title to appear in Canvas Frame
    public Canvas(String title)
    this(title, 600, 600, Color.white);
    * Create a Canvas with default background color (white).
    * @param title title to appear in Canvas Frame
    * @param width the desired width for the canvas
    * @param height the desired height for the canvas
    public Canvas(String title, int width, int height)
    this(title, width, height, Color.white);
    * Create a Canvas.
    * @param title title to appear in Canvas Frame
    * @param width the desired width for the canvas
    * @param height the desired height for the canvas
    * @param bgClour the desired background color of the canvas
    public Canvas(String title, int width, int height, Color bgColor)
    frame = new JFrame();
    canvas = new CanvasPane();
    frame.setContentPane(canvas);
    frame.setTitle(title);
    canvas.setPreferredSize(new Dimension(width, height));
    backgroundColor = bgColor;
    frame.pack();
    * Set the canvas visibility and brings canvas to the front of screen
    * when made visible. This method can also be used to bring an already
    * visible canvas to the front of other windows.
    * @param visible boolean value representing the desired visibility of
    * the canvas (true or false)
    public void setVisible(boolean visible)
    if(graphic == null) {
    // first time: instantiate the offscreen image and fill it with
    // the background color
    Dimension size = canvas.getSize();
    canvasImage = canvas.createImage(size.width, size.height);
    graphic = (Graphics2D)canvasImage.getGraphics();
    graphic.setColor(backgroundColor);
    graphic.fillRect(0, 0, size.width, size.height);
    graphic.setColor(Color.black);
    frame.show();
    * Provide information on visibility of the Canvas.
    * @return true if canvas is visible, false otherwise
    public boolean isVisible()
    return frame.isVisible();
    * Draw the outline of a given shape onto the canvas.
    * @param shape the shape object to be drawn on the canvas
    public void draw(Shape shape)
    graphic.draw(shape);
    canvas.repaint();
    * Fill the internal dimensions of a given shape with the current
    * foreground color of the canvas.
    * @param shape the shape object to be filled
    public void fill(Shape shape)
    graphic.fill(shape);
    canvas.repaint();
    * Fill the internal dimensions of the given circle with the current
    * foreground color of the canvas.
    public void fillCircle(int xPos, int yPos, int diameter)
    Ellipse2D.Double circle = new Ellipse2D.Double(xPos, yPos, diameter, diameter);
    fill(circle);
    * Fill the internal dimensions of the given rectangle with the current
    * foreground color of the canvas. This is a convenience method. A similar
    * effect can be achieved with the "fill" method.
    public void fillRectangle(int xPos, int yPos, int width, int height)
    fill(new Rectangle(xPos, yPos, width, height));
    * Erase the whole canvas.
    public void erase()
    Color original = graphic.getColor();
    graphic.setColor(backgroundColor);
    Dimension size = canvas.getSize();
    graphic.fill(new Rectangle(0, 0, size.width, size.height));
    graphic.setColor(original);
    canvas.repaint();
    * Erase the internal dimensions of the given circle. This is a
    * convenience method. A similar effect can be achieved with
    * the "erase" method.
    public void eraseCircle(int xPos, int yPos, int diameter)
    Ellipse2D.Double circle = new Ellipse2D.Double(xPos, yPos, diameter, diameter);
    erase(circle);
    * Erase the internal dimensions of the given rectangle. This is a
    * convenience method. A similar effect can be achieved with
    * the "erase" method.
    public void eraseRectangle(int xPos, int yPos, int width, int height)
    erase(new Rectangle(xPos, yPos, width, height));
    * Erase a given shape's interior on the screen.
    * @param shape the shape object to be erased
    public void erase(Shape shape)
    Color original = graphic.getColor();
    graphic.setColor(backgroundColor);
    graphic.fill(shape); // erase by filling background color
    graphic.setColor(original);
    canvas.repaint();
    * Erases a given shape's outline on the screen.
    * @param shape the shape object to be erased
    public void eraseOutline(Shape shape)
    Color original = graphic.getColor();
    graphic.setColor(backgroundColor);
    graphic.draw(shape); // erase by drawing background color
    graphic.setColor(original);
    canvas.repaint();
    * Draws an image onto the canvas.
    * @param image the Image object to be displayed
    * @param x x co-ordinate for Image placement
    * @param y y co-ordinate for Image placement
    * @return returns boolean value representing whether the image was
    * completely loaded
    public boolean drawImage(Image image, int x, int y)
    boolean result = graphic.drawImage(image, x, y, null);
    canvas.repaint();
    return result;
    * Draws a String on the Canvas.
    * @param text the String to be displayed
    * @param x x co-ordinate for text placement
    * @param y y co-ordinate for text placement
    public void drawString(String text, int x, int y)
    graphic.drawString(text, x, y);
    canvas.repaint();
    * Erases a String on the Canvas.
    * @param text the String to be displayed
    * @param x x co-ordinate for text placement
    * @param y y co-ordinate for text placement
    public void eraseString(String text, int x, int y)
    Color original = graphic.getColor();
    graphic.setColor(backgroundColor);
    graphic.drawString(text, x, y);
    graphic.setColor(original);
    canvas.repaint();
    * Draws a line on the Canvas.
    * @param x1 x co-ordinate of start of line
    * @param y1 y co-ordinate of start of line
    * @param x2 x co-ordinate of end of line
    * @param y2 y co-ordinate of end of line
    public void drawLine(int x1, int y1, int x2, int y2)
    graphic.drawLine(x1, y1, x2, y2);
    canvas.repaint();
    * Sets the foreground color of the Canvas.
    * @param newColor the new color for the foreground of the Canvas
    public void setForegroundColor(Color blue)
    graphic.setColor(Color.blue);
    * Returns the current color of the foreground.
    * @return the color of the foreground of the Canvas
    public Color getForegroundColor()
    return graphic.getColor();
    * Sets the background color of the Canvas.
    * @param newColor the new color for the background of the Canvas
    public void setBackgroundColor(Color newColor)
    backgroundColor = newColor;
    graphic.setBackground(newColor);
    * Returns the current color of the background
    * @return the color of the background of the Canvas
    public Color getBackgroundColor()
    return backgroundColor;
    * changes the current Font used on the Canvas
    * @param newFont new font to be used for String output
    public void setFont(Font newFont)
    graphic.setFont(newFont);
    * Returns the current font of the canvas.
    * @return the font currently in use
    public Font getFont()
    return graphic.getFont();
    * Sets the size of the canvas.
    * @param width new width
    * @param height new height
    public void setSize(int width, int height)
    canvas.setPreferredSize(new Dimension(width, height));
    Image oldImage = canvasImage;
    canvasImage = canvas.createImage(width, height);
    graphic = (Graphics2D)canvasImage.getGraphics();
    graphic.drawImage(oldImage, 0, 0, null);
    frame.pack();
    * Returns the size of the canvas.
    * @return The current dimension of the canvas
    public Dimension getSize()
    return canvas.getSize();
    * Waits for a specified number of milliseconds before finishing.
    * This provides an easy way to specify a small delay which can be
    * used when producing animations.
    * @param milliseconds the number
    public void wait(int milliseconds)
    try
    Thread.sleep(milliseconds);
    catch (InterruptedException e)
    // ignoring exception at the moment
    * Nested class CanvasPane - the actual canvas component contained in the
    * Canvas frame. This is essentially a JPanel with added capability to
    * refresh the image drawn on it.
    private class CanvasPane extends JPanel
    public void paint(Graphics g)
    g.drawImage(canvasImage, 0, 0, null);

    Dear Miciuli,
    I found the definition for the circle in the canvas class and used it to creates circles ! Thank you for jaring my brain into thinking !
    Stan
    Ellipse2D.Double circle = new Ellipse2D.Double(xPos, 70, 30 , 30);

  • Error(10,47): EntryFlowPageCO not found  in class oracle.apps.ap.oie.entry.

    Hi All,
    I extended a CO named IndusFinalReviewPageCOXX and I got the following error.
    Error(10,47): EntryFlowPageCO not found in class oracle.apps.ap.oie.entry.summary.webui.FinalReviewPageCO in class indus.oracle.apps.ap.oie.entry.summary.webui.IndusFinalReviewPageCOXX.
    I already drag the class file of EntryFlowPageCO in path myclasses\oracle\apps\ap\oie\entry\summary\webui
    and import the file. but the error remains same..after that I compile the class file of EntryFlowPageCO and found one more CO imports in EntryFlowPageCO. I drag class file of that CO also in appropriate path.. But still get the same error.
    Pls give me the solution ASAP.
    Thanks
    Amit Jaitly

    Amit,
    In the standard CO you can check that controller EntryFlowPageCO is not under myclasses\oracle\apps\ap\oie\entry\summary\webui.
    Its under oracle/apps/ap/oie/entry/webui so put the same under this directory structure.
    Regards,
    Gyan

  • Error(23,19): method getName(java.lang.String) not found in class javax.swi

    Hi , when i try to run my program, i keep getting the error msg:
    Error(23,19): method getName(java.lang.String) not found in class javax.swing.JTextField
    I have checked the java API and it inherits from the awt.Component class and should be accessible via the jtextfield.
    I have tried the following:
    trying to initailise the JTextField at the start.
    Using getName works if i use it within the loop after setting the name.
    Does anybody know what i am doing wrong please?
    public class clsMember extends JPanel implements ActionListener {
        private JButton jbtnLog;
        private String surname;
        private JTextField txtItem;
        public clsMember() {
            super(new SpringLayout());
            makeInterface();
            surname = txtItem.getName("Surname").toString();
    private void makeInterface() {
         //code omitted
               for (int i = 0; i < numpairs; i++) {
                JLabel l = new JLabel(strLabels, JLabel.LEADING);
    this.add(l);
    //if the array item is salutation create a combobox
    if (strLabels[i] == "Salutation") {
    jcomSalutation = new JComboBox(strSalutation);
    jcomSalutation.setSelectedIndex(0);
    this.add(jcomSalutation);
    } else {
    txtItem = new JTextField(10);
    l.setLabelFor(txtItem);
    txtItem.setName(strLabels[i].replaceAll(" ", "")); //this is where the label is set and if i do a system.out it shows fine. getName works here too.
    this.add(txtItem);
    //code omitted

    If i have a loop that creates the jtextfields such as
                    txtItem = new JTextField(10);
                    l.setLabelFor(txtItem);
                    txtItem.setName(strLabels.replaceAll(" ", ""));
    this.add(txtItem);How is it then possible to assign to a string the value of a *specific jtextfield*. Lets say that one of these JTextfields has the name surname.
    How is it possible for me to writeString surname = surnamejtextfield.getText();                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • DB Look up error: Column/global variable not found-Error in EDO-ExecSearch

    Hi all..
    In my application I am usind database look up with DB2 database..
    As soon as I click on Database Look up button,it throws an error that [[IBM] [System i access ODBC driver] [DB2 for i5/OS]SQL0206 - column or global variable not found. [Error in in EDO-ExecSearch]].
    Please anyone tell me where the problem is????
    Thanks in advance.

    I never realized this myself, but you can have more than one alias in your hosts file.  I found that some programs look for <code>localhost</code> and others look for whatever your server name is.  To satisfy both of those situations, just put your server's name after <code>localhost</code> so you'll have something like this:
    #<ip-address> <hostname.domain.org> <hostname>
    127.0.0.1 home.matrix.dk localhost matrix

  • Error(400,8): method include(java.lang.String, boolean) not found in class

    I have uploaded my Application which was running fine in other IDE to jdev 10.1.3, when i compile the follwing error error in jsp page.
    Error(400,8): method include(java.lang.String, boolean) not found in class javax.servlet.jsp.PageContext
    My jsp code where error is shown is
    <jsp:include page="querySections/generation.jsp" flush="true">
                                            <jsp:param name="TSN" value="<%=strParamValue[1]%>"/>
                                            <jsp:param name="SectionID" value="<%=String.valueOf(lngSectionID)%>"/>
                                       </jsp:include>
    pl help me in solving this its urgent...
    Thanks & Regards
    Lakshmi

    Hi,
    code snippet looks okay and is identical with what JDeveloper generates.
    Frank

Maybe you are looking for