Why Component.paint(Graphics) is too slow?

Works terrible slow by me :( Why could it be? I just call JDesktopPane.paint()
Thank you

Do you have tabbed Panes, JTables and JEditorPanes / JTextAreas on your Component?

Similar Messages

  • AWT/Swing difference Component.paint(Graphics g)

    In the following code, I try to paint some component into a VolatileImage, also tried with BufferedImage, and draw the Image on some other component. Anyways it works with java.awt.Panel doesn't with JPanel, does anyone have a clue why?
    Differences between Graphics and Graphics2D maybe?
    package sqltest;
    import java.awt.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class AWTVC extends java.awt.Panel {
        public AWTVC(Component c) {
            this.c = c;
            //initComponents();
            Thread t = new Thread(){
                public void run(){
                    try{
                    Thread.sleep(2000);
                    bu=createVolatileImage(500,500);
                    while(true){
                        AWTVC.this.c.paint(bu.createGraphics());
                        getComponent(0).paint(bu.createGraphics());
                        AWTVC.this.repaint();
                        Thread.sleep(80);
                    }catch(Exception e){
                        e.printStackTrace();
            t.start();
            initComponents();
        private void initComponents() {
            setLayout(new java.awt.BorderLayout());
            addComponentListener(new java.awt.event.ComponentAdapter() {
                public void componentResized(java.awt.event.ComponentEvent evt) {
                    formComponentResized(evt);
        private void formComponentResized(java.awt.event.ComponentEvent evt) {
            bu=createVolatileImage(getWidth(), getHeight());
        final Component c;
        VolatileImage bu=null;
        public void update(Graphics g){
            g.drawImage(bu,0,0,getWidth(),getHeight(),null);
    }Any help would be greatly appreciated!
    Cheers

    Well thanx alot,
    Well I just asked out of curiosity, it works perfectly with the LIGHTWEIGHT_RENDERER, I was just curious to know why AWT components won't draw into Graphics2D (That seemed to be the problem). Well It works now so it doesn't really matter. Well I think the HeavyWeight Renderer is hardware accelerated, maybe that's the reason. Also since I'm using jdk 1.5 do you think setting the -Dsun.java2d.opengl=true property will improve performance. I have cpu cycles to spare, so I can't see the difference ;-)

  • Why is the select Count too slow

    I am doing the following select count and calling it from my JSP to get the total number of records... why is it so slow...
    select count(*)
    from
    (select distinct o.receive_id, o.name, o.address
    from order o, item i
    where o.id = i.id
    and o.status = 2 and i.status = 0)

    If the data in the table that you are referring to in the query gets refreshed very often and your high water mark on your table not reset, then this query always runs longer. While deleting data in the table, use 'TRUNCATE' rather than 'DELETE' in your data queries. that would help reset the high water mark and your count() queries will run very very fast.

  • Why printing from MacBook is too slow?

    Hello friends,
    Does anyone know how to improve the printing from Macbook faster? I have had very bad experience until today about the printing on Macbook using PDF file, it takes more 30 min to print only a 23 K file. Please anyone suggests me to get rid this stupid thing. It annoys us so much. Thank you.

    Please describe the problem in as much relevant detail as possible. The better your description, the better the chance of a solution.
    For example, if the computer is slow, which specific actions are slow? Is it slow all the time, or only sometimes? When did it start to be slow? Did you change anything just before it started? Have you seen any alerts or error messages? Have you done anything to try to fix it? Most importantly, do you have a current backup of all data? If the answer to the last question is "no," back up now. Ask if you need guidance. Do nothing else until you have a backup.

  • Exporting is too slow - FCP 7

    Hi,
    Problem:
    I don't know why rendering and exporting are too slow, even when i woke up this morning and found my video exported it couldn't open.
    I'm trying to export a 10min footage.
    It tells me it needs 35 - 40 min to export and after 30min. the time remaining is still the same (30min).
    after a few hours of exporting, the video does not open/play.
    Technical Settings:
    I converted my footage to ProRess (HQ), the sequence settings are set to ProRess (HQ) too.
    the material in the sequence and the sequence settings are exactly the same.
    Additional Info.
    I tried exporting to my machine instead of a hard drive to check if the problem is from the hard drive, but still exporting at the same speed (too slow).
    I've been editing for 10yrs. and never faced this problem.
    my machine is an iMac. OS X, Version 10.6.8, Processor 2.66GHz i5, Memory 4GB 1067 MHz DDR3.
    Thanks,
    Omar

    And here are some other troubleshooting tips
    https://discussions.apple.com/docs/DOC-2591
    Are you running any other programs at the same time?  If so, quit them and see if that makes a difference.
    Also what are your sources?  Prores(HQ) may be way overkill. 

  • PL/SQL Loop is too slow??

    Hi all,
    I have a basic loop (LOOP..END LOOP) for reading a very large varchar2 variable. In this Loop i always read 1 caracter for header (size in bytes) and the amount of data. Why this loop processing is too slow??? Can i boost it with something?
    Thanx.

    Function to read data on a socket
    Always read 1 byte for length, and with this length,
    body of message.
    FUNCTION PEGA_MESG (io_Conex_Env IN OUT Utl_Tcp.connection)
    RETURN LONG RAW
    IS
    v_Buffer LONG RAW;
    v_Mesg LONG RAW;
    v_intResp INTEGER;
    v_intBytes INTEGER;
    v_qtde_bytes integer;
    BEGIN
    v_Mesg := NULL;
    LOOP
    v_intResp := utl_tcp.read_raw(io_Conex_Env, v_Buffer, 1);
    v_qtde_bytes := ascii(utl_raw.cast_to_varchar2(v_Buffer));
    v_intResp := utl_tcp.read_raw(io_Conex_Env, v_Mesg, v_qtde_bytes);
    EXIT WHEN v_Mesg is not null;
    END LOOP;
    RETURN(v_Mesg);
    END;
    This is a little peace of my prog. If i send a lot of data, my prog get too slow.
    loop
    v_Mesg := Pega_Mesg(io_conexao);
    if ( v_Mesg = utl_raw.cast_to_raw('sum')) then
    v_Mesg := Pega_Mesg(io_conexao);
    l_Dados.DELETE;
    while v_Mesg <> utl_raw.cast_to_raw('fimsum') loop
    for sumario in 1..4 loop -- Loop para quantidade de campos na tabela saida_sumario
    l_Dados(sumario) :=Long postings are being truncated to ~1 kB at this time.

  • Slow execution, flickering graphics, and too many threads, oh my!

    i wrote a little game called Aim, Fire! just to screw around.
    its immense complexity involves shooting little targets that fly across the screen.
    you can see it at http://www.brianmaissy.com/applets/aimfire
    i made a class representing a target that paints itself and is its own thread.
    its kinda nifty in a OOP sort of way: all i have to do is instantiate a target; and it takes care of the rest, notifying the driver program of anything important (like it getting shot)
    the problem, however, is the speed changes significantly depending on how many targets are active, and the graphics are very flickery.
    i think the problem may be that having multiple threads is slow.
    i also tried buffering my graphics but it didnt work very well.
    however that may just be because i did it wrong.
    in fact i probably did a lot of things wrong - please notify me of anything you see that i did badly
    so tell me what you think about the design of the program, and any suggestions you have to restructure it. would i do better just to stick everything in one thread, or even all in one class?
    thanks very much!
    here is the code: (also found at http://www.brianmaissy.com/applets/aimfire/aimFire/AimFire.java and http://www.brianmaissy.com/applets/aimfire/aimFire/Target.java)
    package aimFire;
    import java.applet.Applet;
    import java.awt.Color;
    import java.awt.Event;
    import java.awt.Graphics;
    import java.awt.Image;
    import java.awt.Point;
    import java.util.ArrayList;
    import java.util.Random;
    public class AimFire extends Applet{
         public static final int SPEED_CONSTANT = 500;
         public static final int MIN_X = 0;
         public static final int MIN_Y = 21;
         public static final int MAX_X = 399;
         public static final int MAX_Y = 399;
         Image ammoImage;
         private Random rand;
         private static final int CLIP = 10;
         private static final int TOTAL_TARGETS = 20;
         private int toBeAdded;
         private ArrayList<Target> targets;
         private int targetsKilled;
         private int ammo;
         private int score;
         private boolean gameActive;
         public void init(){
              setSize(400, 400);
              setBackground(Color.black);
            setCursor(getToolkit().createCustomCursor(getImage(this.getClass().getResource("crosshair.gif")), new Point(16, 16), "crosshair"));
            ammoImage = getImage(this.getClass().getResource("ammo.gif"));
            rand = new Random();
            ammo = CLIP;
            score = 0;
            gameActive = true;
            targetsKilled = 0;
            toBeAdded = TOTAL_TARGETS;
            targets = new ArrayList<Target>();
            sendRandom();
            sendRandom();
         public boolean mouseDown(Event e, int x, int y){
              if(gameActive && ammo > 0){
                   ammo--;
                   for(int count = 0; count < targets.size(); count++){
                        score += targets.get(count).hit(x, y);
                   repaint();
              return true;
         public boolean keyDown(Event e, int key){
              if((char)key == ' ' && gameActive){
                   ammo = CLIP;
                   repaint();
              return true;
         private void sendRandom(){
            toBeAdded--;
              Target t = new Target(this, getGraphics(), rand);
              targets.add(t);
            new Thread(t).start();
            repaint();
         public void notifyOfDeath(Target t){
              targetsKilled++;
              targets.remove(t);
              if(toBeAdded > 0){
                   sendRandom();
              if(targets.size()==0){
                   gameActive = false;
              repaint();
         public void paint(Graphics g){
              g.setColor(Color.gray);
            g.drawLine(0, 20, 399, 20);
              for(int count = 0; count < ammo; count++){
                   g.drawImage(ammoImage, count*10 + 3, 3, this);
              if(ammo == 0){
                   g.drawString("press space to reload", 3, 13);
            g.drawString("Targets: " + targetsKilled + "/" + TOTAL_TARGETS, 230, 13);
            g.drawString("Score: " + score, 340, 13);
              if(!gameActive){
                   g.setColor(Color.gray);
                   g.drawString("Game Over", 170, 200);
                   g.drawString("Score: " + score, 170, 230);
    package aimFire;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.util.Random;
    public class Target implements Runnable{
         private AimFire a;
         private Graphics g;
         private int radius;
         private int xLocation;
         private int yLocation;
         private int xDirection;
         private int yDirection;
         private int xSpeed;
         private int ySpeed;
         public Target(AimFire driver, Graphics graphics, Random rand){
              this(driver, graphics, 3*(rand.nextInt(9)+ 2), rand.nextInt(1 + AimFire.MAX_X - 60) + 30 + AimFire.MIN_X, rand.nextInt(1 + AimFire.MAX_Y - 60 - AimFire.MIN_Y) + 30 + AimFire.MIN_Y, rand.nextInt(3)-1, rand.nextInt(3)-1, rand.nextInt(5)+1, rand.nextInt(5)+1);
              if(xDirection == 0 && yDirection == 0){
                   if(rand.nextInt(2)==0){
                        if(rand.nextInt(2)==0){
                             xDirection = 1;
                        }else{
                             xDirection = -1;
                   }else{
                        if(rand.nextInt(2)==0){
                             yDirection = 1;
                        }else{
                             yDirection = -1;
         public Target(AimFire driver, Graphics graphics, int r, int x, int y, int xDir, int yDir, int xSp, int ySp){
              a = driver;
              g = graphics;
              radius = r;
              xLocation = x;
              yLocation = y;
              xDirection = xDir;
              yDirection = yDir;
              xSpeed = xSp;
              ySpeed = ySp;
         public void run() {
              if(g!=null){
                   paint();
                   int count = 1;
                   while(xLocation >= AimFire.MIN_X && xLocation <= AimFire.MAX_X && yLocation >= AimFire.MIN_Y && yLocation <= AimFire.MAX_Y){
                        unpaint();
                        if(count % (AimFire.SPEED_CONSTANT/xSpeed) == 0){
                             xLocation += xDirection;
                        if(count % (AimFire.SPEED_CONSTANT/ySpeed) == 0){
                             yLocation += yDirection;
                        paint();
                        count++;
                   unpaint();
                   a.notifyOfDeath(this);
         public int hit(int x, int y){
              if(Math.abs(x - xLocation) < radius/3 && Math.abs(y - yLocation) < radius/3){
                   xLocation = -99;
                   return 3;
              }else if(Math.abs(x - xLocation) < 2*radius/3 && Math.abs(y - yLocation) < 2*radius/3){
                   xLocation = -99;
                   return 2;
              }else if(Math.abs(x - xLocation) < radius && Math.abs(y - yLocation) < radius){
                   xLocation = -99;
                   return 1;
              }else{
                   return 0;
         private void paint(){
              g.setColor(Color.red);
              g.fillOval(xLocation-radius, yLocation-radius, 2*radius, 2*radius);
              g.setColor(Color.white);
              g.fillOval(xLocation-2*radius/3, yLocation-2*radius/3, 4*radius/3, 4*radius/3);
              g.setColor(Color.red);
              g.fillOval(xLocation-radius/3, yLocation-radius/3, 2*radius/3, 2*radius/3);
         private void unpaint(){
              g.setColor(Color.black);
              g.fillOval(xLocation-radius, yLocation-radius, 2*radius, 2*radius);
    }

    i wrote a little game called Aim, Fire! just to screw around.
    its immense complexity involves shooting little targets that fly across the screen.
    you can see it at http://www.brianmaissy.com/applets/aimfire
    i made a class representing a target that paints itself and is its own thread.
    its kinda nifty in a OOP sort of way: all i have to do is instantiate a target; and it takes care of the rest, notifying the driver program of anything important (like it getting shot)
    the problem, however, is the speed changes significantly depending on how many targets are active, and the graphics are very flickery.
    i think the problem may be that having multiple threads is slow.
    i also tried buffering my graphics but it didnt work very well.
    however that may just be because i did it wrong.
    in fact i probably did a lot of things wrong - please notify me of anything you see that i did badly
    so tell me what you think about the design of the program, and any suggestions you have to restructure it. would i do better just to stick everything in one thread, or even all in one class?
    thanks very much!
    here is the code: (also found at http://www.brianmaissy.com/applets/aimfire/aimFire/AimFire.java and http://www.brianmaissy.com/applets/aimfire/aimFire/Target.java)
    package aimFire;
    import java.applet.Applet;
    import java.awt.Color;
    import java.awt.Event;
    import java.awt.Graphics;
    import java.awt.Image;
    import java.awt.Point;
    import java.util.ArrayList;
    import java.util.Random;
    public class AimFire extends Applet{
         public static final int SPEED_CONSTANT = 500;
         public static final int MIN_X = 0;
         public static final int MIN_Y = 21;
         public static final int MAX_X = 399;
         public static final int MAX_Y = 399;
         Image ammoImage;
         private Random rand;
         private static final int CLIP = 10;
         private static final int TOTAL_TARGETS = 20;
         private int toBeAdded;
         private ArrayList<Target> targets;
         private int targetsKilled;
         private int ammo;
         private int score;
         private boolean gameActive;
         public void init(){
              setSize(400, 400);
              setBackground(Color.black);
            setCursor(getToolkit().createCustomCursor(getImage(this.getClass().getResource("crosshair.gif")), new Point(16, 16), "crosshair"));
            ammoImage = getImage(this.getClass().getResource("ammo.gif"));
            rand = new Random();
            ammo = CLIP;
            score = 0;
            gameActive = true;
            targetsKilled = 0;
            toBeAdded = TOTAL_TARGETS;
            targets = new ArrayList<Target>();
            sendRandom();
            sendRandom();
         public boolean mouseDown(Event e, int x, int y){
              if(gameActive && ammo > 0){
                   ammo--;
                   for(int count = 0; count < targets.size(); count++){
                        score += targets.get(count).hit(x, y);
                   repaint();
              return true;
         public boolean keyDown(Event e, int key){
              if((char)key == ' ' && gameActive){
                   ammo = CLIP;
                   repaint();
              return true;
         private void sendRandom(){
            toBeAdded--;
              Target t = new Target(this, getGraphics(), rand);
              targets.add(t);
            new Thread(t).start();
            repaint();
         public void notifyOfDeath(Target t){
              targetsKilled++;
              targets.remove(t);
              if(toBeAdded > 0){
                   sendRandom();
              if(targets.size()==0){
                   gameActive = false;
              repaint();
         public void paint(Graphics g){
              g.setColor(Color.gray);
            g.drawLine(0, 20, 399, 20);
              for(int count = 0; count < ammo; count++){
                   g.drawImage(ammoImage, count*10 + 3, 3, this);
              if(ammo == 0){
                   g.drawString("press space to reload", 3, 13);
            g.drawString("Targets: " + targetsKilled + "/" + TOTAL_TARGETS, 230, 13);
            g.drawString("Score: " + score, 340, 13);
              if(!gameActive){
                   g.setColor(Color.gray);
                   g.drawString("Game Over", 170, 200);
                   g.drawString("Score: " + score, 170, 230);
    package aimFire;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.util.Random;
    public class Target implements Runnable{
         private AimFire a;
         private Graphics g;
         private int radius;
         private int xLocation;
         private int yLocation;
         private int xDirection;
         private int yDirection;
         private int xSpeed;
         private int ySpeed;
         public Target(AimFire driver, Graphics graphics, Random rand){
              this(driver, graphics, 3*(rand.nextInt(9)+ 2), rand.nextInt(1 + AimFire.MAX_X - 60) + 30 + AimFire.MIN_X, rand.nextInt(1 + AimFire.MAX_Y - 60 - AimFire.MIN_Y) + 30 + AimFire.MIN_Y, rand.nextInt(3)-1, rand.nextInt(3)-1, rand.nextInt(5)+1, rand.nextInt(5)+1);
              if(xDirection == 0 && yDirection == 0){
                   if(rand.nextInt(2)==0){
                        if(rand.nextInt(2)==0){
                             xDirection = 1;
                        }else{
                             xDirection = -1;
                   }else{
                        if(rand.nextInt(2)==0){
                             yDirection = 1;
                        }else{
                             yDirection = -1;
         public Target(AimFire driver, Graphics graphics, int r, int x, int y, int xDir, int yDir, int xSp, int ySp){
              a = driver;
              g = graphics;
              radius = r;
              xLocation = x;
              yLocation = y;
              xDirection = xDir;
              yDirection = yDir;
              xSpeed = xSp;
              ySpeed = ySp;
         public void run() {
              if(g!=null){
                   paint();
                   int count = 1;
                   while(xLocation >= AimFire.MIN_X && xLocation <= AimFire.MAX_X && yLocation >= AimFire.MIN_Y && yLocation <= AimFire.MAX_Y){
                        unpaint();
                        if(count % (AimFire.SPEED_CONSTANT/xSpeed) == 0){
                             xLocation += xDirection;
                        if(count % (AimFire.SPEED_CONSTANT/ySpeed) == 0){
                             yLocation += yDirection;
                        paint();
                        count++;
                   unpaint();
                   a.notifyOfDeath(this);
         public int hit(int x, int y){
              if(Math.abs(x - xLocation) < radius/3 && Math.abs(y - yLocation) < radius/3){
                   xLocation = -99;
                   return 3;
              }else if(Math.abs(x - xLocation) < 2*radius/3 && Math.abs(y - yLocation) < 2*radius/3){
                   xLocation = -99;
                   return 2;
              }else if(Math.abs(x - xLocation) < radius && Math.abs(y - yLocation) < radius){
                   xLocation = -99;
                   return 1;
              }else{
                   return 0;
         private void paint(){
              g.setColor(Color.red);
              g.fillOval(xLocation-radius, yLocation-radius, 2*radius, 2*radius);
              g.setColor(Color.white);
              g.fillOval(xLocation-2*radius/3, yLocation-2*radius/3, 4*radius/3, 4*radius/3);
              g.setColor(Color.red);
              g.fillOval(xLocation-radius/3, yLocation-radius/3, 2*radius/3, 2*radius/3);
         private void unpaint(){
              g.setColor(Color.black);
              g.fillOval(xLocation-radius, yLocation-radius, 2*radius, 2*radius);
    }

  • Scrolling a custom Component (e.g. JPanel) with overridden paint(Graphic g)

    Hi.
    I&#8217;m creating an application for modelling advanced electrical systems in a house. Until now I have focused on the custom canvas using Java2D to draw my model. I can move the model components around, draw lines between them, and so on.
    But now I want to implement a JScrollPane to be able to scroll a large model. I&#8217;m currently using a custom JPanel with a complete override of the paint(Graphic g) method.
    Screen-shot of what I want to scroll:
    http://pchome.grm.hia.no/~aalbre99/ScreenShot.png
    Just adding my custom JPanel to a JScrollPane will obviously not work, since the paint(Graphic g) method for the JPanel would not be used any more, since the JScrollPane now has to analyze which components inside the container (JPanel) to paint.
    So my question is therefore: How do you scroll a custom Component (e.g. JPanel) where the paint(Graphic g) method is totally overridden.
    I believe the I have to paint on a JViewport instructing the JScrollPane my self, but how? Or is there another solution to the problem?
    Thanks in advance for any suggestions.
    Aleksander.

    I�m currently using a custom JPanel with a complete override of the paint(Graphic g) method. Althought this isn't your problem, you should be overriding the paintComponent(..) method, not the paint(..) method.
    But now I want to implement a JScrollPane to be able to scroll a large model.When you create a custom component to do custom painting then you are responsible for determining the preferredSize of the component. So, you need to override the getPreferredSize(...) method to return the preferredSize of your component. Then scrolling will happen automatically when the component is added to a scrollPane.

  • Why is the same wirelles connection too slow for an iphone4 when it is quite fast to an iphone5?

    Why is the same wirelles connection too slow for an iphone4 when it is quite fast to an iphone5?

    You really have a question for iPhone support here, so I suggest that you post in the appropriate support area:
    Using iPhone
    The experts over there will likely suggest that you use the Apple Troubleshooting Guide for iOS devices, so you might want to work your way through that before you post in the iPhone support area.
    http://support.apple.com/kb/TS1398

  • I have a 2011 Macbook Pro 15" Snow Leopard Quadcore icore 7 with 8Gb of RAM and Im a Webpage Graphic Designer but why is my Macbookpro is so slow!?

    I have a 2011 Macbook Pro 15" Snow Leopard Quadcore icore 7 with 8Gb of RAM and Im a Webpage Graphic Designer but why is my Macbookpro is so slow!?
    I'm opening like Skype, AIM, Chrome the Memory Hog, Adobe Photshop and Illustrator...  Its so slow! I tried Onyx, CleanMyMac, iFreeMemory or just purging  but still i still have to restart to get it back to normal after closing all the applications... im not really impressed with the memory swapping thing,Even though my inactive RAM is like 2GB its so SloW! Anyone knows how to fix this problem?

    It's hard to say why your machine is slow, but that machine with 8 GB of RAM should not be slow.  Could be any number of possible problems.  Try taking a look at the Mac OS X Speed FAQ.

  • Why my Mac Pro 2009 became too slow after updated Yosemite?

    Why my Mac Pro 2009 became too slow after updated Yosemite?

    When the slowness is especially bad, note the exact time: hour, minute, second.  
    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.
    Each message in the log begins with the date and time when it was entered. Scroll back to the time you noted above.
    Select the messages entered from then until the end of the episode, or until they start to repeat, whichever comes first.
    Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of it useless for solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

  • Why my Mac Pro hard drive noise and too slow?

    Why my Mac Pro hard drive noise and too slow? Totally 8 gb speed system but now very slow . Please give some suggestions

    Another thing you can do in Lion (and ML) is click on the "Info" button in Disk Utility to get the SMART status of the drive.It's more detailed now than it used to be and it might tell you if something is wrong.
    A lot can go wrong with a hard drive which is why I tend to point people to the downloads section of the following web site:
    http://scsc-online.com
    They have a free hard drive troublleshooting download book there. I reccommend people download that before asking questionis because there are tons of problems that can act like hard drive problems when there's nothing wrong with the system at all. For example, how full is the drive? How many applications are running? What's the status of Spotlight indexing? How many apps are you running? How much memory do you have?
    I could probably think up 20 or 30 more if needed.

  • Why paint(Graphics) is invoked?

    I see paint (Graphics g) method in many awt.* codes. In most cases the method is not explicitly called in, anyhow it invokes. In the code below - main() calls constructor Why_Paint() which has no reference to paint(Graphics g)?
    import java.awt.*;
    import java.awt.event.*;
    class Why_Paint extends Frame
         Why_Paint()
              setTitle("Why paint() is invoked? ");
              setSize(270, 160);
              setBackground(Color.cyan);
              addWindowListener(new WindowAdapter()
                   public void windowClosing(WindowEvent e)
                        System.exit(0);
              setVisible (true);
         public void paint (Graphics g)
             g.setColor(Color.pink);
              g.fillRect(45, 40, 180, 90);     
         public static void main (String args[])
              new Why_Paint();
    }

    Thanx for your response.
    Thus the automatic paint() method invocation is the cause of blinking screen in many java programs?
    I couldn't find any hints/tutorials of customizing automatic invocations (I guess many other methods are called automaticly - main() or init() for example) in my JavaDocs. Can anybody give me an idea of where to look for a link?

  • Why imovie too slow download on youtube ?

    why imovie too slow send download to youtube

    Bumping this topic again as it's still sort of bugging me, but the problem has been isolated to a few certain sites. On some i get the maximum speed and on others i get snailspeed. One of the slow ones unfortunately is basically anything that has to do with Apple....So all Quicktime movie trailers, iTunes stuff, movies etc are slow, except podcasts that are German. I'm downloading the 30 day trial of iWork and i'm getting whopping 19,2KB/s, when i should be getting about 1300KB/s. You can just imagine the frustration:/
    I'm just wondering am i alone on this or is anybody else excperienceing similar? And as usual, on windows i'm getting full speed all the time, anywhere, grrrr....!
    -CC

  • Why am I getting this error message, "Disk is too slow. (Prepare) (-10001)"

    Hello all!  I've been using GarageBand for a while now and I've accumulated quite a few files.  Along with all of my movies and iTunes library, my internal hard drive filled up rapidly and I didn't catch it.  I received a warning message on my screen one day saying that my hard drive was nearly full and I only had a few MB available.  I'm using a 150 GB Solid State Hard Disk on my 2009 MacBook Pro (2.6 GHz Intel Cre 2 Duo, 4 GB of RAM).  I remembered reading a while back that it's better to use an external hard drive for pretty much everything when using Garageband, so I bought one.  I now have a seagate 500 GB, 5400 rpm external (USB 2.0) and I moved ALL of my movies and music over to it.  I freed up around 60 GB of space on my internal hard drive in doing so. 
    So now that I've given you a little background, let me explain the issue I'm having.  Before I noticed that my hard drive was full, I started receiving this error message:
    Disk is too slow. (Prepare)
    (-10001)
    Upon receiving this message, I was unable to do pretty much anything in GarageBand.  I couldn't listen to tracks, export to iTunes, or do anything!  All I'm using GarageBand for is editing.  My band and I do all our recording (and mixing) offsite at a separate studio and i just deliver a 2 track stereo signal (L/R) to my MacBook.  From there, I just cut the individual tracks from a block of 30-45 minutes of recording because we just record our entire studio session and mix everything there.  I pretty much never have more than two tracks and a few effects going at the same time.
    After I realized that my disk was nearly full, I consulted my brother-in-law.  He's head of the IT Deartpment at a major hospital here in West L.A. and he told me that I may have created a problem with the cache by filling up my internal hard drive and that I may still have issues with performance even after I free up space.  He then told me that I may need to reboot my MacBook a few time to "free up the cache" (or something close to that, sorry guys I'm not that tech-savvy).  It seems he may have been right, as I'm still experiencing the same issue.  I rebooted around 10 times overall to no avail.  I'm still using my internal hard drive to store the files that I'm working on (temporarily) because USB 2.0 is way too slow for my liking, when using GarageBand.
    I've read quite a few articles on this offering solutions such as:
    1.  Do a complete Uninstall and Reinstall of GarageBand
    2.  Clone my hard drive to my external, format it, and reinstall everything back on it
    3.  Get a hard drive that supports Firewire 800 (The HDD I bought is USB 2.0, but it has two USB cables to increase speed, but I only have 1 port and I tried      a powered USB Hub, but this HDD won't work with it for some reason).
    4.  Use different editing software.
    5.  Take it to Apple!
    Will any of these things fix my problem?  Are some better than others?  Before I do anything, I wanted to ask this question on the furum to see if anybody had an easier (or cheaper!) solution.  Any suggestions, tips, or advice would be much appreciated, as my band is starting to get on my case about finishing our CD!  Thanks...  

    Have a look into the Preferences folder (YourUserFolder/Libraries/Preferences/) and trash all Logic preferences.
    You'll have to setup the program again.
    cheers
    rob

Maybe you are looking for

  • Why am I getting an URL error when iCal tries to access my google apps calendar?

    My previously synced and normal google calendar for work was syncing fine with OSX's native Calendar app. Then I updated to to Mavericks, now my Calendar app is showing a URL error when trying to access my work calendar. Our company uses a google app

  • Movie rental wont play

    I just rented two movies and they both finished down loading, i tried playing both of them and neither of them will. The screen just stays black and does nothing any ideas?

  • Configuration of redirects from Zend Framework

    Hi, I have to use a PHP project which are develop based on Zend Framework. I use SJWS 7u4 and have to implement mod_rewrite rules form Zend Framework (stndard rules). I have to make rewrite url from http://some-name/some-dir/some-dir2 into http://som

  • Why is importing MPEG 4 files into iMovie so slow

    I have just got my first Mac and very happy except that when I try to import video from my camera which records in MPEG 4 the time taken is 10 - 15 minutes for the smallest of clips. I tried importing 5 clips at once of about 10 mins total video and

  • 4400G OS to support wireless

    Hi Guys, Anyone know how to get wireless working on the 4400G? The only OS i can see on CCO is 5.03 which does not seem to have wireless as an option