I have problem in repeint method please help me

my screen blinks badly when i use repaint method
if i use update it only updates the page not erase prevois
what i can do iam in very trouble please help me

my screen blinks badly when i use repaint method
if i use update it only updates the page not erase
prevois
what i can do iam in very trouble please help meAre there any lengthy calculations being done in the paint() function? This can delay the repaint() after the update() function clears the screen area and make flicer bad. Mover any code possible out of paint() and have it done before update() is called.

Similar Messages

  • I have problem in my project, please Help me, urgent

    have problem in my project.
    When i start using project, i recive a errore in flash player
    if it possible troubleshooted for me
    Problem file

    The problem is that you have left paper on the floor near the
    wastebasket.
    Please you have to do a little of the work yourself.
    First, post a topic that has a title regarding your problem.
    That way people who know about that problem will be more likely to
    take a look.
    Second, don't just say you have a problem and receive and
    error. Shay what kind of problem and tell us what the error says.
    Third. Most people won't download a file from any random
    stranger off the net. So don't expect that is going to explain it.
    Fourth, even if the file does explain it, why should a
    stranger have to do all the steps that you should have done?
    Fifth, do a little work yourself, what have you tried to fix
    it?
    Sixth. Just because it is urgent to you doesn't mean it is
    urgent to everybody else.
    So try some of these things and post back.

  • I have problem in my project please help me :(

    I create package called" v cam" that call inside movie clip that make " zoom in" and "move with the player in the stage" it work nice. but when the player collision with another enemy in the movie clip its call movie clip question that is in another scene and stop the "v cam but instead the "v cam" still working and "zoom in" the question movie clip.
    how can I make it stop if the collision happen and go to another scene that has the movie clip.......please help me

    you need to understand vcam to do that.  if you don't understand how it works, write to the author or post on a vcam forum.

  • I gt problem in createImage method, Please Help Me!

    This part of code is from Ticker.Class:
    public void createParams()
         {//tickerTape.x = 900;
              //tickerTape.y = 40;
              int width = getSize().width;
              //System.out.println("getSize().width "+getSize().width);
              int height = getSize().height;
              lastS.width = width;
              lastS.height = height;
              System.out.println("width"+width);
              //System.out.println("width: " + width + " height: " + height);
              tickerTape.createParamsgr();
              Font font = tickerTape.getDefaultFont();
              this.setFont(font);
              FontMetrics metrics = getFontMetrics(font);
              metrics = getFontMetrics(font);
              int k = getFontMetrics(font).getHeight();
              //tickerTape.cParams();
              //tickerTape.createParams1(lastS);
              //setSize(tickerTape.cParamsHeight(),tickerTape.cParamsWidth());
         //     messageY = tickerTape.cParamsY();
              messageX = width;
              messageY = (height - k >> 1) + metrics.getAscent();
                   image = createImage(getSize().width,getSize().height);
                   tickerTape.initImage(image);
                   //gr=image.getGraphics();
         public  void paint(Graphics g)
          update(g);
         public synchronized void update(Graphics g)
              //gr.clearRect(0, 0, d.getSize().width, d.getSize().height);
              //gr.setColor(bgCo);
              //gr.drawRect(0, 0, d.getSize().width - 1, d.getSize().height - 1);
              //gr.fillRect(0, 0, d.getSize().width, d.getSize().height);
              //g.drawImage(image, 0, 0, this);
              if (Ticker.LOADING_DATA) {
                   System.out.println("Refreshing data. Please wait....");
                   return;
              try {
                   if(image==null)
                   image = createImage(getSize().width, getSize().height);
                   tickerTape.initImage(image);
                   //if (tickerTape.cParamsHeight() != lastS.height|| tickerTape.cParamsWidth() != lastS.width)
                   if (getSize().height != lastS.height|| getSize().width != lastS.width)
                   createParams();
                   if (tickerTape.getDisplayItems().size() > 0) {
                        //System.out.print("lastS.width: " + lastS.width + " lastS.height: " + lastS.height + "\n");
                        tickerTape.setBackground(lastS,bgCo,messageX,messageY);
                        if (display_URL) {
                             int k = mouseX;
                              //System.out.println("k=" + k + " messageX=" + messageX);
                             if (k > messageX) {
                                  //System.out.println("(k > messageX) is true!!");
                                  //System.out.println("messageCount----> " + messageCount);
                                  messageCount = tickerTape.displayItemsCnt;
                                  k -= messageX;
                                  switch (this.mouseEvent) {
                                  case TickerTape.SCROLL_LEFT:
                                       break;
                                  case TickerTape.SCROLL_RIGHT:
                                       // for (int i1 = 0; i1 <= messageCount - 1; i1++)
                                       // i += ((Integer) msgsW.elementAt(i1)).intValue();
                                       // if (k >= i)
                                       // continue;
                                       // messageIndex = i1;
                                       // break;
                                       // break;
                                  if (this.mouseEvent == MOUSE_CLICK) {
                                       // showStatus((String)
                                       // msgsURL.elementAt(messageIndex));
                        //Font itemFont = null;
                        //FontMetrics fontMetrics = null;
                        //Color textColor = null;
                        //Vector msgs = tickerTape.getDisplayItems();
                                  switch (tickerTape.getScrollDirection()) {
                                  case TickerTape.SCROLL_LEFT:
                                       tickerTape.moveLeft(messageX,messageY);
                                       g.drawImage(image, 0, 0, this);
                                       break;
                                  case TickerTape.SCROLL_RIGHT:
                                       tickerTape.moveRight(messageX,messageY,ItemToDisplay);
                                       g.drawImage(image, 0, 0, this);
                                       break;
                                  case TickerTape.SCROLL_UP:
                                  case TickerTape.SCROLL_DOWN:
                                       tickerTape.moveDown(messageX,messageY);
                                       g.drawImage(image, 0, 0, this);
                                       //g.drawImage(image, 0, 0, this);
                                       break;
                   }     else {
                             image = createImage(getSize().width, getSize().height);
                             tickerTape.initImage(image);
                             //gr=image.getGraphics();
                             tickerTape.setBackground(lastS,bgCo,messageX,messageY);
                             g.drawImage(image, 0, 0, this);
              } catch (Exception e) {
                   e.printStackTrace();
         }This part of code from TickerTape.Class:
    public void createParamsgr(){
              if (gr != null)
                   gr.finalize();
              if (image != null)
                   image = null;
         public void initImage(Image image){
              gr = image.getGraphics();
         }This code already runable. But my question is Why when I decide to move the createImage method into the method of initImage in TickerTape.class, then it come out the error with nullpointer, why like that? is it im make any wrong thing? Or any solution for me to make it correct. Thanks and appreciate!

    hi, thanks for your reply.
    let me briefly explain to you,
    now, you try to look at the createParams() method and update(Graphics g) method int Ticker.class, inside there also got
    image = createImage(getSize().width, getSize().height);
    tickerTape.initImage(image);
    So, now I want to move the code:
    image = createImage(getSize().width, getSize().height);
    into the TickerTape.class but dont Why come out the error with:
    java.lang.NullPointerException
         at TickerTape.initImage(TickerTape.java:90)
         at Ticker.update(Ticker.java:503)
         at sun.awt.RepaintArea.updateComponent(RepaintArea.java:239)
         at sun.awt.RepaintArea.paint(RepaintArea.java:216)
         at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:254)
         at java.awt.Component.dispatchEventImpl(Component.java:4031)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    but it doesnt work!
    Is it I put wrong thing or I forgot to put any important code?

  • HT1725 When I try downloading apps on my I pad it says additional information required. It then asks me to answer these questions that I have selected as my security questions. The only problem is I have forgot my answers, APPLE PLEASE HELP ME!!! Thank yo

    When I try downloading apps from the app store it doesn't allow me until I have entered the security questions, the only problem is I have forgotten my answers. Please help me to find out how I can retrieve the answers back, thank you

    Check the AppleCare number for your country here:
    http://support.apple.com/kb/HE57
    Call them up, and let them know you would like to be transferred to the Account Security Team.

  • TS1538 I have tried everything but I can't connect my iphone to my laptop. It says that apple mobile device failed to be installed. I have read everything on the internet and did everything but still am facing the same problem. Can you please help me.

    I have tried everything but I can't connect my iphone to my laptop. It says that apple mobile device failed to be installed. I have read everything on the internet and did everything but still am facing the same problem. Can you please help me.

    Again without stating the trouble shooting steps you have taken, its hard to direct you with any information.
    Try a different port on the computer.
    Does the iphone beep when u plug it up. ?
    Plug iphone into computer and give it 3 to 4 minutes to see if it connects and is running slow.,
    Delete the apple mobile device from your computer.
    Upgrade itunes to newest version.
    Is you USB cord defective ?
    Any USB 3.0 on your system ? .
    Delete or Disable  any antivirus program on your computer ?
    I will tell u the problem is your computer not the phone.
    We could do this for hours.

  • HT1689 Can i use debit card as a payment method on app store..if not,what else?? in case i don''t have credit card...please help

    Can i use debit card as a payment method on app store..if not,what else?? in case i don''t have credit card...please help

    I don't think that debit cards are still accepted as a valid payment method - they are not listed on this page and there have been a number of posts recently about them being declined. You could try contacting iTunes support but I don't think that you will be able to use it : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page
    If you don't have a credit card then are iTunes gift cards available in your country ? They are not available in all countries and they are country-specific (they can only be used in their country of issue), so you won't be able to use those from another country.

  • I have installed the most recent version of Snow Leopard on my MAC, and I am trying to install Mountain Lion from the Apple Store.  It will not install, because it says I do not have 2GB of memory, even though I have over 200GB available.  Please help.

    I have installed the most recent version of Snow Leopard on my MAC, and I am trying to install Mountain Lion from the Apple Store.  It will not install, because it says I do not have 2GB of memory, even though I have over 200GB available.  Please help.

    Welcome to the Apple Support Communities
    One thing is the memory, and another thing is the hard disk space. You are telling me that you have 200 GB of free space on the hard disk, but the App Store is telling you that you have to install 2 GB of memory or more on your Mac if you want to upgrade to OS X Mountain Lion.
    First of all, open  > About this Mac > More Info, and copy "Model Identifier" here, so we can know what Mac you have got and how much memory you can install.
    We recommend to buy the memory in OWC or Crucial (Crucial is cheaper and offers the same compatibility warranty as OWC) because you won't probably have any problem with the memory you buy there

  • HT201363 Hello I forgot my Security question of my Apple ID ? I don't kow what should I do and how to solve this problem ? could you please help  ?

    Hello I forgot my Security question of my Apple ID ? I don't kow what should I do and how to solve this problem ? could you please help  ?

    You need to ask Apple to reset your security questions; ways of contacting them include phoning AppleCare and asking for the Account Security team, clicking here and picking a method for your country, and filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (104569)

  • Developer 6 Timer Problem... Please help

    Hi all,
    I have installed Developer 6(Oracle Product) on my system. I am facing a strange problem whenever I try to use Create_Timer built in. The cursor moves to starting of the Item being modified as soon as the space bar is pressed (timed for timer expiration). If I remove the Built-in the problem is resolved.
    Please help urgently.
    Regards
    Anand

    Upgrade to the latest patch and the problem shoudl go away - this issue was fixed I think in 6.0.8.13+
    You can also try setting Keey Cursor position to Yes on the item.

  • I made a card using the iPhoto and when I click to buy it, it says that I did not fill all the frames with pictures, even though I did and have checked multiple times. Please help, it's for Mother's Day.

    I made a card using the iPhoto and when I click to buy it, it says that I did not fill all the frames with pictures and that I need to in order to purchase it, even though I did and have checked multiple times. Please help, it's for Mother's Day.

    Before ordering your book preview it using this method - http://support.apple.com/kb/HT1040 - and save the resulting PDF for reference - the delivered book will match it.
    LN

  • No sound for incoming calls but it works using speaker and earpiece. I can't hear anything but the other party can hear me clearly. I was told it's hardware problem. Would anyone please help? Thanks

    No sound for incoming calls but it works using speaker and earpiece. I can't hear anything but the other party can hear me clearly. I was told it's hardware problem. Would anyone please help me? Thanks

    This is an annoying problem for many people. Most likely your dock connector (on the bottom where you plug in your phone) is dirty or screwed up and is probably just coincidence that it happened after you updated. Some people have had success cleaning the port with a dry clean tooth brush. There is a long discussion going on at the thread I linked below. Good luck...
    https://discussions.apple.com/thread/2475631

  • I need to by apps but it keeps asking for my security questions ;/ but  forgot the answers to my security questions and the security/rescue email too (i dont have USA number to call please help me and send my rest to my email

    I need to by apps but it keeps asking for my security questions ;/ but  forgot the answers to my security questions and the security/rescue email too (i dont have USA number to call please help me and send my rest to my email

    You need to ask Apple to reset your security questions. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to call, fill out and submit this form.
    (115668)

  • I haven't updated my iPod in forever so when the new update came out I tried to update it but it kept freezing my computer so I had to manually shut it off and restart it. I have windows btw. Someone please help me !!!!!!!!

    I haven't updated my iPod in forever so when the new update came out I tried to update it but it kept freezing my computer so I had to manually shut it off and restart it. I have windows btw. Someone please help me !!!!!!!!

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar

  • My ipad mini is not syncing music onto in, my ipad has been replaced to see whether the issue is to do with the ipad but its still not working. i have a a windows PC please help thanks

    my ipad mini is not syncing music onto in, my ipad has been replaced to see whether the issue is to do with the ipad but its still not working.
    ive tried everything and ive been to the store which was when i was given a new ipad mini. i have a a windows PC please help thanks

    Are you attempting to sync music from your iTunes Music Library on your PC?
    What options do you have set on the Music Tab for your iPad in iTunes?
    What happens when you sync?
    Any error messages?

Maybe you are looking for