Clearing the screen I have just drawn a rectangle on top of?????

I have made a visual map of my local area, which will allow me to draw rectangles on top of using the paint button. How can i make the rectangle disappear after a certin time limit(e.g 20 seconds), or if the user clicks of the map. When the recatngle is made by the user it also takes in coordinates, i want these to be wiped out too. PLEASE HELP!!!!!!!!!!!!!!!! THANKS :)

Set the rectangle coordinates and width height and repaint.
int x1=0;
int y1=0;
int width=0;
int height=0;
repaint(x1, y1, width, height);

Similar Messages

  • I've just bought an iPad and there's a line that runs the whole length of the screen about an inch from the outside edge of the screen. Have I bought a faulty product?

    I've just bought an iPad and there's a line that runs the whole length of the screen about an inch from the outside edge of the screen. Have I bought a faulty product?

    Try reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • I have an Ipod Touch and i have had it for about 3 years now, the screen has smashed just now and i was wondering if anyone knew how much it will be to replace the screen? I cant afford to buy a new ipod so I just want to replace the screen?

    I have an Ipod Touch and i have had it for about 3 years now, the screen has smashed just now and i was wondering if anyone knew how much it will be to replace the screen? I cant afford to buy a new ipod so I just want to replace the screen? Can anyone help me?

    If your iPod Touch, iPhone, or iPad is Broken
    Apple does not fix iDevices. Instead, they exchange yours for a refurbished or new replacement depending upon the age of your device and refurbished inventories. On rare occasions when there are no longer refurbished units for your older model, they may replace it with the next newer model.
    ATTN: Beginning July 2013 Apple Stores are now equipped to do screen repairs/replacements in-house on iPhone 5s. In some cases while you wait. According to Apple this is the beginning of equipping Apple Stores with the resources needed to do most repairs for iPhones, iPads, and iPod Touches that would not require major replacements. Later in the year the services may be extended as Apple Stores become equipped and staffed with the proper repair expertise. So, if you need a screen repaired or a broken screen replaced or have your stuck Home button fixed, call your local Apple Store to see if they are now doing these in-house.
    You may take your device to an Apple retailer for help or you may call Customer Service and arrange to send your device to Apple:
    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support: Contacting Apple for support and service - this includes international calling numbers.
    iPod Service Support and Costs
    iPhone Service Support and Costs
    iPad Service Support and Costs
    There are third-party firms that do repairs on iDevices, and there are places where you can order parts to DIY if you feel up to the task:
    1. iResq or Google for others.
    2. Buy and replace screen yourself: iFixit

  • My screen saver has become to large for the screen. i have had this problem before and just reset the ipad. This time it hasnt worked

    i have a 3yr old ipad. it is ios8. the newest operating system. my problem is the screen saver will not downsize. it is to big for the screen. i have used my fingers to pinch the screen smaller but it douesnt work. in the past if i shut it off and press the bottom centre button it resets the ipad. that isnt working now.

    I just did that and everything looked ok.  I do notice however when I open up my calendar off to the left hand side where all the calendars are listed there is a triangle with a exclamation mark in the middle of it.  When I clicked on it a window, just like the one that has been popping up, opens and it gives the same message.  "server resoponded with an error" and it lists a various event and gives the choice to go offline, or revert to server.  I have to choose go offline in order to get the window to close.  Any idea what is happening?

  • Clearing the Screen in Xcode C

    Freinds:
    I am studying C using the Xcode standard application tool. Can someone list for me or e-mail me or pst here some code I can use to clear the screen in the simple "hello world!" application below?
    #include <stdio.h>
    int main (int argc, const char * argv[])
    printf("Hello, World!\n");
    return 0;
    Thanks in advance,
    Miguel Reznicek

    Basic C I/O is designed for a very basic command line. It won't do anything more than print. You could do something like:<pre>
    void clr()
    int i;
    for(i = 0; i < 100; ++i)
    printf("\n");
    }</pre>
    It isn't pretty, but it will always work.
    If you wanted to be a little more fancy and clever, you could access the terminal escape codes directly.<pre>
    void clr()
    printf("\033[2J");
    }</pre>
    The problem with this method is that it is dependent on your particular terminal. This example is supposed to work with an ANSI terminal. You may have to fiddle with it to get it to work. If you wanted to be really clever, you could find out what terminal you are using programatically, query the termcap database for the clr escape code, and print that. That's going to be pretty hard though.
    Another option would be to use the curses library. The best I can do for you here is to just post a link to the ncurses man page. Ncurses is a very powerful library and should do exactly what you need. It is essentially a library that does exactly what I mentioned before about querying the termcap database based on your particular terminal. I used an old MacOS version years ago. Once you figure out the basics, it is easy.

  • How do I clear the Screen Saver?

    How do I clear the Screen Saver from showing the photos on my phone?

    You must have set it to use your photo stream as the screensaver. You can go into settings - screensaver to change to a different source.

  • How i can clear the screen in JAVA?, in c++ is  command that called .......

    system("cls")
    but in JAVA??
    thx
    gicio1

    system("cls") is the silly way to do it. For a start, "cls" isn't on most computers, because most computers call it "clear". You could run this from Java using Runtime.exec("clear"), Runtime.exec("cls"), etc .. but the best way to clear the screen is still to print out N newlines, where N is the height of the screen.
    The only problem with this way is, you don't know the height of the screen. You could pass an environment variable in as a system property, from whatever launches your program, and if it's not there "assume" it's 200 or something. Then just build up a string with "\n\n\n\n\n\n\n\n"... and print it out. Blam, blank screen. :-)

  • Clearing the screen, and special characters

    First off, I want to be able to clear the screen between menu selections. I've been told it's hard, but I don't mind, and I DON'T want to just print a whole heap of lines...
    Second, How can I print special "High ASCII" characters, specifically the ones that are used in DOS borders around menus and windows. Unicode values from 2500 - 256C (Hex)
    Ta muchly,
    -Phil-

    It sounds like you want a CURSES library for java. This seems to be a rare thing since once people are willing to go to the effort of using curses, they just use AWT or Swing instead. But I've seen CURSES libraries out there. Try Google.
    If the DOS extended characters are really part of Unicode, then just print out the relevant characters. You can use Unicode escape sequences (\u0000) to do so. This assumes that the terminal can handle them, which it may not.
    You could just print out the terminal escape sequences to clear screen and position the cursor yourself, I suppose, but a CURSES library would probably be more portable.

  • Clearing the screen in dos?

    I am executing my programs in DOS and I was wondering if there was a way to clear the screen. I was hoping that this did not involve having JAVA execute DOS commands... But if that is the case, then how do you do that?
    Thanks

    By "the screen" I assume you mean the DOS box where you typed your "java ..." command? If so, the easiest way is to have your Java program execute System.out.println(""); 24 times in a row, or however many times it takes to make it blank. The next time the program writes output, though, it will be at the bottom of the screen. If you don't like that, are really anal, and have nothing better to do you can do some JNI (Java Native Interface aka C++) programming to fix that.

  • How to clear the screen in java?

    Hi,
    How to clear the screen in java without using any loops?
    Thanks

    Just paint with your background color to let the old paintings vanish.

  • I have just purchased a new desk top. Would like to get my itunes into my new computer. I have downloaded it into my new computer, but how do I get the tunes I have from my other computer into this itunes in my new computer? Thanks

    I have just purchased a new desk top. I would like to get my itunes into my new computer. I have downloaded the itunes program.  How do I transfer the tunes I have in my itunes account into this computer?  I know I have done it before, but can't seem to find how to do it.  Thanks.

    iTunes: How to move [or copy] your music to a new computer [or another drive] - http://support.apple.com/kb/HT4527
    Quick answer if you let iTunes manage your music:  Copy the entire iTunes folder (and in doing so all its subfolders and files) intact to the other drive.  Start iTunes with the option (shift on Windows) key held down and guide it to the new location of the library.

  • How to clear the screen in the command prompt?

    Hello Everyone,
    I was wondering how we can clear the screen in the command prompt in Java. I remember we can do this in C by writing system("cls");
    What is the best IDE for writing Java programs. Is the NetBeans IDE good? Thank you very much.

    I was wondering how we can clear the screen in the
    command prompt in Java. I remember we can do this in
    C by writing system("cls");I guess there's no Java way of doing that because it's a function of the shell you're calling. If you try to use Runtime.exec on cls, it starts yet another shell, clears that, and closes it again, so it has no effect on your output.
    You could try using the '\b' backspace character, if that helps.
    What is the best IDE for writing Java programs. Is
    the NetBeans IDE good? Thank you very much.By the way you're asking this question, the answer will be almost certainly "none". If you want to, you can search this board for the few million times this question was asked before, pick all IDEs suggested there and use the one you're most comfortable with.

  • Does anybody know how to Clear the screen in Java?

    Hi guys,In C we use System Clear.
    In java,which instructions shall i use in order to clear the screen?
    Thanks,in advance!

    Of course you shouldn't do so anyway...
    Terminal programs should coexist with all other terminal programs and not try to dominate the screen.
    They should never clear the screen as this would remove output from other programs running in the same terminal.

  • How do I clear the screen in console application?

    In C or C++ we can clear the screen by clrscr() function.
    How can I acheive something similiar to this in Java

    Hi,
    Take a look at the below link may help you
    http://www.codeguru.com/forum/archive/index.php/t-323058.html
    This forum is exclusively related to discussions about Sun java Studio Creator. Henceforth please post these threads to an appropriate forum.
    MJ

  • How do I clear the screen in text mode (cls)

    How do I clear the screen in text mode (cls)
    Thanks,

    Clearing of console is an OS specific command, so
    in case of Windows you should try:
    Runtime.getRuntime().exec("cls");Though it wouldn't help, because exec() will be done as a separate
    process... :)
    Paul

Maybe you are looking for