Newbie help needed on apparent lockout

Hi all, I am pretty much Mac illiterate but can stumble around. I was helping a friend who is even worse off install Retrospect (6.1) on her iMac (OS X 10.4.11). Install went fine, a backup ran fine and then today her machine appears to have locked up. After holding the power button to get it to shutdown and then reboot the mouse moves, dashboard comes up when I mouse to bottom of screen and a Retrospect window comes up and a window asking if wireless should attach to open network (machine is hardwired also). Clicking on anything doesn't appear to get any response nor does pressing any keyboard keys (I'm unfamiliar with the apple key combinations so I haven't tried any). At any rate machine appears stuck. It has ran fine for a long while only changes have been install Retrospect yesterday and plugged in Maxtor OneTouch 4 Plus (and formatted it to Mac). The desktop and windows appear normal, mousing over things like the close, minimze, etc... buttons highlights them but it just appears to refuse to accept any input. The keyboard and mouse are connected via bluetooth but since mouse moves I assume its not a problem there. Can anyone point me in some direction?
TIA
Ron

Problem solved, not sure what it was but in desperation I turned of the wireless keyboard and mouse and plugged in my USB keyboard/mouse and everything worked, shutdown turned on the wireless keyboard/mouse and removed my USB and started up and everything worked just fine. Very strange

Similar Messages

  • Java newbie help: Need to change a graphic on screen

    Hello everyone. I'm a long time C/C++ programmer, and I've been thrust into the Java world when I inherited an incomplete project. If something I mention later on sounds stupid, it's probably because it came that way, or I'm trying to force it into what I know from old experience.
    FWIW, the project is being developed with Netbeans.
    What I'm after is how to change a graphic object onscreen from within the code, vs. with a device such as a mouse. I'm trying to emulate an LED indicator.
    What I've done so far is to try using the enable state, and defining GIFs to display. That didn't work.
    I've switched gears a bit, and tried something similar with the selected property, but that will only work if I hit the item with my mouse and click. Also, the item is defined as a jToggleButton.
    In general terms, what do I need to do to set this up for the displayed item to change without device input? I've been reading stuff about Buttons, ToggleButtons, Graphics, Images, and Icons, and I'm waaaaaay lost right now.
    To add to the frustration is that I've done something similar with Visual C++, and that worked as intended. Harumph.
    Help?!?

    FWIW, the project is being developed with Netbeans.
    In case you don't know, you can use any editor to develop java code.
    What I'm after is how to change a graphic object onscreen from within the code, vs. with a device such as a mouse. I'm trying to emulate an LED indicator.
    What I've done so far is to try using the enable state, and defining GIFs to display. That didn't work.
    What happend?
    I've switched gears a bit, and tried something similar with the selected property, but that will only work if I hit the item with my mouse and click. Also, the item is defined as a jToggleButton.
    Is this not what you wanted?

  • Newbie help needed w/Graphics class!

    Hi everyone,
    I'm stuck on something I know is very simple to do, but I can't seem to find the right combination. I have a derived class that draws a circle using the graphics class. I'm getting compilation errors when I try to set the color and draw the circle. I have looked thru these forums as well as the API. Below is my code. Any pointers would be highly appreciated!
    import java.awt.Graphics;
    public class SmartCircle extends SmartShape
    SmartCircle(int first, int second, int third, Color c)
    super(first, second, third, c);
    public void draw(Graphics g)
    setColor(Color c);
    fillOval(first, second, size, size);
    }

    Here is SmartShape. It is located in the same directory as SmartCircle, so therefore doesn't need to be imported, correct?
    public abstract class SmartShape
    //define instance variables
    protected int positionX, positionY, size;
    protected Color theColor;
    public SmartShape()
         //initialize variables
         positionX = 20;
         positionY = 20;
         theColor = Color.white;
    public SmartShape(int first, int second, int third, Color c)
         if (first >= 0)
         positionX = first;
         else
         positionX = 0;
         if (second >= 0)
         positionY = second;
         else
         positionY = 0;
         if (third >= 0)
         size = third;
         else
         size = 0;
         theColor = c;
    public abstract void draw(Graphics g);
    Hope that helps!
    Melissa

  • Newbie help needed.  Looking to circle options on a form.

    Hey Guys,
    I'm a total beginner at this, but we've been mapping out forms and I need to know how to be able to "circle" different options on a form.
    I think the best way to do this is to have a button which makes a circle object visible or hidden.  Currently I've figured out how to set an object as hidden and make it appear on button click, but not make it go back to hidden if the button is clicked again.  Many times its just a yes/no type case, but sometimes there are cases where I have multiple options where only one can be selected and I would like to be able to click and circle the appropriate type.
    An example:
    How many cylinders does your vehicle have:
         4     6     8
    and I would like to make it so if you click the 4 it will circle the 4 and make sure the 6 and 8 are not circled.
    Any help would be appreciated.

    How about this case:
    There are three different cases that could be true, 4 cylinders, 6 cylinders and 8 cylinders.  I have created the 4, 6 and 8 as buttons, and created three circle objects as cyl4, cyl6 and cyl8.  I want it so that when 4 is clicked it displays the circle object cyl4 and makes the others hidden, unless cyl4 is already visible then it will just make all three objects hidden.  So far I have this code on each button click, modified for which objects should be set to visible on each one:
    topmostSubform.Page1.Span[41].Fourcyl::click - (JavaScript, client)
    if (cylinder == 4){
        xfa.form.topmostSubform.Page1.cyl4.presence="hidden"
        xfa.form.topmostSubform.Page1.cyl6.presence="hidden"
        xfa.form.topmostSubform.Page1.cyl8.presence="hidden"
        cylinder.value = 0
    else{
        xfa.form.topmostSubform.Page1.cyl4.presence="visible"
        xfa.form.topmostSubform.Page1.cyl6.presence="hidden"
        xfa.form.topmostSubform.Page1.cyl8.presence="hidden"
        cylinder.value = 4
    Where cylinder is just a control variable.  It's probably something simple that I'm missing, any help would be appreciated.
    Thanks

  • Newbie - help needed with array and dictionary objects

    Hi all
    Please see the code below. I've posted this code in another thread however the original issue was resolved and this is now a new issue I'm having although centered around the same code.
    The issue is that I'm populating an array with dictionary objects. each dictionary object has a key and it's value is another array of custom objects.
    I've found that the code runs without error and I end up with my array as I'm expecting however all of the dictionary objects are the same.
    I assume it's something to do with pointers and/or re-using the same objects but i'm new to obj-c and pointers so i am a bit lost.
    Any help again is very much appreciated.
    // Open the database connection and retrieve minimal information for all objects.
    - (void)initializeDatabase {
    NSMutableArray *authorArray = [[NSMutableArray alloc] init];
    self.authors = authorArray;
    [authorArray release];
    // The database is stored in the application bundle.
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString *path = [documentsDirectory stringByAppendingPathComponent:@"books.sql"];
    // Open the database. The database was prepared outside the application.
    if (sqlite3_open([path UTF8String], &database) == SQLITE_OK) {
    // Get the primary key for all books.
    const char *sql = "SELECT id, author FROM author";
    sqlite3_stmt *statement;
    // Preparing a statement compiles the SQL query into a byte-code program in the SQLite library.
    // The third parameter is either the length of the SQL string or -1 to read up to the first null terminator.
    if (sqlite3preparev2(database, sql, -1, &statement, NULL) == SQLITE_OK) {
    // We "step" through the results - once for each row.
    // We start with Letter A...we're building an A - Z grouping
    NSString *letter = @"A";
    NSMutableArray *tempauthors = [[NSMutableArray alloc] init];
    while (sqlite3_step(statement) == SQLITE_ROW) {
    author *author = [[author alloc] init];
    author.primaryKey = sqlite3columnint(statement, 0);
    author.title = [NSString stringWithUTF8String:(char *)sqlite3columntext(statement, 0)];
    // FOLLOWING WAS LEFT OVER FROM ORIGINAL COMMENTS IN SQLBooks example....
    // We avoid the alloc-init-autorelease pattern here because we are in a tight loop and
    // autorelease is slightly more expensive than release. This design choice has nothing to do with
    // actual memory management - at the end of this block of code, all the book objects allocated
    // here will be in memory regardless of whether we use autorelease or release, because they are
    // retained by the books array.
    // if the author starts with the Letter we currently have, add it to the temp array
    if ([[author.title substringToIndex:1] compare:letter] == NSOrderedSame){
    [tempauthors addObject:author];
    } // if this is different letter, then we need to deal with that too...
    else {
    // create a dictionary to store the current tempauthors array in...
    NSDictionary *tempDictionary = [NSDictionary dictionaryWithObject:tempauthors forKey:@"authors"];
    // add the dictionary to our appDelegate-level array
    [authors addObject:tempDictionary];
    // now prepare for the next loop...
    // set the new letter...
    letter = [author.title substringToIndex:1];
    // remove all of the previous authors so we don't duplicate...
    [tempauthors removeAllObjects];
    // add the current author as this was the one that didn't match the Letter and so
    // never went into the previous array...
    [tempauthors addObject:author];
    // release ready for the next loop...
    [author release];
    // clear up the remaining authors that weren't picked up and saved in the "else" statement above...
    if (tempauthors.count > 0){
    NSDictionary *tempDictionary = [NSDictionary dictionaryWithObject:tempauthors forKey:@"authors"];
    [authors addObject:tempDictionary];
    else {
    printf("Failed preparing statement %s
    ", sqlite3_errmsg(database));
    // "Finalize" the statement - releases the resources associated with the statement.
    sqlite3_finalize(statement);
    } else {
    // Even though the open failed, call close to properly clean up resources.
    sqlite3_close(database);
    NSAssert1(0, @"Failed to open database with message '%s'.", sqlite3_errmsg(database));
    // Additional error handling, as appropriate...
    Message was edited by: dotnetter

    Ok, so I know what the issue is now...I just don't know enough to be able to resolve it!
    it's the tempAuthors objects.
    It's an NSMutableArray which is create on the line before the start of the WHILE loop.
    Having looked through the debugger, I can see that each dictionary object is created (with different codes which I assume are memory addresses) so all is well there. However, on each iteration of the loop in the middle there is an IF...ELSE... statement which in the ELSE section is clearing all objects from the tempAuthors array and beginning to repopulate it again.
    Looking at the containing dictionary objects in the debugger I can see that the tempAuthors object that each contains has the same code (again, I'm assuming this is a memory address) - so if I understand correctly, it's the same object...I assumed that when I created the dictionary using the dictionWithObject call that I would be passing in a copy of the object, but it's referencing back to the object which I then go on to change.
    Assuming the above is correct, I've tried several "stabs in the dark" at fixing it.
    I've tried relasing the tempAuthors object within the ELSE and initialising it again via an alloc...init - but this didn't work and again looking through the debugger it looks as though it was confused as to which object it was supposed to be using on the following iteration of the WHILE loop (it tried to access the released object).
    Having read a little more about memory management can someone tell me if I'm correct in saying that the above is because the tempAuthors object is declare outside the scope of the WHILE loop yet I then try to re-instantiate it within the loop (does that make sense???).
    Sorry for the long post...the more I can understand the process the less I can hopefully stop relying on others for help so much.
    I am continuing to read up on memory management etc but just not there yet.
    Regards
    Wayne

  • Creating GUI window. Newbie help needed

    Hey all this is the first time i am building a GUI box for school. Can you kind of help me out here. I think i am doing this all wrong. Can you point me in the direction of setting up a Blank box just so i can then play with it from there trying to add JButtons, JLabels and all that other stuff. This is what i was trying and i know its way wrong.. haha thanks
    import java.io.*;
    import javax.swing.*;
    public class LetterProgram
    public LetterProgram
    setTitle("Letter Conversion Program");
    setSize(100,50);
    setVisible(True);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    }

    import javax.swing.*;
    public class MyJFrame extends JFrame {
      private int returnCode = 0;
      public MyJFrame () {
      public MyJFrame (String title) {
        super (title);
      protected void frameInit() {
        super.frameInit();
        setDefaultCloseOperation(EXIT_ON_CLOSE);
    }You should start from here.
    put every thing u want into ExitableJFrame's constructor.
    You will need a main method to creat a JFrame.
    and then setVisiable(true); some sort of stuff there.
    GOOD LUCK

  • NEWBIE - Help Needed Please!

    Hi - I am new to iMovie and have iMovie '08. I need to create a project as follows. I am trying to recreate some movies that when played will look like a Trade Test Transmission with music. Viz:
    The movie needs to be a static caption that lasts for about 1 hour
    That caption exists as as a .jpg file.
    I need to play an hour's worth of music with that caption
    I can import the picture and add music but I cannot work out how to make the picture stay on screen for 1 hour - is there a simple way of doing this?
    Sorry for such an easy question - iMovie is about the only Apple Software I have never used!
    Christian

    .. The maximum length it will allow me to enter seems to be 60 seconds. ...
    oops, you're right!
    I'm an old iM user, vers. ≤6 allowed longer durations than 60secs..
    the '4 sec increment' is defined in iM's prefs, you'll find there a slider, but it offers 10sec max. ...-
    soooo, 60x paste/copy, OR using iMHD6 ...
    Plan B)
    import your pic into iPhoto; create a slideshow containing just that single pic... set duration to 3600secs.. add music .. export 'movie' ...

  • Newbie Help Needed: Data Binding

    Okay, lemme see if I can possibly explain this issue clearly
    enough... (The whole explanation of the object graph may very well
    be superfluous, so you can probably skip to the bottom.)
    I have a whole object graph that I've downloaded from my
    server to my Flex client. Here's the general gist of object
    relationships (and I have to lay it out this way because there's
    not really any way to sketch on a whiteboard the object graph):
    Object A is a parent of object B, and there is a one-to-many
    relationship between the two. That is, there is one A to many B's.
    There is a one-to-one relationship between Object B and
    Object C.
    There is a many-to-one relationship between Object C and
    Object D. That is, there are many C's to one D.
    There is a many-to-one relationship between Object D and
    Object E. That is, there are many D's to one E.
    There is a many-to-one relationship between Object E and
    Object F. That is, there are many E's to one F.
    Now, because I am only given information from the user as far
    as which object A is the chosen object (that is, I'm not told right
    off the bat which B's, C's, D's, E's, and F's to pull from the
    server), I have a series of events being fired and listened to, so
    the sequence of steps pretty much goes like this:
    User chooses a particular object A.
    I pull A from the server.
    I pull all of A's children (the B objects).
    I look at the keys stored in the B's and pull the
    corresponding C's.
    I look at the keys stored in the C's and pull their parents,
    the D's.
    I look at the keys stored in the D's and pull their parents,
    the E's.
    I look at the keys stored in the E's and pull their parents,
    the F's.
    Now, here's where I'm having an issue:
    The B objects store a Date object called startTime. The D
    objects store an integer called runTimeMillis (the runtime of the
    video, in milliseconds). I need to somehow present endTime, which
    is simply the sum of startTime + runTimeMillis. But I have to do it
    in a data binding because the D objects are downloaded later than
    the B objects. But I've tried so many different ways of coding it,
    and nothing seems to work. Here's where I'm at:
    <mx:DateFormatter id="hmmssaFormatter"
    formatString="L:NN:SSA"/>
    <mx:Label text="{hmmssaFormatter.format(B.startTime +
    B.C.D.runTimeMillis)}" fontWeight="bold"/>
    The only thing I get in my client is a blank label. What am I
    doing wrong? The following seems to work just fine in displaying
    the start time of the video:
    <mx:Label text="{hmmssaFormatter.format(B.startTime)}"
    fontWeight="bold"/>
    But adding a number of milliseconds doesn't seem to work at
    all. Can anyone shed some light on the matter? Thanks!

    "Noreaster76" <[email protected]> wrote in
    message
    news:[email protected]...
    > Okay, lemme see if I can possibly explain this issue
    clearly enough...
    > (The
    > whole explanation of the object graph may very well be
    superfluous, so you
    > can
    > probably skip to the bottom.)
    >
    > I have a whole object graph that I've downloaded from my
    server to my Flex
    > client. Here's the general gist of object relationships
    (and I have to
    > lay it
    > out this way because there's not really any way to
    sketch on a whiteboard
    > the
    > object graph):
    >
    > Object A is a parent of object B, and there is a
    one-to-many relationship
    > between the two. That is, there is one A to many B's.
    > There is a one-to-one relationship between Object B and
    Object C.
    > There is a many-to-one relationship between Object C and
    Object D. That
    > is,
    > there are many C's to one D.
    > There is a many-to-one relationship between Object D and
    Object E. That
    > is,
    > there are many D's to one E.
    > There is a many-to-one relationship between Object E and
    Object F. That
    > is,
    > there are many E's to one F.
    >
    > Now, because I am only given information from the user
    as far as which
    > object
    > A is the chosen object (that is, I'm not told right off
    the bat which B's,
    > C's,
    > D's, E's, and F's to pull from the server), I have a
    series of events
    > being
    > fired and listened to, so the sequence of steps pretty
    much goes like
    > this:
    >
    > User chooses a particular object A.
    > I pull A from the server.
    > I pull all of A's children (the B objects).
    > I look at the keys stored in the B's and pull the
    corresponding C's.
    > I look at the keys stored in the C's and pull their
    parents, the D's.
    > I look at the keys stored in the D's and pull their
    parents, the E's.
    > I look at the keys stored in the E's and pull their
    parents, the F's.
    >
    > Now, here's where I'm having an issue:
    > The B objects store a Date object called startTime. The
    D objects store an
    > integer called runTimeMillis (the runtime of the video,
    in milliseconds).
    > I
    > need to somehow present endTime, which is simply the sum
    of startTime +
    > runTimeMillis. But I have to do it in a data binding
    because the D
    > objects are
    > downloaded later than the B objects. But I've tried so
    many different
    > ways of
    > coding it, and nothing seems to work. Here's where I'm
    at:
    >
    > <mx:DateFormatter id="hmmssaFormatter"
    formatString="L:NN:SSA"/>
    > ...
    > <mx:Label text="{hmmssaFormatter.format(B.startTime +
    > B.C.D.runTimeMillis)}"
    > fontWeight="bold"/>
    >
    >
    > The only thing I get in my client is a blank label. What
    am I doing
    > wrong?
    > The following seems to work just fine in displaying the
    start time of the
    > video:
    >
    > <mx:Label
    text="{hmmssaFormatter.format(B.startTime)}" fontWeight="bold"/>
    >
    > But adding a number of milliseconds doesn't seem to work
    at all. Can
    > anyone
    > shed some light on the matter? Thanks!
    I still think there's something unexpected going on with your
    data. In the
    function where you set C and D, can you put a breakpoint and
    inspect the
    variables? You could also probably put a break point in the
    formatter and
    see shat has been passed in to it.
    HTH;
    Amy

  • Newbie help needed. Cant save to a WD Elements Hard Drive!!!Going Crazy!

    We got our imac yesterday! Love it but.....only real issue that is driving me crazy and ruining the experience is that I can't save a pages doc to my WD Elements External Hard Drive. It is installed I can move stuff from it but nothing to it! When I select save as and pick "Elements" a message appears saying <the document "Test" could not be saved as "test". Read-only file system. Can any one explain
    Message was edited by: wyleybruce

    OSX can read but not write to NTFS formatted disks. If you want to keep the disk as NTFS, there are utilities (like NTFS3G ) you can get that will allow you to save to the disk as it is currently formatted.
    IMHO it would be better for you to reformat the disk as Mac OS Extended if you intend to use it on an ongoing basis with your new Mac. But remember to back up anything you want or need to keep, because reformatting will erase everything that is on the drive.
    (Notes: If you reformat the disk to Mac OS Extended and then you want to use it with a Windows system, you will need Macdrive on the Windows machine. The only format that is natively compatible on both platforms is FAT32.)

  • Newbie help needed with Applet

    I am having a problem with the following Applet. I have highlighted it in bold.
    How can I ensure that all of the conditions are met regardless of the order they are inserted on the graph,within the program?
    At the moment I have to do them in the exact order they are in the code in order to get the "Winner" message.
    Also if I insert an image at any time at the point if(x >= 290 && x <= 350 && y >= 290 && y <= 350) I also receive the "Winner" message. I realise this happens because it is the last line of code in this statement.
    However I am very new to this and dont know how to fix it. Indeed I dont even know if this is the correct way to do this.
    Hope this makes sense.
    Any help would be very much appreciated
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    public class MyDraughts extends Applet implements MouseListener,ActionListener,
                   MouseMotionListener{
                        public MyDraughts(){
                             points = new ArrayList();
                             pawncount = 0;
                             pawncount1 = 14;
                             message = "";
                             message1 = "";
                             title = new Font ("Arial", Font.BOLD, 18);
         private Point square1, square2, square3, square4, square5, square6, square7,square8,square9,
         square10,square11,square12,square13,square14,square15,square16,square17,square18,square19,
         square20,square21,square22,square23,square24,square25,square26,square27,square28,square29,
         square30,square31,square32,mouse;
         private int select;
         private Image pawn;
         private Point icon;
         private ArrayList points;
         private int x;
         private int y;
         private int pawncount;
         private int pawncount1,pawncount2;
         private Button undoButton;
         private String message,message1;
         private Font title;
         public void init(){
              setBackground(new Color(210,255,210));
              this.addMouseMotionListener(this);
              this.addMouseListener(this);
              select = 0;
              square1=new Point(50,10);
              square2=new Point(130,10);
              square3=new Point(210,10);
              square4=new Point(290,10);
              square5=new Point(10,50);
              square6=new Point(90,50);
              square7=new Point(170,50);
              square8=new Point(250,50);
              square9=new Point(50,90);
              square10=new Point(130,90);
              square11=new Point(210,90);
              square12=new Point(290,90);
              square13=new Point(10,130);
              square14=new Point(90,130);
              square15=new Point(170,130);
              square16=new Point(250,130);
              square17=new Point(50,170);
              square18=new Point(130,170);
              square19=new Point(210,170);
              square20=new Point(290,170);
              square21=new Point(10,210);
              square22=new Point(90,210);
              square23=new Point(170,210);
              square24=new Point(250,210);
              square25=new Point(50,250);
              square26=new Point(130,250);
              square27=new Point(210,250);
              square28=new Point(290,250);
              square29=new Point(10,290);
              square30=new Point(90,290);
              square31=new Point(170,290);
              square32=new Point(250,290);
              undoButton = new Button("Undo");
    add(undoButton);
    undoButton.addActionListener(this);
              mouse= new Point();
              icon = new Point();
              pawn = getImage(getCodeBase(), "pawn.gif");
    public void actionPerformed(ActionEvent actionevent){
    if(actionevent.getSource() == undoButton){
    int a = points.size();
    int b = a - 1;
    points.remove(b);
    a = points.size();
    repaint();
    public void paint (Graphics g){
         drawBox(g);
         g.fillRect(square1.x, square1.y,40,40);
         g.fillRect(square2.x, square2.y,40,40);
         g.fillRect(square3.x, square3.y,40,40);
         g.fillRect(square4.x, square4.y,40,40);
         g.fillRect(square5.x, square5.y,40,40);
         g.fillRect(square6.x, square6.y,40,40);
         g.fillRect(square7.x, square7.y,40,40);
         g.fillRect(square8.x, square8.y,40,40);
         g.fillRect(square9.x, square9.y,40,40);
         g.fillRect(square10.x, square10.y,40,40);
         g.fillRect(square11.x, square11.y,40,40);
         g.fillRect(square12.x, square12.y,40,40);
         g.fillRect(square13.x, square13.y,40,40);
         g.fillRect(square14.x, square14.y,40,40);
         g.fillRect(square15.x, square15.y,40,40);
         g.fillRect(square16.x, square16.y,40,40);
         g.fillRect(square17.x, square17.y,40,40);
         g.fillRect(square18.x, square18.y,40,40);
         g.fillRect(square19.x, square19.y,40,40);
         g.fillRect(square20.x, square20.y,40,40);
         g.fillRect(square21.x, square21.y,40,40);
         g.fillRect(square22.x, square22.y,40,40);
         g.fillRect(square23.x, square23.y,40,40);
         g.fillRect(square24.x, square24.y,40,40);
         g.fillRect(square25.x, square25.y,40,40);
         g.fillRect(square26.x, square26.y,40,40);
         g.fillRect(square27.x, square27.y,40,40);
         g.fillRect(square28.x, square28.y,40,40);
         g.fillRect(square29.x, square29.y,40,40);
         g.fillRect(square30.x, square30.y,40,40);
         g.fillRect(square31.x, square31.y,40,40);
         g.fillRect(square32.x, square32.y,40,40);
         g.setFont(title);
         g.drawString(message, 350, 300);
         g.drawString(message1, 350, 320);
         for(int i = 0; i < points.size(); i++){
    icon = (Point)points.get(i);
    g.drawImage(pawn, icon.x, icon.y, 25, 25, this);
         g.drawImage(pawn,175,135,25,25,this);
         g.drawImage(pawn,135,175,25,25,this);
         g.setFont(title);
         g.drawString("Click A Square To Place A Pawn", 350, 50);
    public void mouseDragged(MouseEvent e){}
    public void mouseMoved(MouseEvent e){}
    //require for the interface
    public void mousePressed(MouseEvent mouseevent){
    setBackground(new Color(210,255,210));
    x = mouseevent.getX();
    y = mouseevent.getY();
    if(x > 19 && x < 312 && y > 19 && y < 312){
    pawncount = pawncount + 1;
    points.add(mouseevent.getPoint());
    if(pawncount > pawncount1){
    setBackground(Color.red);
    message = "Too Many Pawns!You can only place 14";
    message1 = "Hit restart to play again";
    pawncount1 = 14;
    if(x >= 10 && x <= 50 && y >= 290 && y <= 330){
    setBackground(Color.red);
    message = "A Pawn Can't be placed here";
    pawncount = 15;
    if(x >= 50 && x <= 90 && y >= 250 && y <= 290){
    setBackground(Color.red);
    message = "A Pawn Can't be placed here";
    pawncount = 15;
    if(x >= 90 && x <= 130 && y >= 210 && y <= 250){
    setBackground(Color.red);
    message = "A Pawn Can't be placed here";
    pawncount = 15;
    //This is the solution for the puzzle
    if(x >= 90 && x <= 130 && y >= 10 && y <= 50);
    if(x >= 250 && x <= 290 && y >= 10 && y <= 50);
    if(x >= 90 && x <= 130 && y >= 50 && y <= 90);
    if(x >= 170 && x <= 210 && y >= 50 && y <= 90);
    if(x >= 10 && x <= 50 && y >= 90 && y <= 130);
    if(x >= 50 && x <= 90 && y >= 90 && y <= 130);
    if(x >= 250 && x <= 290 && y >= 130 && y <= 170);
    if(x >= 50 && x <= 90 && y >= 170 && y <= 210);
    if(x >= 210 && x <= 250 && y >= 210 && y <= 250);
    if(x >= 290 && x <= 350 && y >= 210 && y <= 250);
    if(x >= 10 && x <= 50 && y >= 250 && y <= 290);
    if(x >= 130 && x <= 170 && y >= 250 && y <= 290);
    if(x >= 210 && x <= 250 && y >= 290 && y <= 350);
    if(x >= 290 && x <= 350 && y >= 290 && y <= 350){
    setBackground(Color.green);
    message = "Winner";
    pawncount = 14;
    repaint();
    //required for the interface
    public void mouseClicked(MouseEvent event){}
    public void mouseReleased(MouseEvent event){}
    public void mouseEntered(MouseEvent event){}
    public void mouseExited(MouseEvent event){}
    public void drawBox(Graphics g){
         for(int i=10;i<=350;i+=40){
    g.drawLine(i,10,i,330);
    g.drawLine(10,i,330,i);
    }

    Since your code is heavilly dependant on which square is clicked on I'd define a class extending JComponent to represent a square. You can make this an inner class, which would simplify access to other squares etc. Then lay these out in your JPanel, and each will have it's own paint method which will paint it with or without a pawn.
    At the same time you add all these as a two dimensional array for logical access. Each square has (or is) it's own mouseListener so that you can let awt figure out which you clicked on.
    private static final int CELL_SIZE=50;
    private static final int BOARD_SIZE= 8;
    private class Square extends JComponent implements MouseListener {
        public boolean hasPawn;
        private Square(int row, int col) {
             Rectangle where = new Rectangle(col * CELL_SIZE, row * CELL_SIZE,
    CELL_SIZE, CELL_SIZE);
            setBounds(where);
           addMousListener(this);
       public void addPawn() {
         if(!hasPawn) {
           hasPawn = true;
           repaint();
      public void paint(Graphics g) {
    } // end of inner class
    Square[][]board = new Square[BOARD_SIZE][BOARD_SIZE];}

  • Newbie - Help needed starting with Threads

    Hi Friends,
    I have a class which extends thread and all it does is displays its name and then goes to sleep. So, I have this in my run method:
    public void run() {
            System.out.println("Name: "+name);
            try{
                 Thread.sleep(1000);
            }catch(Exception e){
              e.printStackTrace();
        }Now I have a tester class which created objects of these class and they should keep running until the user explicitly stops the program. So, I have this in my tester class:
    Thread one = new MyClass("one");
    Thread one = new MyClass("two");
    one.start();
    two.start();They run fine for one time but how can i make them run continously?? Any help will be appreciated.
    Thanks

    Micks80 wrote:
    I tried to add that while loop but it throws IllegalStateException because I guess you cannot call the start method more then once...
    So any other ways to accomplish this???As suggested in reply #1 put the while loop inside the run method of the Runnable.
    Also it is better for MyClass to implement Runnable rather than extending Thread. It is always better to implement Runnable than extend Thread.

  • NEWBIE: Help needed - Eclipse freeze after starting WLS 9.2

    Hi All,
    I'm very new in development with wls 9.2 and eclipse.
    I'm trying to create a simple application (an EAR with a Session Bean).
    When I start the WLS inside Eclipse (debug or run mode), this one, after a few seconds or clicks, freeze with 99%CPU usage.
    Thanks in advance for help.... it's urgent....
    Eclipse 3.3.0
    WLST 1.1.0
    WLS 9.2
    Edited by mtode at 10/07/2007 2:04 AM
    Edited by mtode at 10/07/2007 2:05 AM

    If I understand you correctly, Eclipse stops responding after a while.
    This may not be actually related to starting WLS. It sounds a bit like
    you might be having a memory problem. Could you specify your operating
    system, the amount of physical memory and the contents of your
    eclipse.ini file?
    Thanks,
    - Konstantin

  • Trying to update Project scheduled finish date - newbie help needed!

    Guys, I am super new to Oracle Projects, I have never used it before.  I've just learned a few things in the UI and read through the docs documenting the stored procs.  My question is simple (hopefully)   In the UI I choose a responsibility, then under "Projects : Delivery" I choose "Search Projects", I enter the Project ID in the field and click Go, I am able to see all the project details and the Tasks.  No problem there!  What I would like to do through the Update_Project API is to change the "Scheduled Finish Date" of the Project.
    I have the following information that I have managed to scrape up:
    Project_id, Responsibility_id, User_id, Resp_Appl_Id
    I retrieved the project id using:
             Select project_id,name from pa_projects_all
              where name = 'My Project';
    So first I call set_global_info with the appropriate parameters, then this:
        -- SET GLOBAL VALUES
         pa_interface_utils_pub.set_global_info(
         p_api_version_number => 1.0,
         p_responsibility_id => fnd_profile.value('57203'),
         p_user_id => fnd_profile.value('1013415'),
         p_msg_count => l_msg_count,
         p_msg_data => l_msg_data,
         p_return_status => l_return_status);
         l_project_in.pa_project_id := 4608;
         l_project_in.scheduled_finish_date := to_date('2008-02-27', 'YYYY-MM-DD');
      --UPDATE_PROJECT
              pa_project_pub.UPDATE_project(
                        l_api_version_number,
                        p_commit => l_commit,
                        p_init_msg_list => l_init_msg_list,
                        p_msg_count => l_msg_count,
                        p_msg_data => l_msg_data,
                        p_return_status => l_return_status,
                        p_workflow_started => l_workflow_started,
                        p_pm_product_code => null,
                        p_project_in => l_project_in,
                        p_project_out => l_project_out,
                        p_key_members => l_key_members,
                        p_class_categories => l_class_categories,
                        p_tasks_in => l_tasks_in,
                        p_tasks_out => l_tasks_out);
    What I am getting is the message "error :Project ID is invalid" and the status is "E"
    I'm not sure why it is invalid as it is the exact Project ID from the projects table.  The only thing I can think of is that the p_pm_product_code is set to null but I am not sure where this value comes from and why it even matters.  I checked the documents and it says it refers to some external system.  Why does the external system code matter if I am changing data within Oracle Projects?

    Hello,
    Looks like you are not setting the Initialization values correctly. Oracle Project APIs are Org specific and require proper initialization before being called for them to work.
    Few things i noticed from the code is :
    1.  The following is being used to set the User ID and Responsibility ID  :
         p_responsibility_id => fnd_profile.value('57203'),
         p_user_id => fnd_profile.value('1013415'),
    I think the call should be like this. This should be used only if you are going to call the API through a concurrent program from the submit request window (Oracle Apps environment). fnd_profile.value will get the responsibility id and the used id of the user running the program and assign it to the variables.
         p_responsibility_id => fnd_profile.value('RESP_ID'),
         p_user_id => fnd_profile.value('USER_ID'),
    Or If you are directly passing the IDs hardcoded then, This can be used if you are running the script from a Non-Oracle Applications environment, for example from SQL*Plus.
         p_responsibility_id => 57203
         p_user_id => 1013415
    2. I notice that you are not passing P_OPERATING_UNIT_ID parameter in the call to pa_interface_utils_pub.set_global_info. This is fine if you are not using MOAC  and you have set MO: Operating Unit profile for the responsibility being passed.  If you are using MOAC or are not sure, then it is always a good practice to explicitly  pass the P_OPERATING_UNIT_ID parameter in the call to pa_interface_utils_pub.set_global_info.
    Note :  DO NOT use fnd_profile.value('ORG_ID') to set the P_OPERATING_UNIT_ID parameter. In a MOAC environment this may not work.
    3. Always ensure you check the return status of the pa_interface_utils_pub.set_global_info for success before calling the Project APIs. This will save you a lot of frustration when testing.
    4. You might find the following note useful
    Project API Overview and Reference (Doc ID 1424156.1)
    Regards,
    Raghavan Gopalakrishnan

  • More Newbie help needed please.

    Hello,
    I am attempting to sort an array which is defined in the main method, but the array must be sorted through the use of another method. From my understanding, this is tricky, because as I found out last night, you cannot use another method from within the main method (this kind of makes sense). I think I am pretty close but am getting non-static referrence errors. Here is the actual error and code. Thanks for looking at this.
    error:
    D:\School\IT315\Programs\Inventory.java:64: non-static variable sortItem cannot be referenced from a static context
              sortItem = ("myItem[0].getTotal()" + "myItem[1].getTotal()" + "myItem[2].getTotal()");
    ^
    1 error
    Tool completed with exit code 1
    public class Inventory
         // Begin main method
         public static void main( String args[] )
              int i;
              //Instantiate Iteminfo array
              Iteminfo[] myItem = new Iteminfo[3];
              // Create Item Info object
              myItem[0] = new Iteminfo( 01, "Laptop", 15, 2000 );
              myItem[1] = new Iteminfo( 02, "Desktop", 25, 1500 );
              myItem[2] = new Iteminfo( 03, "Server", 10, 5000 );
              // Display Program title and description.
              System.out.println( "Inventory Program Part 2" );
              System.out.println(); //outputs blank line
              System.out.println();
              // Display item info
              System.out.printf( "The first item is: \n\n" );
              myItem[0].displayInfo();
              System.out.println();
              System.out.printf( "The second item is: \n\n" );
              myItem[1].displayInfo();
              System.out.println();
              System.out.printf( "The third item is: \n\n" );
              myItem[2].displayInfo();
              System.out.println();
              System.out.printf( "The total of all inventory is: $%.2f. \n\n", getInvTotal(myItem) );
              System.out.printf( "The sorted inventory list is: %s", sortItemInfo(myItem) );
         } // End method main
         //method to total inventory
         static double getInvTotal(Iteminfo[] myItem)
              return myItem[0].getTotal() + myItem[1].getTotal() + myItem[2].getTotal();
         } //end method
         // method to sort array;
         String sortItem;
         static String sortItemInfo(Iteminfo[] myItem)
              sortItem = ("myItem[0].getTotal()" + "myItem[1].getTotal()" + "myItem[2].getTotal()");
         } //end method
    } // End class Payroll

    oh yeah. sorry. Two new errors were generated (same
    type). ...Yeah, sorry I didn't look closely enough.
    May I suggest a different approach? This is far from perfect, but is a big improvement of your current code:public class Inventory
        public static void main( String args[] )
            Iteminfo[] myItems = new Iteminfo[3];
            myItems[0] = new Iteminfo( 01, "Laptop", 15, 2000 );
            myItems[1] = new Iteminfo( 02, "Desktop", 25, 1500 );
            myItems[2] = new Iteminfo( 03, "Server", 10, 5000 );
            System.out.println("Inventory Program Part 2\n\n");
            displayItems(myItems);
            System.out.printf( "The total of all inventory is: $%.2f. \n\n", getInvTotal(myItems));
            System.out.printf( "The sorted inventory list is: ");
            sortItemInfo(myItems);
            displayItems(myItems);
        static void displayItems(Iteminfo[] myItems)
            for(int i = 0; i < myItems.length; i++)
                System.out.printf("Item "+(i+1)+": \n\n");
                myItems.displayInfo();
    static double getInvTotal(Iteminfo[] myItems)
    double total = 0.0;
    // Do the same thing with the for-statement here as
    // well, and add everything to the variable total.
    return total;
    static void sortItemInfo(Iteminfo[] myItems)
    // your sort algorithm here
    Try to finish it.
    Good luck.

  • Newbie help needed

    I created a page header in Fireworks with linkis and
    rollovers in Fireworks to load using CSS into dreamweaver, but the
    links and rollovers disappear in DW. What the fah? This is the
    first time I've used Fireworks for this so forgive me if this seems
    like a complete idiot question because, in reality, it is.

    wistatboy wrote:
    > I created a page header in Fireworks with linkis and
    rollovers in Fireworks to
    > load using CSS into dreamweaver, but the links and
    rollovers disappear in DW.
    > What the fah? This is the first time I've used Fireworks
    for this so forgive me
    > if this seems like a complete idiot question because, in
    reality, it is.
    How did you export the document from Fireworks, and how did
    you import
    it into Dreamweaver?
    Linda Rathgeber ACE ::: PVII
    http://www.projectseven.com
    Fireworks Newsgroup:
    news://forums.projectseven.com/fireworks/
    CSS Newsgroup: news://forums.projectseven.com/css/
    Adobe Community Expert - Fireworks
    Design Aid Kits:
    http://www.webdevbiz.com/pwf/index.cfm

Maybe you are looking for

  • Diagnostic mode--battery or board?

    I have a first generation Nano with a short battery life. Is there a way of using the diagnostic mode to determine if it is due to a battery gone bad or if it is due to a hardware problem? What do the results mean in the power test?? The Nano seems t

  • Unable Import "WSDL URL" in Dasboard Business Object 4.1

    Dear Expert, I do Dashboard via Web service as a Query, version: 4.1 SP3,  but I import WSDL URL, error : " Microsoft Visual C++ Runtime Library" as image . Please, help you solve!

  • Crashed Thread:  0  Dispatch queue: com.apple.main-thread

    I keep getting this kind of crash since this morning everytime I open Safari browser and only when I surf FaceBook. Crashed Thread:  0  Dispatch queue: com.apple.main-thread Exception Type:  EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDR

  • Trouble backing up iPhoto 6.06

    I made a "smart album" of the year 2002. It has 1,509 photo's. I "select all" and dragged it to my portable hardrive attached. I am getting the following message: "The selected items cannot all be put into the same location, because at least one of t

  • How I can enable Java ssv helper plugin silently for win7 users with IE9

    here is what happens: when I deploy java 7.21 on win7 users, after deployment when users try to Open their IE they get a login screen and apparently it is related to Java ssv helper plugin. it is trying to enable it and needs admin account/password.