Trying to create myRect class then draw giving problems

Please help me I am Intro Java Student.
Thanks
My Rect class looks like following:
import java.awt.*;
import javax.swing.*;
public class MyRect extends Object{
private int x1=0,y1=0,w=0,h=0; // Coordinates of the Point
/* No-arguments Constructor
public MyRect()
setMyRect(0,0,0,0);
// Set x1,x2,y1,y2 Coordinates for the Rect
public void MyRect (int a, int b, int c, int d)
x1 = a;
y1 = b;
w = c;
h = d;
System.out.println("Values" + a b c +d);
// get Coordinates
public int getX1()
return x1;
public int getY1()
return y1;
public int getW()
return w;
public int getH()
return h;
public static void main(String arguments[]) {
MyRect rect = new MyRect();
Then created TestDraw.java
import java.awt.*;
import javax.swing.*;
public class TestDraw extends JApplet {
private MyLine line[]; // Array of line objects (ADT)
private MyOval oval[]; // Array of oval objects (ADT)
private MyRect rect[]; // Array of rectangle objects (ADT)
public void initDraw() // Routine to intialize applet GUI
line = new MyLine[ 5 ];
line[ 0 ] = new MyLine( 100, 100, 200, 200 );
line[ 1 ] = new MyLine( 200, 200, 100, 100 );
line[ 2 ] = new MyLine( 300, 300, 100, 100 );
line[ 3 ] = new MyLine( 400, 400, 0, 0 );
line[ 4 ] = new MyLine( 100, 100, 300, 300 );
oval = new MyOval[ 5 ];
oval[ 0 ] = new MyOval( 100, 100, 200, 200 );
oval[ 1 ] = new MyOval( 200, 200, 100, 100 );
oval[ 2 ] = new MyOval( 300, 300, 100, 100 );
oval[ 3 ] = new MyOval( 400, 400, 30, 200 );
oval[ 4 ] = new MyOval( 100, 100, 300, 300 );
rect = new MyRect[ 5 ];
rect[ 0 ] = new MyRect( 100, 100, 200, 200 );
rect[ 1 ] = new MyRect( 200, 200, 100, 100 );
rect[ 2 ] = new MyRect( 300, 300, 100, 100 );
rect[ 3 ] = new MyRect( 400, 400, 30, 200 );
rect[ 4 ] = new MyRect( 100, 100, 300, 300 );
// paint method called to draw applet GUI to the display
public void paint( Graphics g )
initDraw(); // Initialize line,oval, and rectangle objects
// Ask each line object to draw itself
for ( int i = 0; i < line.length; i++ )
     line[ i ].draw( g );
// Ask each oval object to draw itself
for ( int i = 0; i < oval.length; i++ )
     oval[ i ].draw( g );
// Ask each rectangle object to draw itself
for ( int i = 0; i < rect.length; i++ )
     rect[ i ].draw( g );
It fails giving following error:
TestDraw.java:32:cannot resolve symbol
Symbol:class MyRect
location:class TestDraw
rect[4]=new MyRect<100,100,300,300>;

I think your program is having trouble using MyRect as it is defined in an external file and it doesn't know where to get MyRect from.
Try putting something in the following form in the first line of MyRect.java
package <path>.<path>;
Where <path> is a directory from you classpath which contains the classes you wish to access, that being MyRect in this case (this must be in this path of course).
So if you classpath was c:/jdk1.3.1/ and your file to reference is in c:/jdk1.3.1/classes/myclasses you would use in MyRect.java:
package classes.myclasses;
Then in TestDraw.java you can import your package using:
import classes.myclasses.*;
Which will give you access to classes methods within the myclasses directory. Try this out and if it doesn't work send me the files in email and I'll try and look at them at home.
Mark.

Similar Messages

  • I am trying to create a class diagram with jdeveloper but class is grey out

    i am trying to create a class diagram with jdeveloper but class is greyed out even though I downloaded the J2EE version
    I went through the following steps :
    Click the project in which you want to create a new diagram, choose File New from JDeveloper's menu, then select General Diagrams in the left pane of the New dialog.
    I have downloaded J2EE Edition Version 10.1.3.1.0.3984

    When the class diagram is disabled - does the wizard for creating a new class in the new->General also disabled?
    If it is then you are not placing your cursor on the project before you choose file->new
    (you are probably on the workspace that contains the project).

  • Trying to create a class

    Hi,
    I�m trying to use the class Point to create a new class Line that handles lines in a 2-dimensional space. Much of what I want to achieve is already accomplished, but I still want to incorporate three aspects that I can�t really figure out how to solve.
    1. I want to create a "boolean isParallell(Line1) {" method that checks if the line in question is parallel with line1.
    2. I want to create a "public static Line longest(Line[] lines) {" class method that returns the longest line in the array lines. If the longest line is 0, null should be returned.
    3. I want to create a "public static boolean isPolygon(Line[] lines) {" class method that determines if the lines in the array lines constitute a polygon.
    Any input you might have on how I go about accomplishing this is very much appreciated. (If you find it easier just to assist me with the code, that�s fine with me ;-)
    Thanks!
    import java.awt.Point.*;
    public class Line {
         private Point p1;
         private Point p2;
         public Line(){
              this.p1 = new Point();     
              this.p2 = new Point();
         public Line(Point p1, Point p2) {
              this.p1 = p1;
              this.p2 = p2;
         public String toString() {
              return "[" + this.p1.getX() + ", " + this.p2.getX() + ", " + this.p1.getY() + ", " + this.p2.getY() + "]";
         public double length() {
              double tmpX = (this.p2.getX() - this.p1.getX()) * (this.p2.getX() - this.p1.getX());
              double tmpX = (this.p2.getY() - this.p1.getY()) * (this.p2.getY() - this.p1.getY());
         public void translate(int dx, int dy) {
              this.p1.translate(dx, dy);
              this.p1.translate(dx, dy);
         public Line translatedLine(int dx, int dy) {
              Point tmpP = new Point(p1, p2);
              return tmpP.translate(dx, dy);
         public boolean equal(Line1) {          
              if(this.p1.equals(Line1.getP1()) && this.p2.equals(Line1.getP2())
                   return true;
              return false;
         // boolean isParallell(Line1) {
         // public static Line longest(Line[] lines) {
                        // for( int i = 0; i<lines.length; i++)      
         // public static boolean isPolygon(Line[] lines) {
         public Point getP1(){
              return p1;
         public Point getP2(){
              return p2;
    }

    You need to brush up on you geometry!
    1. I want to create a "boolean isParallell(Line1) {"
    method that checks if the line in question is
    parallel with line1.Check the slope of this line and Line1. If they're equal, then they're parallel.
            y2 - y1
    slope = -------
            x2 - x1Be carefull for roundoff errors!
    2. I want to create a "public static Line
    longest(Line[] lines) {" class method that returns
    the longest line in the array lines. If the longest
    line is 0, null should be returned.
    dX = x2-x1
    dY = y2-y1
    distance = \/ (dX*dX) + (dY*dY)
    3. I want to create a "public static boolean
    isPolygon(Line[] lines) {" class method that
    determines if the lines in the array lines constitute
    a polygon.I know what a polygon is, but just to eliminate any misunderstanding could you give an example of a poygon made out of Line[]?

  • identifier expected error when trying to create a class instance?

    public static Time time;
    //Cannot find symbol package1.Controller - both have the same package statement.
    //When the 2nd line is included ony that is flagged as giving an error
    //Gives <identifier> expected
    public static Time time;
    time = new Time();
    //Simply typing:
    time = new Time();
    //does too
    The classes look like:
    package package1;
    public class Controller extends Applet
    public static Time time;
    time = new Time();
        public void init()
         this.setLayout(new FlowLayout());
         Panel panel = new Panel();
         add(Time.timeP);
        public void paint()
         //Some stuff here
    package package1;
    import java.awt.*;
    import java.io.*;
    public class Time extends Panel implements Runnable
        public static Panel timeP;
        public Time() {timeP = new Panel();}
         //Some other unrelated stuff here
    }

    Sorry, i forgot about that.
    public static Time time = new Time();/*Gives
    cannot find symbol
    symbol: class Time
    location class package1.Controller
    cannot find symbol
    symbol: class Time
    location class package1.Controller
    It looks like it's looking for the Time class in the Controller class?

  • Help with creating own classes then manipulating with an array

    import java.util.Scanner;
    public class Booking {
        private String bookingId;
        private String bookingName;
        private int numberOfPassengers;
        public Booking(String bookingId, String bookingName, int numberOfPassengers) {
            bookingId = bookingId;
            bookingName = bookingName;
            numberOfPassengers = 0;
        public static final double BASIC_RATE = 80;
        public String getBookingId() {
            return bookingId;
        public String getBookingName() {
            return bookingName;
        public int getNumberOfPassengers() {
            return numberOfPassengers;
        public double calculateBookingPrice() {
            return (BASIC_RATE * numberOfPassengers);
        public void summary() {
            System.out.println("Booking Number: " + bookingId);
            System.out.println("Booking made for: " + bookingName);
            System.out.print("Booking Price: $");
            System.out.printf("%6.2f", calculateBookingPrice());
    public class CabinBooking extends Booking {
        private String cabinNumber;
        private boolean dinner;
        public CabinBooking(String cabinNumber, boolean dinner) {
            super(bookingId, bookingName, numberOfPassengers);
            cabinNumber = cabinNumber;
            dinner = false;
        public String getCabinNumber() {
            return cabinNumber;
        public void upgradeBooking(boolean status) {
            dinner = false;  
        public double calculateBookingPrice() {
            double dinnerCost;
            dinnerCost = 40;
            return(300 + ((numberOfPassengers - 2) * 100) +
                (numberOfPassengers * dinnerCost));
        public void summary() {
            super.summary();
            System.out.println("Cabin Number: " + cabinNumber);
            if (dinner = false)
                System.out.println("Dinner Included: No");
            else
                System.out.println("Dinner Included: Yes");
                System.out.print("Dinner Booking Fee: $");
                System.out.printf("%6.2f", calculateBookingPrice());
    public class Booking {
    public static void main (String[] args) {
        String bookingId, bookingName;
        int i;
        Scanner keyboard = new Scanner(System.in);
        Booking[] bookings = new Booking[5];
            bookings[0] = new Booking("C001", "Dorothy the Dinosaur", 1, "C23");
            bookings[1] = new Booking("B001", "Bob the Builder", 1);
            bookings[2] = new Booking("C002", "Donald Duck", 4, "B10");
            bookings[3] = new Booking("C003", "The Wiggles", 4, "D14");
            bookings[4] = new Booking("B002", "Mickey Mouse", 2);
            bookings[5] = new Booking("B003", "Hi Five (Minus One)", 4);
        for (i=0; i<5; i++) {
            System.out.println("List of booking ID's and names:");
            System.out.println();
            System.out.println("Booking Number: " + (i+1) + "Booking made for: " + (i+1));
            bookings[i] = new Booking(bookingId, bookingName);
    }

    import java.util.Scanner;
    public class Booking {
        private String bookingId;
        private String bookingName;
        private int numberOfPassengers;
        public Booking(String bookingId, String bookingName, int numberOfPassengers) {
            bookingId = bookingId;
            bookingName = bookingName;
            numberOfPassengers = 0;
        public static final double BASIC_RATE = 80;
        public String getBookingId() {
            return bookingId;
        public String getBookingName() {
            return bookingName;
        public int getNumberOfPassengers() {
            return numberOfPassengers;
        public double calculateBookingPrice() {
            return (BASIC_RATE * numberOfPassengers);
        public void summary() {
            System.out.println("Booking Number: " + bookingId);
            System.out.println("Booking made for: " + bookingName);
            System.out.print("Booking Price: $");
            System.out.printf("%6.2f", calculateBookingPrice());
    class CabinBooking extends Booking {
        private String cabinNumber;
        private boolean dinner;
        public CabinBooking(String cabinNumber, boolean dinner) {
            super(bookingId, bookingName, numberOfPassengers);
            cabinNumber = cabinNumber;
            dinner = false;
        public String getCabinNumber() {
            return cabinNumber;
        public void upgradeBooking(boolean status) {
            dinner = false;  
        public double calculateBookingPrice() {
            double dinnerCost;
            dinnerCost = 40;
            return(300 + ((numberOfPassengers - 2) * 100) +
                (numberOfPassengers * dinnerCost));
        public void summary() {
            super.summary();
            System.out.println("Cabin Number: " + cabinNumber);
            if (dinner = false)
                System.out.println("Dinner Included: No");
            else
                System.out.println("Dinner Included: Yes");
                System.out.print("Dinner Booking Fee: $");
                System.out.printf("%6.2f", calculateBookingPrice());
    public static void main (String[] args) {
        String bookingId, bookingName;
        int i;
        Scanner keyboard = new Scanner(System.in);
        Booking[] bookings = new Booking[5];
            bookings[0] = new Booking("C001", "Dorothy the Dinosaur", 1, "C23");
            bookings[1] = new Booking("B001", "Bob the Builder", 1);
            bookings[2] = new Booking("C002", "Donald Duck", 4, "B10");
            bookings[3] = new Booking("C003", "The Wiggles", 4, "D14");
            bookings[4] = new Booking("B002", "Mickey Mouse", 2);
            bookings[5] = new Booking("B003", "Hi Five (Minus One)", 4);
        for (i=0; i<5; i++) {
            System.out.println("List of booking ID's and names:");
            System.out.println();
            System.out.println("Booking Number: " + (i+1) + "Booking made for: " + (i+1));
            bookings[i] = new Booking(bookingId, bookingName);
       }fixed that but still won't compile

  • While using HP 34401A Multimeter​, I'm trying to create a database but am having problems with it.

    Hi, I'm trying to save the readings in a ASCII file by using in 'HP 34401A Getting Started.vi', a file provided in the instr.lib folder.
    The multimeter reads the instruments correctly and displays it on the screen, but when I connect the wire to 'Write to Sreadsheet File.vi', it shows 0 in the ASCII file (which I open in Excel) yet showing the correct readings on the screen.
    Any help is truley appreciated.
    Kunal.

    Kunal,
    When using the "Write to Spreadsheet File.vi", make sure that you have the format parameter correct. You can find a list of the parameters by going to Help\Contents and Index\Index in LabVIEW and searching for "formatting". "Specifier Syntax in Strings" and "Format Specifier Examples" may be useful to you. Make sure that you have enough decimal places.
    The LabVIEW User's Manual may also be of use to you. You'll find the link below.
    http://digital.ni.com/manuals.nsf/caba5d53e9b015a1​86256793004eebb7/29b411c6839de35b8625690d007612ad?​OpenDocument
    Kim L.
    Applications Engineer
    National Instruments

  • Error when trying to create class file

    I am getting this error when I try to create file
    clobsearch.java:246: not a statement ex;
    protected Element getDocumentRoot(Clob c)
    Element root;
    Reader read = c.getCharacterStream();
    String s = convertClob(read, 8192);
    SAXReader sread = new SAXReader("org.dom4j.io.aelfred.SAXDriver");
    sread.setMergeAdjacentText(true);
    sread.setStripWhitespaceText(true);
    Document doc = sread.read(new StringReader(s));
    root = doc.getRootElement();
    return root;
    Exception ex;
    ex; <--- this is line 246
    System.out.println(ex.getMessage());
    return null;
    any help would be appricated
    thanks
    robert

    The guy who wrote this code is no longer with the company
    the server IP got changed and he had an IP coded in the program
    i managed to uncompile the code
    i changed the IP to the new one
    when I tryed to create the class file i get the error
    so as far as what is happenning with the ex I am not sure
    here is another piece of code that might help
    really all i need to do is get the class file created again...
    protected Element getDocumentRoot(Clob c)
    Element root;
    Reader read = c.getCharacterStream();
    String s = convertClob(read, 8192);
    SAXReader sread = new SAXReader("org.dom4j.io.aelfred.SAXDriver");
    sread.setMergeAdjacentText(true);
    sread.setStripWhitespaceText(true);
    Document doc = sread.read(new StringReader(s));
    root = doc.getRootElement();
    return root;
    Exception ex;
    ex;
    System.out.println(ex.getMessage());
    return null;
    protected double toDouble(String s)
    double d = 0.0D;
    try
    d = Double.parseDouble(s);
    catch(NumberFormatException ne) { }
    return d;
    protected String convertClob(Reader in, int blen)
    StringWriter sw = new StringWriter(32768);
    char buf[] = new char[blen];
    int len = 0;
    try
    while((len = in.read(buf)) != -1)
    sw.write(buf, 0, len);
    in.close();
    sw.close();
    catch(IOException ioe)
    len = 1;
    return null;
    String s = sw.toString();
    int q = s.indexOf("<Quote");
    int end = 0;
    if(q == 0)
    end = s.indexOf("</Quote>") + 8;
    } else
    q = s.indexOf("<Project");
    if(q == 0)
    end = s.indexOf("</Project>") + 10;
    else
    end = s.indexOf("</Order>") + 8;
    return s.substring(0, end);
    public static void main(String args[])
    if(args.length < 2)
    System.out.println("Usage: clobsearch tablename [searchpattern] [datesql]");
    System.out.println("Where: searchpattern like \"Geodesic Dome\" and datesql like \" where quotedate >= to_date('01/01/2004', 'MM/DD/YYYY')\"");
    System.out.println("OR: clobsearch tablename searchpattern -data idfile [idcolname]");
    System.out.println("Where: searchpattern as above, idfile is a one per line file of quote or order numbers, idcol=column name for id col");
    System.exit(1);
    clobsearch cs = new clobsearch(args);
    }

  • Trying to create a flash gallery

    trying to create a simple clickable slideshow.
    my problem i think is in the math. but i clickable picture buttons on right and left. the center clickable too.
    i wanna know how can i increment decrement a variable depending on direction.
    currently it seems to go in one direction which is to the right.
    also can i make an array of functions: ex- function animate[count](e:event):void
    or do functions handle arrays differently.
    sorry if i sound stupid but its been awhile doing flash.
    heres little code:
    var picture:Array = new Array();
    picture[1] = new pic1();
    addChild(picture[1]);
    picture[1].x =50;
    picture[1].y =384;
    picture[2] = new pic2();
    addChild(picture[2]);
    picture[2].x =512;
    picture[2].y =384;
    picture[2].scaleX =10;
    picture[2].scaleY =10;
    picture[3] = new pic3();
    addChild(picture[3]);
    picture[3].x =974;
    picture[3].y =384;
    var counter = 1;
        picture[1].addEventListener(MouseEvent.CLICK, animate1)
        function animate1(e:MouseEvent):void
            trace(counter);
            picture[counter+1].x =50;
            picture[counter+1].y =384;
            picture[counter + 2].x =512;
            picture[counter + 2].y =384;
            picture[counter + 2].scaleX =10;
            picture[counter + 2].scaleY =10;
            picture[counter + 3].x =974;
            picture[counter + 3].y =384;
            counter++;
    5 more similar eventlisteners and function

    Sorry I think I misread your code before when I responded. Well I think I have a working version of what you are trying to do. You can view what I made at http://www.jeremyseverson.com/as3/flash_gallery/index.html . I created this all in straight AS3 but it should give you an idea of what I did and give you some direction to achieve what you want.
    package
         import caurina.transitions.*;
         import flash.display.Bitmap;
         import flash.display.SimpleButton;
         import flash.display.Sprite;
         import flash.events.MouseEvent;
         [SWF(backgroundColor="#000000", frameRate="31", width="800", height="300")]
         public class Main2 extends Sprite
              //  EMBED ASSETS
              [Embed(source='assets/rightArrow.png')]
              private var rightArrowClass:Class;
              [Embed(source='assets/leftArrow.png')]
              private var leftArrowClass:Class;
              [Embed(source='assets/IMG_0001.JPG')]
              private var img0001Class:Class;
              [Embed(source='assets/IMG_0002.JPG')]
              private var img0002Class:Class;
              [Embed(source='assets/IMG_0003.JPG')]
              private var img0003Class:Class;
              [Embed(source='assets/IMG_0004.JPG')]
              private var img0004Class:Class;
              [Embed(source='assets/IMG_0005.JPG')]
              private var img0005Class:Class;
              [Embed(source='assets/IMG_0006.JPG')]
              private var img0006Class:Class;
              [Embed(source='assets/IMG_0007.JPG')]
              private var img0007Class:Class;
              //  PRIVATE VARIABLES
              // Layout Properties
              private var imgPad:Number = 5;
              private var imgScale:Number = 2.5;
              private var btnSize:Number = 25;
              private var imgCounter:Number = 0;
              private var middleImgX:Number = 400;
              private var leftImgX:Number = 100;
              private var rightImgX:Number = 700;
              private var leftImgTransX:Number = leftImgX - (middleImgX - leftImgX);
              private var rightImgTransX:Number = rightImgX + (rightImgX - middleImgX);
              private var imgY:Number = 150;
              private var imgLeft:Sprite;
              private var imgMid:Sprite;
              private var imgRight:Sprite;
              private var imgTransIn:Sprite;
              private var imgTransOut:Sprite;
              // Image Array
              private var classList:Array = new Array(img0001Class,img0002Class,img0003Class,img0004Class,img0005Class,img0006Class,img0007Class);
              private var spriteList:Array;
              private var currImages:Array;
              //  CONSTRUCTOR
              public function Main2()
                   init();
              //  PRIVATE METHODS
              private function init():void
                   initSpriteList();              
                   updateInterface(imgCounter);
               * Creating an array of sprites so that my registration point
               * will be in the center of the image instead of the upper left
              private function initSpriteList():void
                   spriteList = new Array();
                   var tSprite:Sprite;
                   var tBmp:Bitmap;
                   for (var i:uint=0; i<classList.length; i++)
                        tBmp = new classList[i] as Bitmap;
                        tSprite = new Sprite;
                        tSprite.addChild(tBmp);
                        tBmp.x = (-tBmp.width / 2);
                        tBmp.y = (-tBmp.height / 2);
                        spriteList.push(tSprite);
              private function updateInterface(newPos:Number,direction:String=null):void
                   var maxPos:Number = spriteList.length - 1;
                   var minPos:Number = 0;
                   var midPos:Number;
                   var leftPos:Number;
                   var rightPos:Number;
                   var transInSprite:Sprite;
                   // Set center array position
                   midPos = newPos;
                   if (midPos > maxPos) midPos = minPos;
                   if (midPos < minPos) midPos = maxPos;
                   // Update Image Counter
                   imgCounter = midPos;
                   // Set left array position
                   leftPos = midPos - 1;
                   if (leftPos < minPos) leftPos = maxPos;
                   // Set right array position
                   rightPos = midPos + 1;
                   if (rightPos > maxPos) rightPos = minPos;
                   switch(direction)
                        case "L":
                             currImages[0].removeEventListener(MouseEvent.MOUSE_DOWN, moveRight);
                             currImages[2].removeEventListener(MouseEvent.MOUSE_DOWN, moveLeft);
                             // Add transition in img
                             transInSprite = spriteList[rightPos];
                             transInSprite.x = rightImgTransX;
                             transInSprite.y = imgY;
                             transInSprite.scaleX = transInSprite.scaleY = .05;
                             transInSprite.alpha = 0;
                             addChild(transInSprite);    
                             Tweener.addTween(transInSprite, {x:rightImgX, alpha:1, scaleX:1, scaleY:1, time:0.5});
                             Tweener.addTween(currImages[0], {x:leftImgTransX, scaleX:.5, scaleY:.5, alpha:0, time:0.5, onComplete:removeImage, onCompleteParams:[currImages[0]]});
                             Tweener.addTween(currImages[1], {x:leftImgX, scaleX:1, scaleY:1, alpha:1, time:0.5});
                             Tweener.addTween(currImages[2], {x:middleImgX, scaleX:imgScale, scaleY:imgScale, alpha:1, time:0.5});
                             break;
                        case "R":
                             currImages[0].removeEventListener(MouseEvent.MOUSE_DOWN, moveRight);
                             currImages[2].removeEventListener(MouseEvent.MOUSE_DOWN, moveLeft);
                             // Add transition in img
                             transInSprite = spriteList[leftPos];
                             transInSprite.x = leftImgTransX;
                             transInSprite.y = imgY;
                             transInSprite.scaleX = transInSprite.scaleY = .05;
                             transInSprite.alpha = 0;
                             addChild(transInSprite);    
                             Tweener.addTween(transInSprite, {x:leftImgX, alpha:1, scaleX:1, scaleY:1, time:0.5});
                             Tweener.addTween(currImages[2], {x:rightImgTransX, scaleX:.5, scaleY:.5, alpha:0, time:0.5, onComplete:removeImage, onCompleteParams:[currImages[2]]});
                             Tweener.addTween(currImages[1], {x:rightImgX, scaleX:1, scaleY:1, alpha:1, time:0.5});
                             Tweener.addTween(currImages[0], {x:middleImgX, scaleX:imgScale, scaleY:imgScale, alpha:1, time:0.5});
                             break;
                        default:
                             // Add left img
                             spriteList[leftPos].x = leftImgX;
                             spriteList[leftPos].y = imgY;
                             spriteList[leftPos].scaleX = spriteList[leftPos].scaleY = 1;
                             addChild(spriteList[leftPos]);                        
                             // Add middle img
                             imgMid = spriteList[midPos];
                             spriteList[midPos].x = middleImgX;
                             spriteList[midPos].y = imgY;
                             spriteList[midPos].scaleX = spriteList[midPos].scaleY = imgScale;
                             addChild(spriteList[midPos]);
                             // Add right img
                             spriteList[rightPos].x = rightImgX;
                             spriteList[rightPos].y = imgY;
                             spriteList[rightPos].scaleX = spriteList[rightPos].scaleY = 1;
                             addChild(spriteList[rightPos]);         
                   spriteList[leftPos].addEventListener(MouseEvent.MOUSE_DOWN, moveRight);
                   spriteList[rightPos].addEventListener(MouseEvent.MOUSE_DOWN, moveLeft);
                   currImages = [spriteList[leftPos], spriteList[midPos], spriteList[rightPos]];
              private function removeImage(spriteRef:Sprite):void
                   removeChild(spriteRef);
              //  EVENT HANDLERS
              private function moveRight(e:MouseEvent):void
                   imgCounter--;
                   updateInterface(imgCounter,"R");
              private function moveLeft(e:MouseEvent):void
                   imgCounter++;
                   updateInterface(imgCounter,"L");

  • My iPad 2 home button has stopped working I have tried the swivel from landscape to portrait whilst holding the button, I have tried holding the off button then the home button and I was told I could create my own home button in the settings but I can't!

    My iPad 2 home button has stopped working all together, I have tried the swivel from landscape to portrait whilst holding the home button, I've tried pressing the off switch then pressing the home button, the other thing I was advised to do was create a home button in the settings under the accessibility option but I don't have the option I was advised to use under there! Help! It's really frustrating having to turn the device off everytim I want to switch apps and I really can't afford to send it away to be mended! Many thanks in advance

    The accessibilty setting that was mentioned is:
    * Enable AssistiveTouch
    Enable AssistiveTouch which floats a virtual button on-screen which can mimic all hardware buttons on the device:
    Settings>General>Accessibility>AssistiveTouch: turn ON
    *Note* If you power off the device using the AssistiveTouch panel (tap the on-screen AssistiveTouch button, Device>Lock Screen (tap and hold to power off)), you will NOT be able to power on the device *if your Sleep/Wake (power) button is not functioning*. You will need to connect the powered off device either to a PC's USB port or an external charger to power the device back on.

  • When i am trying to create a report(using graph) in Word97 using Report generation Toolkit from Labview it's giving error in word import Module.vi that no such interface is supported could anyone help me out to solve this problem

    Word import Module.vi is trying to call Vb project and VB components thru active X controls when it's trying to call Vb components it's giving the error no such interface found..I am using Labview 6,MSoffice97,Graph8

    Hi Adam,
    It seems that there have been a couple other instances of the same error occurring and the problem is a conflict that occurs with the Office 97 only. Somehow the MS Office type library has been modified and this is causing incompatibilities with MS Office 97. Have you installed any other application on top of MS Office that plugs into MS Office tools – Adobe Acrobat, Visio, Reflection?? If so, you will want to see about uninstalling or reinstalling those utilities and then reinstalling Office 97 to restore the original MS Office 97 type library.
    Also, if you have a newer version of MS Office, I would highly recommend upgrading your computer. It seems that this problem is only with Office 97 and later versions of Office do not have this issue.
    Thanks again for bringing this question up.
    Kileen

  • Trying to create object of a class within servlet - help!!

    I have created and compiled the following classes within
    C:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\classes
    1)LoginServlet
    2)LoginManager
    3)I have LoginServlet trying to create an object of type LoginManager, very simple,
    but I get the following errors:
    Cannot resolve symbol: LoginManager lm = new LoginManager();
    ^
    Cannot resolve symbol: LoginManager lm = new LoginManager();
    ^
    4)I have the .java and .class files located within the same directory, so I don't
    see what's wrong here??? HELP!
    LoginManager looks like:
    public class LoginManager {
    public boolean authenticateUser(String username, String password){
              boolean status = false;
    //simple code for string matching
              return status;
    LoginServlet looks like:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class LoginServlet extends HttpServlet {
         // Constructors
         // Variables
         public static final String CONTENT_TYPE = "text/html";
         public boolean LOGIN_STATUS;
         // Methods
         public void service (HttpServletRequest req, HttpServletResponse res)
              throws IOException {
              String username = "";
              String password = "";
              LoginManager lm = new LoginManager();
              username = req.getParameter("username");
              password = req.getParameter("password");
              LOGIN_STATUS = lm.authenticateUser(username, password);
              res.setContentType(CONTENT_TYPE);
              PrintWriter out = res.getWriter();
              out.println("<html><head><title>Hello World</title></head>" +
                             "<body>Hello! Your login status is " + LOGIN_STATUS +
                             "</body>" +
                             "</html>");
         public void init (ServletConfig config) throws ServletException {
              super.init(config);

    Do you have . in the CLASSPATH when compiling your servlet?
    ron <[email protected]> wrote:
    I have created and compiled the following classes within
    C:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\classes
    1)LoginServlet
    2)LoginManager
    3)I have LoginServlet trying to create an object of type LoginManager, very simple,
    but I get the following errors:
    Cannot resolve symbol: LoginManager lm = new LoginManager();
    ^
    Cannot resolve symbol: LoginManager lm = new LoginManager();
    ^
    4)I have the .java and .class files located within the same directory, so I don't
    see what's wrong here??? HELP!
    LoginManager looks like:
    public class LoginManager {
    public boolean authenticateUser(String username, String password){
              boolean status = false;
    //simple code for string matching
              return status;
    LoginServlet looks like:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class LoginServlet extends HttpServlet {
         // Constructors
         // Variables
         public static final String CONTENT_TYPE = "text/html";
         public boolean LOGIN_STATUS;
         // Methods
         public void service (HttpServletRequest req, HttpServletResponse res)
              throws IOException {
              String username = "";
              String password = "";
              LoginManager lm = new LoginManager();
              username = req.getParameter("username");
              password = req.getParameter("password");
              LOGIN_STATUS = lm.authenticateUser(username, password);
              res.setContentType(CONTENT_TYPE);
              PrintWriter out = res.getWriter();
              out.println("<html><head><title>Hello World</title></head>" +
                             "<body>Hello! Your login status is " + LOGIN_STATUS +
                             "</body>" +
                             "</html>");
         public void init (ServletConfig config) throws ServletException {
              super.init(config);
    Dimitri

  • When in Adobe Bridge and trying to create a web photo gallery, under the windows menu and then the workspace menu there is no output option.  Where is it?

    When in Adobe Bridge and trying to create a web photo gallery, under the windows menu and then the workspace menu there is no output option.  Where is it?

    You haven't provided any sensible, meaningful and detailed information about your setup.
    If you gave some sensible, complete and detailed information, someone may be able to help you, such as your platform (Mac or Win), exact versions of your OS, of Photoshop and of Bridge, machine specs, what troubleshooting steps you have taken so far, etc.
    There are no clairvoyants or mind readers here.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • I am trying to use my IPAD to video students in my conducting class, then email them the video for self evaluation.  However, many of the video clips are too long to email.  Is there anyway to compress the video clips and still email them so they can view

    I am trying to use my IPAD to video students in my conducting class, then email them the video for self evaluation.  However, many of the clips are too long to send.  Is there a way I can compress the clips and still send them via email so they can open and them using Quicken?
    Muzakmn

    It depends on the clips' content, their current format, and how much you would need to compress them, but in most cases and with most email systems, it's difficult to impossible to compress a clip enough to be able to get it through the attachment size limits of most email providers and still have the video be comprehensible. You'll probably need to find a web site or other method where you could post the videos for download by the students.
    You can try compression and trimming, though, and see if you can get the video small enough to email. An attachment often has to be 3MB or less to go through, though it depends entirely on the email systems on both ends. If you look to the right under "more like this" you'll find similar threads on the subject.
    Regards.

  • Trying to create an array of a class

    This is the first time ive tried to use an array so its not surprising im having trouble.
    this is my program:
    import java.util.*;
    public class studentRecordDemo
         public static void main(String[] args)
              int studNum, index;
              System.out.println("Enter the number of students you wish to record");
              Scanner keyboard = new Scanner(System.in);
              studNum = keyboard.nextInt();
              studentRecord student[] = new studentRecord[studNum];
              for (index = 0; index < studNum; index++)
              {student[index].readInput();
              student[index].writeOutput();}
    }And it lets me compile it but when i enter a number it gives me the error:
    Exception in thread "main" java.lang.NullPointerException
    at studentRecordDemo.main(studentRecordDemo.java:15)the
    So yeah im trying to create an array of the class "studentRecord" and the number is input by the user. Is there a way to make that work or would it be easier to just make the array a really high number?

    your error is in here:
    student[index].readInput();its null...
    This is the first time ive tried to use an array so
    its not surprising im having trouble.
    this is my program:
    import java.util.*;
    public class studentRecordDemo
         public static void main(String[] args)
              int studNum, index;
    System.out.println("Enter the number of students
    ts you wish to record");
              Scanner keyboard = new Scanner(System.in);
              studNum = keyboard.nextInt();
    studentRecord student[] = new
    ew studentRecord[studNum];
              for (index = 0; index < studNum; index++)
              {student[index].readInput();
              student[index].writeOutput();}
    }And it lets me compile it but when i enter a number
    it gives me the error:
    Exception in thread "main"
    java.lang.NullPointerException
    at
    studentRecordDemo.main(studentRecordDemo.java:15)the
    So yeah im trying to create an array of the class
    "studentRecord" and the number is input by the user.
    Is there a way to make that work or would it be
    easier to just make the array a really high number?

  • I just downloaded photoshop elements - have opened an existing pdf drawing - 1) I am trying to create layers; however, the option is not available? (i.e. greyed out rather than black) from the drop down menu - "layer" - "create new"? what do i do

    i just downloaded photoshop elements - have opened an existing pdf drawing - 1) I am trying to create layers; however, the option is not available? (i.e. greyed out rather than black) from the drop down menu - "layer" - "create new"? what do i do

    You'd better ask here:
    https://forums.adobe.com/community/photoshop_elements

Maybe you are looking for

  • Output Text values getting duplicated when UDF attached to view form

    Hi Experts, I am getting a error where the output text is having duplicated values, when i am trying to attach existing UDF to view form. Like for instance, as mentioned below: Phone Number - 23456789 State - CACA Country - UnitedStatesUnitedStatesUn

  • Pan and zoom

    trying to pan and zoom within still image frame ken burns style. Any suggestions? Thanks

  • Package lost in delivery

    I placed an order two weeks ago that shipped right away via UPS Surepost, where the "Sure" stands for "Sure to never arrive".  UPS, as usual, performed their portion of the shipment correctly (or so I assume) as their website shows the package was ha

  • AOL & Automator

    I have delayed upgrading from Snow Leopard to Lion (and iCloud) because I have a vast number of e-mail messages saved using AOL for Mac OS X, which is a PowerPC application that will not work with Lion.  Now that MobileMe is set to expire in a few da

  • Bug editing views

    Hi all. Using 1.2.0.29.98 on Win XP and when I edit a view that has no ORDER BY clause, if I click on ORDER BY clause in the right panel I get the following exception: java.lang.NullPointerException      at oracle.ide.db.panels.sql.OrderByPanel.init(