Random slowdown of BufferedImage painting.

Relying on another thread that dealed with painting background image in GUI using Borders, I wrote a custom Border that display an image in the background. This is quite smart and stylish, it works and looks beautifull, except that.....
I get sometimes a slowdown (on specific images) in painting. I mean : if I resize the window that contain the JPanel with my "ImageBorder", or if I hide then re-make visible this window, with a lot of images it is cool but with some specific images (always the same files) is take 100% CPU for 3 to 10s.
It is not size-dependant as I suspected, cause somme huge images repaint quick as some small ones repaint slow qith 100% CPU.
It is not type-dependant (TYPE_INT_XXX or TYPE_BYTE_YYY or other) as I thought... I believed first that images with Alpha-channel where slower but is it false : huges TYPE_CUSTOM png images with alpha channel repaint faster than a specific TYPE_3BYTE_BGR small jpeg image...
So is there a bug in J2SE 1.4 (I'm using Hotspot 1.4.1-b21, mixed mode) ?
Or is my code wrong ? Is it possible to predict wich images will slow down painting process ?
package jro.gui.border;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.geom.AffineTransform;
import java.awt.image.AffineTransformOp;
import java.awt.image.BufferedImage;
import java.awt.image.BufferedImageOp;
import javax.imageio.ImageIO;
import javax.swing.border.Border;
* A border with a background image for GUI enhancement...
* @author Kilwch
public class ImageBorder implements Border {
     private BufferedImage aImage;
     private ImageBorder(){
     public ImageBorder(BufferedImage backgroundImage){
          aImage=backgroundImage;
     /* (non-Javadoc)
      * @see javax.swing.border.Border#isBorderOpaque()
     public boolean isBorderOpaque() {
          //TODO : utiliser la transparence de l'image pour d�terminer si opaque ou non
          return true;
     /* (non-Javadoc)
      * @see javax.swing.border.Border#paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
     public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
          if(g instanceof Graphics2D){
               Graphics2D g2d=(Graphics2D)g;
               int w=aImage.getWidth(), h=aImage.getHeight();
               if(w!=width || h!=height){
                    BufferedImageOp op=new AffineTransformOp(AffineTransform.getScaleInstance(width/(double)aImage.getWidth(),height/(double)aImage.getHeight()),AffineTransformOp.TYPE_BILINEAR);
                    //TODO PROBLEM Draw with scale op is high-CPU consuming  ! Due to Alpha channel ? Problem occured with QNS only
                    g2d.drawImage(aImage, op, x, y);
               }else
                    g2d.drawImage(aImage, null, x, y);
     /* (non-Javadoc)
      * @see javax.swing.border.Border#getBorderInsets(java.awt.Component)
     public Insets getBorderInsets(Component c) {
          return new Insets(0,0,0,0);//Copie d�fensive, car Insets a des attributs publics ! grr...
     public static void main(String[] args) {
          if(args.length<1){
               System.err.println("Missing argument : image URL/path");
               System.exit(0x80010000);
          java.net.URL imageURL=ImageBorder.class.getClassLoader().getResource(args[0]);
          if(imageURL==null){
               System.err.println("Invalid image URL/path : "+args[0]);
               System.exit(0x80020000);
          BufferedImage img;
          try{
               img=ImageIO.read(imageURL);
               StringBuffer imgMsg=new StringBuffer(256);
               imgMsg.append("Image loaded: ").append(imageURL).append("\n * type = ");
               switch(img.getType()){
                    case BufferedImage.TYPE_3BYTE_BGR: imgMsg.append("TYPE_3BYTE_BGR"); break;
                    case BufferedImage.TYPE_4BYTE_ABGR: imgMsg.append("TYPE_4BYTE_ABGR"); break;
                    case BufferedImage.TYPE_4BYTE_ABGR_PRE: imgMsg.append("TYPE_4BYTE_ABGR_PRE"); break;
                    case BufferedImage.TYPE_BYTE_BINARY: imgMsg.append("TYPE_BYTE_BINARY"); break;
                    case BufferedImage.TYPE_BYTE_GRAY: imgMsg.append("TYPE_BYTE_GRAY"); break;
                    case BufferedImage.TYPE_BYTE_INDEXED: imgMsg.append("TYPE_BYTE_INDEXED"); break;
                    case BufferedImage.TYPE_CUSTOM: imgMsg.append("TYPE_CUSTOM"); break;
                    case BufferedImage.TYPE_INT_ARGB: imgMsg.append("TYPE_INT_ARGB"); break;
                    case BufferedImage.TYPE_INT_ARGB_PRE: imgMsg.append("TYPE_INT_ARGB_PRE"); break;
                    case BufferedImage.TYPE_INT_BGR: imgMsg.append("TYPE_INT_BGR"); break;
                    case BufferedImage.TYPE_INT_RGB: imgMsg.append("TYPE_INT_RGB"); break;
                    case BufferedImage.TYPE_USHORT_555_RGB: imgMsg.append("TYPE_USHORT_555_RGB"); break;
                    case BufferedImage.TYPE_USHORT_565_RGB: imgMsg.append("TYPE_USHORT_565_RGB"); break;
                    case BufferedImage.TYPE_USHORT_GRAY: imgMsg.append("TYPE_USHORT_GRAY"); break;
                    default: imgMsg.append("unknown");
               imgMsg.append(" (type ").append(img.getType()).append(")");
               imgMsg.append("\n * Dim = ").append(img.getWidth()).append("x").append(img.getHeight());
               System.out.println(imgMsg);
          }catch(java.io.IOException pIOEx){
               System.err.println(pIOEx);
               System.exit(0x80030000);
               img=null;//Yes, thats dead code !
          javax.swing.JFrame testFrame=new javax.swing.JFrame();
          testFrame.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
          testFrame.setTitle("Test frame for "+ImageBorder.class.getName());
          testFrame.setSize(img.getWidth(), img.getHeight());
          ((javax.swing.JPanel)testFrame.getContentPane()).setBorder(new ImageBorder(img));
          testFrame.getContentPane().setLayout(new BorderLayout());
          javax.swing.JLabel [] l={new javax.swing.JLabel(args[0]),new javax.swing.JLabel()};
          l[0].setForeground(new java.awt.Color(0x00,0x00,0x66,0xC0));
          l[0].setBackground(new java.awt.Color(0xFF,0xFF,0x99,0x30));
          l[0].setOpaque(true);
          testFrame.getContentPane().add(l[0], BorderLayout.NORTH);
          testFrame.getContentPane().add(l[1], BorderLayout.CENTER);
          testFrame.setVisible(true);
}

I've just tried out the VolatileImage. It is a partial workaround for my problem :
1) the very first paint of my VolatileImage (and next "first paint after contentLost") takes bloody ages, because I need to create a BufferedImage first (from an URL).
2)Then, each time I need to resize my VolatileImage (because I want it to fit the JFrame's content pane), I have to recreate it, so I re-use the BufferedImage that is the source data, and it re-takes bloody ages.
3) it is OK since the content of VolatileImage is not lost. So minimize/restore the parent JFrame does not slow down repaint anymore, hiding the parent JFrame with another window then putting it back to front does not slow repaint anymore.
4)Big Alpha problem : The volatile image is used to paint the borders of the content pane. Imagine now your content pane contains a yellow JLabel with 75% transparency : when another window passes over the JLabel, it look ugly (the window lets dirty marks). It seems that transparent components does not refresh with the underlying image like expected.
(Note that I know where the slowdown occurs in the paint method : it occurs during image resize (scaling with BufferedImageOp). But I repeat, only on specific images, regardless of their size&colordepth. As I always need a BufferedImage to "remember" the picture to paint on VolatileImage, the slowdown occurs less often, but still occurs)
Test it for the 4th problem (1st and 2nd come along with specifig images only), passing an image path as 1st arg (note the path is relative to current dir or any classpath dir as I'm using getRessource method):
package jro.gui.border;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.geom.AffineTransform;
import java.awt.image.AffineTransformOp;
import java.awt.image.BufferedImage;
import java.awt.image.BufferedImageOp;
import java.awt.image.VolatileImage;
import javax.imageio.ImageIO;
import javax.swing.border.Border;
* A border with a background image for GUI enhancement...
* @author rousseau_j
public class VolatileImageBorder implements Border {
     private VolatileImage aVImage;
     private BufferedImage aStaticImage;
     private VolatileImageBorder(){
     public VolatileImageBorder(BufferedImage backgroundImage){
          aStaticImage=backgroundImage;
     /* (non-Javadoc)
      * @see javax.swing.border.Border#isBorderOpaque()
     public boolean isBorderOpaque() {
          //TODO : utiliser la transparence de l'image pour d�terminer si opaque ou non
          return true;
     /* (non-Javadoc)
      * @see javax.swing.border.Border#paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)
     public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
          if((g instanceof Graphics2D)&& c!=null){
               Graphics2D g2d=(Graphics2D)g;
               if(aVImage==null){
                    aVImage=c.createVolatileImage(width, height);
               int w=aVImage.getWidth(), h=aVImage.getHeight();
               if(w!=width || h!=height){
                    aVImage=c.createVolatileImage(width, height);
               do{
                    int returnCode = aVImage.validate(c.getGraphicsConfiguration());
                    if (returnCode == VolatileImage.IMAGE_RESTORED) {
                         renderOffscreen(c, x, y, width, height);
                    } else if (returnCode == VolatileImage.IMAGE_INCOMPATIBLE) {
                         aVImage = c.createVolatileImage(width, height);
                         renderOffscreen(c, x, y, width, height);
                    g2d.drawImage(aVImage, 0, 0, c);
               }while(aVImage.contentsLost());
     private void renderOffscreen(Component c, int x, int y,int width,  int height){
          System.out.print("renderOffscreen{");//TEST
          do{
               System.out.print("do{...");//TEST
               if(aVImage.validate(c.getGraphicsConfiguration())==VolatileImage.IMAGE_INCOMPATIBLE){
                    aVImage=c.createVolatileImage(width, height);
               Graphics2D vImgG2d=aVImage.createGraphics();
               int w=aStaticImage.getWidth(), h=aStaticImage.getHeight();
               if(w!=width || h!=height){
                    //TODO : option pour une redim d�finitive si image trop grande
                    BufferedImageOp op=new AffineTransformOp(AffineTransform.getScaleInstance(width/(double)aStaticImage.getWidth(),height/(double)aStaticImage.getHeight()),AffineTransformOp.TYPE_BILINEAR);
                    //TODO PROBLEM Draw with scale op is high-CPU consuming  ! Due to Alpha channel ? Problem occured with QNS only
                    vImgG2d.drawImage(aStaticImage, op, x, y);
               }else
               vImgG2d.drawImage(aStaticImage, null, x, y);
               vImgG2d.dispose();
               System.out.print("...}while; ");//TEST
          }while(aVImage.contentsLost());
          System.out.println("}\n");//TEST
     /* (non-Javadoc)
      * @see javax.swing.border.Border#getBorderInsets(java.awt.Component)
     public Insets getBorderInsets(Component c) {
          return new Insets(0,0,0,0);//Copie d�fensive, car Insets a des attributs publics ! grr...
     public static void main(String[] args) {
          if(args.length<1){
               System.err.println("Missing argument : image URL/path");
               System.exit(0x80010000);
          java.net.URL imageURL=VolatileImageBorder.class.getClassLoader().getResource(args[0]);
          if(imageURL==null){
               System.err.println("Invalid image URL/path : "+args[0]);
               System.exit(0x80020000);
          BufferedImage img;
          try{
               img=ImageIO.read(imageURL);
               StringBuffer imgMsg=new StringBuffer(256);
               imgMsg.append("Image loaded: ").append(imageURL).append("\n * type = ");
               switch(img.getType()){
                    case BufferedImage.TYPE_3BYTE_BGR: imgMsg.append("TYPE_3BYTE_BGR"); break;
                    case BufferedImage.TYPE_4BYTE_ABGR: imgMsg.append("TYPE_4BYTE_ABGR"); break;
                    case BufferedImage.TYPE_4BYTE_ABGR_PRE: imgMsg.append("TYPE_4BYTE_ABGR_PRE"); break;
                    case BufferedImage.TYPE_BYTE_BINARY: imgMsg.append("TYPE_BYTE_BINARY"); break;
                    case BufferedImage.TYPE_BYTE_GRAY: imgMsg.append("TYPE_BYTE_GRAY"); break;
                    case BufferedImage.TYPE_BYTE_INDEXED: imgMsg.append("TYPE_BYTE_INDEXED"); break;
                    case BufferedImage.TYPE_CUSTOM: imgMsg.append("TYPE_CUSTOM"); break;
                    case BufferedImage.TYPE_INT_ARGB: imgMsg.append("TYPE_INT_ARGB"); break;
                    case BufferedImage.TYPE_INT_ARGB_PRE: imgMsg.append("TYPE_INT_ARGB_PRE"); break;
                    case BufferedImage.TYPE_INT_BGR: imgMsg.append("TYPE_INT_BGR"); break;
                    case BufferedImage.TYPE_INT_RGB: imgMsg.append("TYPE_INT_RGB"); break;
                    case BufferedImage.TYPE_USHORT_555_RGB: imgMsg.append("TYPE_USHORT_555_RGB"); break;
                    case BufferedImage.TYPE_USHORT_565_RGB: imgMsg.append("TYPE_USHORT_565_RGB"); break;
                    case BufferedImage.TYPE_USHORT_GRAY: imgMsg.append("TYPE_USHORT_GRAY"); break;
                    default: imgMsg.append("unknown");
               imgMsg.append(" (type ").append(img.getType()).append(")");
               imgMsg.append("\n * Dim = ").append(img.getWidth()).append("x").append(img.getHeight());
               System.out.println(imgMsg);
          }catch(java.io.IOException pIOEx){
               System.err.println(pIOEx);
               System.exit(0x80030000);
               img=null;//Yes, thats dead code !
          javax.swing.JFrame testFrame=new javax.swing.JFrame();
          testFrame.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
          testFrame.setTitle("Test frame for "+VolatileImageBorder.class.getName());
          testFrame.setSize(img.getWidth(), img.getHeight());
          ((javax.swing.JPanel)testFrame.getContentPane()).setBorder(new VolatileImageBorder(img));
          testFrame.getContentPane().setLayout(new BorderLayout());
          javax.swing.JLabel [] l={new javax.swing.JLabel(args[0]),new javax.swing.JLabel()};
          l[0].setForeground(new java.awt.Color(0x00,0x00,0x66,0xC0));
          l[0].setBackground(new java.awt.Color(0xFF,0xFF,0x99,0x30));
          l[0].setOpaque(true);
          testFrame.getContentPane().add(l[0], BorderLayout.NORTH);
          testFrame.getContentPane().add(l[1], BorderLayout.CENTER);
          testFrame.setVisible(true);
}

Similar Messages

  • Random slowdowns, Intensive activity returns speed

     Y430, Windows 7, VGA problem.
    My problem:
    My computer randomly slows down, not buy a lot, but animations, moving windows, scrolling just seem to glitch/lag a bit. If I pick a window and move it around quickly (gpu/cpu intensive act) then the glitch seems to wear off and everything is smooth for a few minutes. Games run fine, it just seems to do this when doing normal activitys (browsing the web...)
    My theory:
    I am on windows seven, no problems with drivers working and so on. But i think what's going on here is that my computer is switching from power saving gpu/ to the better one (nvidia). on my U330 i am able to switch to discrete graphics only, however I do not see this option in my Y430's BIOS.
    Has anyone had/has this problem?
    Is there a way to force only Discrete graphics instead of tthe power saving ones (outside of windows? - Bios)
    Thanks for the help

    Thanks Carolyn, but it's not the amount of chronological time, or processor time, that it takes a web page to load that I'm concerned about--it's the amount of processor time used by a web page AFTER it's loaded. Many web pages contain javascripts, Flash, etc. that do things that require processor time beyond just displaying a static image. With dozens (and especially more) web pages loaded into a browser, one can open Apple's "Activity Monitor" utility and see a lot of processor time is being eaten up by the browser. If one closes the busier browser windows, the browser's processor time drops dramatically.

  • Random hanging / slowdown problems for months [SOLVED]

    I have a relatively new computer -- not a clunker -- that has random slowdowns quite frequently. They will last anywhere from 10 seconds to 3+ minutes. It always starts in just one application, like firefox or pidgin, then it "spreads" to other ones. Often, I will type a "cd" or "ls" command in a terminal while the hangs are happening. They don't actually do anything until the hangup is over. This has happened on a regular basis for months.
    I've tried switching applications. It happens with nothing but XFCE and Firefox running, or XFCE and Starcraft. It first started under KDE. I've tried moving from firefox to chrome and back, switching terminal emulators, nothing. It also happens under Windows, however, so I believe it's a hardware problem.
    I have no idea what it is though! I've tried:
    Switching out my Nvidia 9200 GT with the 8200 on-board graphics
    A different network card from my on-board (wired)
    Different hard disks -- the Windows and Linux installs are on different disks (one is IDE, the other is SATA)
    Swapping out my 2GiB RAM stick with two other RAM sticks (512MiB each) in every slot
    This leaves only my PSU, CPU, and motherboard as possible culprits after help from the #archlinux channel in narrowing down the above. Where do I go from here? I haven't any idea how to check the health of my motherboard and CPU, but I see no extra slowdown when I run Folding at Home on one of my cores (it's a quad). Whenever I reboot to my BIOs and look at the voltages my PSU is putting out, everything seems to be okay.
    I've had the same hardware since last Christmas when I upgraded my video card. It worked fine somewhere in July, IIRC, when this all started. Can anyone offer any help? I haven't any idea what I should do next.
    Last edited by Nathan (2010-10-23 02:41:46)

    I've tried three different graphics cards. One is a new Nvidia 9200 GT, which I just got for Christmas. Another is the Nvidia 8200, which is an onboard chipset. The most recent, which is installed right now. is an Nvidia 8800 GTX. Although it seems to happen less with the GTX, it still happens somewhat frequently. It was worst with the onboard.
    I'm wondering if I should try stripping out my HDDs and installing on an old IDE disk I have just to be sure, even though SMART says both disks are fine.
    mprime has been running for 21 hours and no issues so far, although I do have a large box fan pointed at the open CPU case and a smaller one pointed straight at the CPU
    EDIT: Another thing I've been wondering if this would be at all possible caused by my router. My router is quite crappy -- an ancient Belkin running DD-WRT, but it barely has enough RAM to do that. Everything but the essentials is turned off. Do you think this could cause it? My dad's computer, attached to the same router, is also having problems, but that computer has had the same Windows XP install since about 2002, so it's not a great benchmark. Wondering if it's worth checking out though.
    The reason I say this is because I notice the hanging / slowdown mostly start in Firefox / Chrome / Pidgin when using the network then spread to other components. Also, I am connected to it via a *really* long (200ft I think) CAT5e cable. Could this be a problem? Should I try to throw in a wireless card and see what happens? I didn't have problems with it when we first installed it, but that was a while ago. Come to think of it, it may be about the time that the slowdown started. Could that be the culprit? I'll probably try a wireless card tomorrow and see what happens.
    Last edited by Nathan (2010-10-12 01:01:09)

  • Paint from a paint(Component) method? Is it possible?

    Hi all
    Here's my deal: I'd like to make a Paint (http://java.sun.com/javase/6/docs/api/java/awt/Paint.html) out of a component or even better, just something with a paint(Graphics) method. I looked into implementing my own Paint, but it looks very foreboding, esp the requirement to be able to get the Raster in the PaintContext object which I think I'd have to implement too.
    Any advice?

    Here's my attempt at it...
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Paint;
    import java.awt.PaintContext;
    import java.awt.Rectangle;
    import java.awt.RenderingHints;
    import java.awt.geom.AffineTransform;
    import java.awt.geom.Rectangle2D;
    import java.awt.image.BufferedImage;
    import java.awt.image.ColorModel;
    import java.awt.image.Raster;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import java.lang.reflect.Method;
    public class ImagePaint implements Paint {
        Object paintable;
        Method paintMethod;
        BufferedImage paint;
        public ImagePaint(Object paintable) {
            this.paintable = paintable;
            try{
                paintMethod =
                        paintable.getClass().getMethod("paint",Graphics.class);
            }catch(java.lang.NoSuchMethodException e) {
                throw new IllegalArgumentException("Paintable object does " +
                        "not have paint method!");
        public java.awt.PaintContext createContext(ColorModel cm,
                                                   Rectangle deviceBounds,
                                                   Rectangle2D userBounds,
                                                   AffineTransform xform,
                                                   RenderingHints hints) {
            /*the bounds being passed to this method is the bounding rectangle
             *of the shape being filled or drawn*/
           paint = new BufferedImage(deviceBounds.width,
                                     deviceBounds.height,
                                     BufferedImage.TYPE_3BYTE_BGR);
               /*note: if translucent/transparent colors are used in the
                *paintable object's "paint" method then the BufferedImage
                *type will need to be different*/
            Graphics2D g = paint.createGraphics();
                /*set the clip size so the paintable object knows the
                 *size of the image/shape they are dealing with*/
            g.setClip(0,0,paint.getWidth(),paint.getHeight());
            //call on the paintable object to ask how to fill in/draw the shape
            try {
                paintMethod.invoke(paintable, g);
            } catch (Exception e) {
                throw new RuntimeException(
                   "Could not invoke paint method on: " +
                        paintable.getClass(), e);
            return new ImagePaintContext(xform,
                                         (int) userBounds.getMinX(),
                                         (int) userBounds.getMinY());
        public int getTransparency() {
            /*Technically the transparency returned should be whatever colors are
             *used in the paintable object's "paint" method.  Since I'm just
             *drawing an opaque cross with this aplication, I'll return opaque.*/
            return java.awt.Transparency.OPAQUE;
        public class ImagePaintContext implements PaintContext {
            AffineTransform deviceToUser;
            /*the upper left x and y coordinate of the where the shape is (in
             *user space)*/
            int minX, minY;
            public ImagePaintContext(AffineTransform xform, int xCoor,
                                                            int yCoor){
                try{
                    deviceToUser = xform.createInverse();
                }catch(java.awt.geom.NoninvertibleTransformException e) {}
                minX = xCoor;
                minY = yCoor;
            public Raster getRaster(int x, int y, int w, int h) {
                /*find the point on the image that the device (x,y) coordinate
                 *refers to*/
                java.awt.geom.Point2D tmp =
                        new java.awt.geom.Point2D.Double(x,y);
                if(deviceToUser != null) {
                    deviceToUser.transform(tmp,tmp);
                }else{
                    tmp.setLocation(0,0);
                tmp.setLocation(tmp.getX()-minX,tmp.getY()-minY);
                /*return the important portion of the image/raster in the
                 * coordinate space of the device.*/
                return paint.getRaster().createChild((int) tmp.getX(),
                                                     (int) tmp.getY(),
                                                     w,h,x,y,null);
            public ColorModel getColorModel() {
                return paint.getColorModel();
            public void dispose() {
                paint = null;
        public static void main(String[] args) {
            /*as of java 1.6.10 d3d is enabled by default.  The fillRect
             * commands are significantly slower with d3d.  I think this is
             * a known bug.  Also, with d3d enabled I get all sort
             * weird painting artificats for this particular demonstration*/
            System.setProperty("sun.java2d.d3d","false");
            final ImagePaint paint = new ImagePaint(new Object() {
                public void paint(Graphics g) {
                    Rectangle r = g.getClipBounds();
                    g.setColor(Color.white);
                    g.fillRect(r.x,r.y,r.width,r.height);
                    //draw a red cross
                    g.setColor(Color.red);
                    g.fillRect(r.width/2-20,0,40,r.height);
                    g.fillRect(0,r.height/2-20,r.width,40);
                    g.dispose();
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JComponent p = new JComponent() {
                public void paintComponent(Graphics g) {
                    Graphics2D g2d = (Graphics2D) g;
                    g2d.setPaint(paint);
                    g2d.fillOval(getWidth()/3,getHeight()/3,
                                 getWidth()/3,getHeight()/3);
                    g2d.dispose();
            p.setPreferredSize(new Dimension(500,500));
            f.setContentPane(p);
            f.pack();
            f.setVisible(true);
    }I don't think the unresponsiveness from larger areas is necessarily due to your code. For all of my GUI applications, resizing an
    already large frame tends to be prety sucky while resizing an already small frame tends to be pretty smooth.

  • Randomly deleted drawings from bucket fill?

    Hey guys, been using Flash recently and getting the hang of it now, however a recurring problem keeps happening - much of the drawings I'm doing are 'wet art', i.e. not symbols, as that makes it easier for what I'm doing. Anyway, using the bucket fill, on random occasions an outline or object will fill with colour when it wasn't supposed to, usually because of a gap in the linework. However the issue is that undoing the action does not restore my drawings - they remain completely deleted despite me only bucket filling and then undoing the action. Random objects around the paint will be deleted as well. Obviously, this is beyond frustrating as it completely halts progress when I need to redraw an entire background because the program seems to be messing up.
    There is no error message or anything of the sort - an object just fills up with the paint bucket, and undoing the fill deletes the entire object instead of undoing just the fill.
    Does anyone know a solution?
    Technical information:
    Flash CC, latest update.
    Windows 7, latest update.
    Intel i7-4790K \ ASUS R9-290X \ 16GB RAM \ 1x 500GB HDD \ 1x 2TB HDD

    Can you please share a test file with reliable reproducible steps to investigate this issue?

  • Code not working, anyone know why?

    I'm making a simple pong game, and it's important to me that I use JAVA as efficient as possible (that is, use object orientated stuff, mostly). So, for drawing the ball and the players, I had thought up the following steps:
    - the applet has an array list that contains drawables*
    - if the ball and players need to be drawn, the applet uses a for-each loop, wich will call the draw(Graphics g) of all the drawables in the array list.
    * interface, guarantees that the method public void draw(Graphics g) is pressent.
    This is how I programmed it:
    http://willhostforfood.com/access.php?fileid=32821
    Only problem is, it doesn't work. The method paint() of the applet should result in "Hello World" being drawn on the screen (I know this seems like an eleborate method, but using seperate objects will help organise things once I have like, 20 - 30 balls on screen), but it doesn't.
    Does anyone know why it is not working?

    Here ya go, this is something I did quite a while ago, knock yourself out:
    package RandomColor;
    import java.awt.Canvas;
    import java.awt.Color;
    import java.awt.Cursor;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.image.BufferedImage;
    import java.awt.Image;
    import java.awt.image.MemoryImageSource;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseMotionListener;
    import java.awt.event.MouseWheelEvent;
    import java.awt.event.MouseWheelListener;
    import java.awt.Point;
    import java.awt.Toolkit;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import java.util.Random;
    public class RandomColor extends JFrame implements MouseListener, MouseMotionListener, MouseWheelListener{
      private BufferedImage myImage = null;
      private Canvas myCanvas = null;
      private Color bgColor = Color.BLACK;
      public RandomColor() throws java.lang.Exception {
        super();
        setUndecorated(true);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setBackground(bgColor);
        Dimension myDimension = Toolkit.getDefaultToolkit().getScreenSize();
        setSize(myDimension);
        setMinimumSize(myDimension);
        JPanel myJP = new JPanel();
        myJP.setBackground(bgColor);
        Dimension dImage = new Dimension(this.getAccessibleContext().getAccessibleComponent().getSize());
        myCanvas = new Canvas();
        myCanvas.addMouseListener(this);
        myCanvas.addMouseMotionListener(this);
        myCanvas.addMouseWheelListener(this);
        myCanvas.setSize(dImage.width, dImage.height);
        myJP.add(myCanvas);
        add(myJP);
    // start of code to hide the cursor   
        int[] pixels = new int[16 * 16];
        Image image = Toolkit.getDefaultToolkit().createImage(new MemoryImageSource(16, 16, pixels, 0, 16));
        Cursor transparentCursor = Toolkit.getDefaultToolkit().createCustomCursor(image, new Point(0, 0), "invisiblecursor");
        getContentPane().setCursor(transparentCursor);
    // end of code to hide cursor   
        pack();
        setVisible(true);
        Random myR = new Random();
        myImage = new BufferedImage((int) (dImage.getWidth()+0.99), (int) (dImage.getHeight()+0.99), BufferedImage.TYPE_INT_RGB);
        int i = myImage.getWidth();
        int j = myImage.getHeight();
        Ball[] myBall = {new Ball(), new Ball(), new Ball()};
        for (int k=0; k<myBall.length; k++){
          myBall[k].setBackGroundColor(Color.BLACK);
          myBall[k].setBounds(0, i, 0, j);
          myBall[k].setRandomColor(true);
          myBall[k].setLocation(myR.nextInt(i), myR.nextInt(j));
          myBall[k].setMoveRate(32, 32, 1, 1, true);
          myBall[k].setSize( 289, 167);
        Graphics g = myImage.getGraphics();
        while(true) {
          for (int k=0; k<myBall.length; k++){
            g.setColor(myBall[k].fgColor);
            g.fillOval(myBall[k].x, myBall[k].y, myBall[k].width, myBall[k].height);
          invalidate();
          paint(getGraphics());
          for (int k=0; k<myBall.length; k++){
            g.setColor(myBall[k].bgColor);
            g.fillOval(myBall[k].x, myBall[k].y, myBall[k].width, myBall[k].height);
            myBall[k].move();
      public void mouseClicked(MouseEvent e){
        exit();
      public void mouseDragged(MouseEvent e){
    //    exit();
      public void mouseEntered(MouseEvent e){
    //    exit();
      public void mouseExited(MouseEvent e){
    //    exit();
      public void mouseMoved(MouseEvent e){
    //    exit();
      public void mousePressed(MouseEvent e){
        exit();
      public void mouseReleased(MouseEvent e){
        exit();
      public void mouseWheelMoved(MouseWheelEvent e){
        exit();
      private void exit(){
        System.exit(0);
      public void paint(Graphics g){
        super.paint(g);
        myCanvas.getGraphics().drawImage(myImage, 0, 0, null);
      public static void main(String[] args) throws java.lang.Exception {
        new RandomColor();
        System.out.println("Done -- RandomColor");
    }Ball Class:
    package RandomColor;
    import java.awt.Color;
    import java.util.Random;
    public class Ball {
      private int iLeft      = 0;
      private int iRight     = 0;
      private int iTop       = 0;
      private int iBottom    = 0;
      private int moveX      = 1;
      private int moveY      = 1;
      private int xScale     = moveX;
      private int yScale     = moveY;
      private int xDirection = 1;
      private int yDirection = 1;
      private boolean moveRandom = false;
      private boolean colorRandom = false;
      private Random myRand = null;
      public Color fgColor = Color.BLACK;
      public Color bgColor = Color.BLACK;
      public int x = 0;
      public int y = 0; 
      public int width  = 1;
      public int height = 1;
      public Ball(){
        myRand = new Random();
        setRandomColor(colorRandom);
      public void move(){
        x = 5 + x + (xScale*xDirection);
        y = 5 + y + (yScale*yDirection);
        if(x<=iLeft){
          x = 0;
          if(moveRandom) xScale = myRand.nextInt(moveX);else xScale = moveX;
          xDirection *= (-1);
          if(colorRandom) setRandomColor(colorRandom);
        if(x>=iRight-width){
          x = iRight-width;
          if(moveRandom) xScale = myRand.nextInt(moveX);else xScale = moveX;
          xDirection *= (-1);
          if(colorRandom) setRandomColor(colorRandom);
        if(y<=iTop){
          y = 0;
          if(moveRandom) yScale = myRand.nextInt(moveY);else xScale = moveY;
          yDirection *= (-1);
          if(colorRandom) setRandomColor(colorRandom);
        if(y>=iBottom-height){
          y = iBottom-height;
          if(moveRandom) yScale = myRand.nextInt(moveY);else xScale = moveY;
          yDirection *= (-1);
          if(colorRandom) setRandomColor(colorRandom);
      public void setColor(Color c){
        fgColor = c;
      public void setBackGroundColor(Color c){
        bgColor = c;
      public void setBounds(int Left, int Right, int Top, int Bottom){
        iLeft   = Left;
        iRight  = Right;
        iTop    = Top;
        iBottom = Bottom;
      public void setLocation(int x, int y){
        this.x = x;
        this.y = y;
      public void setMoveRate(int xMove, int yMove, int xDir, int yDir, boolean randMove){
        moveX       = xMove;
        moveY       = yMove;
        moveRandom  = randMove;
        xDirection  = xDir;
        yDirection  = yDir;
      public void setRandomColor(boolean random){
        colorRandom = random;
        switch (myRand.nextInt(3)+1){
          case 1:  fgColor = Color.BLUE;
                   break;
          case 2:  fgColor = Color.GREEN;
                   break;
          case 3:  fgColor = Color.RED;
                   break;
          default: fgColor = Color.BLACK;
                   break;
      public void setSize(int width, int height){
        this.width  = width;
        this.height = height;
    }

  • Problems with CS4

    I am developing flash games as a career.  I tried using CS4 for the past few months and I am going crazy with all the problems I encounter once I push flash to the limit.
    The List of Problems
    Filters
    1) Filters cannot be applied to movieclips bigger than a certain dimension.  Flash will have an error message in the output box. (this occurred with a shape w:3000 X h:2000)
    2) The stage/working area and the test movie sometimes will fail to display any filters appiled to movieclip objects.
    3) The removal of the "directional dial" in some of the filters make it extremely slow to visually edit the filer e.g. Created a sun on the stage and I want an object to cast a shadow.  Apply the drop shadow filter but hard to determine the angle which the drop shadow is cast by just changing numbers
    4) Changing values of the filters like "angle", "blur" ...e.t.c using the slider cause a severe lag - resources monitor shows a sudden jump in cpu usage
    3D
    5) 3D transformation to a shape less than 10 pixels on the width or height distort the shape (blurs the image like as if a blur filtered is applied.
    6) When applying a 3D plane to a racing game(back view), "forward" movement makes the camera goes into the plane instead of along the plane
    7) It is impossible to create a animation of a moving 3D box without actionscript.  The 4 faces facing the top, bottom, right and left will move correctly,  But the face facing you will never move correctly.
    8) All 3D objects will adhere to one point.  Impossible to create 3d objects with multiple vanishing points.  Extreme difficult to syncronize multiple 3d objects movement.
    Symbols
    9) With multple instances of the same symbol on stage, editing filters or colour in the symbol will not reflect changes in other instances on the stage unless the editing involves a change in position.  After editing the symbol, move the shape using the mouse and undoing after that will enable the changes to be reflected on stage,  That is a waste of effort.
    Bitmap fill
    10) When the colour effect of a movieclip with a bitmap filled shape inside is changed, the change will undo it self when you zoon in to 800%.  After zooming out again, the change in colour effect is still not visible until flash is closed and reopened.  The change in colour effects now is visible.
    11) Bitmap fill to lines constantly gives the "red colour" whereby the bitmap fill has failed during compiling.  However, the stage do not reflect this and the lines still contain the bitmap fill.
    Publishing
    12) What looks good on stage looks bad when published. A shape that looks good on stage looks different when published.  This is especially true for shapes with very small dimensions.
    Tween
    13) The new tween increases filesize of of the .swf more compared to classic tween.  That is bad when size is an issue for downloading and claching webpages.
    14) The new structure of flash applies a tween to the object instead of timeline.  When tweening multiple objects, the filesize increases drastically when they are more objects (e.g. 16Kb to 170Kb)  This will not happen in previous vesions of Flash.
    15) Memory leak.  Everything you close and open flash, memory leak occurs.
    Performance
    16) unstable.  Flash CS4 has crashed around 60 times since I began using it.  Most crash occurs when I am touching the filters.  Some crashes occur when I "save and compact".  Others are random.
    17) The paint bucket icon.  Why reverse it for CS3 and CS4 while other tools remain a right hander tool?
    Overall
    Most of the problems I encountered seem to be derived from one main problem:  Bad memory resources management of Flash CS4.
    Anyone else have encountered problems not found in my list?

    Hi - What OS are you running? Is it Windows 7 64bit?
    Paul

  • My Computer has been freezing all of a sudden in the last week and i have to keep doing force shut downs!!!

    My dad usually helps me fix this stuff, well go figure he is on vacation and a day after he leaves, the computer starts giving me problems. im so angry with it right now i might throw it off my balcony...
    The loading icon randomly starts spinning sometimes and wont stop, requiring me to do force shut downs in order to make the computer usable again.  sometimes it does it right away, sometimes it does it after ive been using the computer for a bit... for a while i can switch windows until it completely freezes.  i cant click anything, cant force quit any programs or anything, and i the spinning beachball never goes away!  the computer isn't hot either when it crashes! SO FRUSTRATING! it was perfectly fine until the last week or so. im anything but a computer genious, but i ran the disc utility and it says the drives are fine.  things ive done in the last week.  done the updates that the app store was pestering me with, updated corel painter 12 with the most current patches because that started randomly crashing. well now painter works and its the computer crashing X.x
    I dont have extensions on my safari aside from adblock. and i only have 2 apps downloaded and corel painter is the only software on the mac side of the computer.  parallels has an adobe suite on it but Corel is the only thing that has gone through changes recently... 
    i dont know what to do... i need to work on projects and the computer keeps making me lose progress and keeps giving me frustration. please help if you can...
    I've never used the forums before so i don't know the right category, but if its wrong im sorry.  if you can just move it into the right one...

    Back up all data immediately, if you haven't already done it.
    If you have more than one user account, these instructions must be carried out as an 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. Click Utilities, then Console in the icon grid.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter "BOOT_TIME" (without the quotes) in the search box. Note the timestamps of those log messages, which refer to the times when the system was booted. Now clear the search box and scroll back in the log to the last boot time after  you had the problem. Select the messages logged before the boot, while the system was unresponsive or was failing to shut down. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V). Please include the BOOT_TIME message at the end of the log extract.
    If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    Still in Console, look under System Diagnostic Reports for crash or panic logs, and post the entire contents of the most recent one, if any. In the interest of privacy, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if present (it may not be.) Please don’t post shutdownStall, spin, or hang logs — they're very long and not helpful.

  • Upgrade results in diminished battery life

    you recently upgraded software on my phone and my wife's phone. Since that time the phone gets very hot and the battery life has been cut in half. I read your response to another unhappy user in which he was told to go to the Verizon store. I did that and was told that I could either upgrade my phone or try a hard reset which would wipe out my data and my apps. This is obviously a problem with the upgrade, since I am not the only one having this problem. I would expect a patch to be sent out immediately to fix the problem.

    Been suffering long enough after the KitKat upgrade.  Figured it was time to post.
    1).  Phone runs hot - my theory is that it's struggling to find/keep LTE and cycling too much on the network
    2).  Battery life is horrible now.  Used to end the day after normal use at 45% remaining, now recharging by mid-day
    3).  Text messages sometimes take up to 10 minutes to send
    4).  Random slowdowns - too many to really list, one app or another will freeze, not connect.  I realize this can be an app issue, but still - a real drag.
    Will not do a hard reset - I would rather pay out my contract and go to another carrier, seriously.  Battery usage shows that Android System is taking up most of the juice - 24% usually.  The phone worked great at one point, now it's junk.
    For real, do I have to go to a Windows phone?  Is that the life lesson here?

  • Is it really your video card that's the problem?.

    Bought a DC/2.3 G5 to run Aperture, upgraded to 1.1 and everything became slow, got a 7800GT, not a huge improvement. Upgraded to version 1.1.1 with some improvement, now at least it's usable.
    Got a new MBP 17in with 2Gb ram and a fast(7.2k) disk, split the 100Gb for bootcamp and installed Aperture 1.1.1 and restored my vault. It's slower than any other configuration I've had on the G5.
    20Gb library of all raw images 8-9Mb each in size. Go figure that. But I still want to use this application.

    The ram on both boxes is fine, 2.5Gb on the G5 and 2Gb on the MBP.
    The MBP came pre installed with 10.4.6 where as the G5 came with 10.4.4 which I upgraded to 10.4.6.
    The MBP has 2 partitions, 68Gb for OSX and 30Gb for the Bootcamp WinXP. There is almost 20Gb free on the OSX partition.
    I was working with a smallish project with about 150 Canon raws(8Mb each)the thumbnails had finished building 2-3 days ago. I did notice that all the Thumbnails inside stacks did not build so I opened all stacks and allowed Aperture to build the remaining Thumb's. But it's still slow at moving from one image to another using the keyboard to navigate.
    I rebuilt the Library using the option keys when starting aperture this time with all the stacks open, it rebuilt all the thumbs but the resulting overall speed is still the same.
    Perhaps I was expecting some overall improvement with the ATI X1600 graphics card on the newer Intel Dual cores but at this stage it's the same at best with the G5 and both the MBP and G5 suffer from random slowdowns & SBOD. The only improvment I have noticed is the adjustment sliders in the hud or inspectors move smother than before. Other than that, I come back to the point of my thread, with all the questions that have been asked and blame put on the lack of GPU, I'd suspect the issues run far deeper than your current graphics card.

  • Safari wont open Links since yesterdays Update

    Why won't Safari load Google or Facebook links since yesterdays update? It seems as if Safari can't convert the link provided by Google into the real URL of the site, the linked page just keeps blank and it stops loading after a few seconds.
    Also, I can search with google by typing my search in the search bar, but if i try to open google.com directly, it won't open.
    Furthermore, some pages (like this: http://epp.eurostat.ec.europa.eu/portal/page/portal/statistics/themes) most of the time don't open at all, but sometimes it shows up only as plain blue text without any graphics.
    I am running Safari 6.0.5 on OS X 10.8.4 on a Macbook Pro Retina 15''.
    I have already tried resetting Safari and its Preferences, but that didn't help.
    system.log says (when trying to open a link off facebook):
    Jun 22 14:39:30 Dennis-MacBook-Pro.local acwebsecagent[182]: SSLExt : Failed to get ScanSafe headers
    Jun 22 14:39:30 Dennis-MacBook-Pro.local acwebsecagent[182]: DownloadUpdatedConfig : Failed to download updated config. Host hostedconfig.scansafe.net. Code 0x80004005
    Jun 22 14:40:38 Dennis-MacBook-Pro.local WindowServer[97]: CGXRegisterWindowWithSystemStatusBar: window f already registered
    Jun 22 14:40:39 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : NULL license/public key provided
    Jun 22 14:40:39 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Auth key is not provided, bypassing towers. CMode : 2 TMode : 0
    Jun 22 14:40:39 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : NULL license/public key provided
    Jun 22 14:40:39 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Auth key is not provided, bypassing towers. CMode : 2 TMode : 0
    Jun 22 14:40:39 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : NULL license/public key provided
    Jun 22 14:40:39 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Auth key is not provided, bypassing towers. CMode : 2 TMode : 0
    Jun 22 14:40:39 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : NULL license/public key provided
    Jun 22 14:40:39 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Auth key is not provided, bypassing towers. CMode : 2 TMode : 0
    Jun 22 14:40:39 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : NULL license/public key provided
    Jun 22 14:40:39 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Auth key is not provided, bypassing towers. CMode : 2 TMode : 0
    Jun 22 14:40:39 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : NULL license/public key provided
    Jun 22 14:40:39 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Auth key is not provided, bypassing towers. CMode : 2 TMode : 0
    Jun 22 14:40:39 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : NULL license/public key provided
    Jun 22 14:40:39 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Auth key is not provided, bypassing towers. CMode : 2 TMode : 0
    Jun 22 14:40:40 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : NULL license/public key provided
    Jun 22 14:40:40 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Auth key is not provided, bypassing towers. CMode : 2 TMode : 0
    Jun 22 14:40:40 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : NULL license/public key provided
    Jun 22 14:40:40 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Auth key is not provided, bypassing towers. CMode : 2 TMode : 0
    Jun 22 14:40:40 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : NULL license/public key provided
    Jun 22 14:40:40 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Auth key is not provided, bypassing towers. CMode : 2 TMode : 0
    Jun 22 14:40:40 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Connectig to: 2a00:1450:4001:0801:0000:0000:0000:1001 (5000)
    Jun 22 14:40:40 Dennis-MacBook-Pro.local acwebsecagent[182]: Thread : Created new thread ID = 0x4b0660 CDnConnectionThread
    Jun 22 14:40:40 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : NULL license/public key provided
    Jun 22 14:40:40 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Auth key is not provided, bypassing towers. CMode : 2 TMode : 0
    Jun 22 14:40:44 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Failed to connect to 12.0.0.0:80. Code : 60
    Jun 22 14:40:44 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Caught exception. Code : 60
    Jun 22 14:40:44 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Failed to connect externally. Code : 60
    Jun 22 14:40:44 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Caught exception. Code : 60
    Jun 22 14:40:44 Dennis-MacBook-Pro.local acwebsecagent[182]: Thread : Created new thread ID = 0x136b090 CDnConnectionThread
    Jun 22 14:40:44 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : NULL license/public key provided
    Jun 22 14:40:44 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Auth key is not provided, bypassing towers. CMode : 2 TMode : 0
    Jun 22 14:40:48 Dennis-MacBook-Pro.local WindowServer[97]: CGXRegisterWindowWithSystemStatusBar: window f already registered
    Jun 22 14:40:50 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : NULL license/public key provided
    Jun 22 14:40:50 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Auth key is not provided, bypassing towers. CMode : 2 TMode : 0
    Jun 22 14:40:50 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Connectig to: 2a03:2880:0010:cf07:face:b00c:0000:0001 (5000)
    Jun 22 14:40:54 Dennis-MacBook-Pro.local WindowServer[97]: CGXRegisterWindowWithSystemStatusBar: window f already registered
    Jun 22 14:40:54 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Failed to connect to 12.0.0.0:80. Code : 60
    Jun 22 14:40:54 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Caught exception. Code : 60
    Jun 22 14:40:54 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Failed to connect externally. Code : 60
    Jun 22 14:40:54 Dennis-MacBook-Pro.local acwebsecagent[182]: Connection : Caught exception. Code : 60
    Jun 22 14:41:45 Dennis-MacBook-Pro.local WindowServer[97]: CGXRegisterWindowWithSystemStatusBar: window f already registered

    It seems that you have Cisco anyconnect, and the web filtering is causing problems.
    Random Slowdown of Browsers in OS X Mountain Lion

  • Bios "pcie 3 support" setting is not working?

    Hi All,
    When I dissable pcie 3 support in bios, it does not seem to turn it off.
    I just got this mobo (z77 mpower) with a 3770k and I am having issues with my two Gigabyte 670 in sli (they seems to run fine not in sli). These same cards were fine in my other computer which is a Z68 mobo and 2600k.
    I did some reading on a number of forums and there seems to be an issue with many of the Gigabyte 670 cards runing on pcie 3.0. A known fix is to turn off pcie 3.0 in the mobo bios and have them run in pcie 2.0. This sounds right since I was not having any issues on my z68/2600k pcie 2.0 setup. The crappy thing is if you have a mobo that does not have the option to turn of pcie 3 support in the bios... you are screwed and stuck with having ussues.
    So my problem is... when is dissable PCIe 3.0 support in the z77 mpower bios and in win7, it still shows that my cards are running in pcie 3.0, I have checked in two places both nvidia ctrl panel and also in gpuz and I continue to have the problems with the cards. When I go back into the bios to double check afterwards, it still shows as off.
    Has anyone dissabled the pcie 3 support in bios and can confirm that it does infact actually turns it off and makes the the slots pcie 2.0? Any help would be appreciated as I need to somehow make these cards run in pcie 2.0 and not 3.0
    Thanks,

    Quote from: flobelix on 24-February-13, 05:42:22
    What issues are you talking of?
    Issues I am having are only happening is sli. I know its not a PCIe slot on the mobo, I ran a single card in each slot without issues. I also know that these two same cards ran in sli for the past 8 months without any issues on my Z68 board, this only started when I put them into the Z77.
    Weird thing is, lets say I put card A in top slot and card B into the other slot.... I get random slowdowns , not only in games but also when browsing and even just looking at the desktop. The computer would freeze up (not freeze completely just everything would become bogged down for up to myb 10 seconds.. then gone for two or three then same freezing again again. Benchmarks like 3dmark11 results would be randowm, I ran 5 tests consecutively and they all ranged from 4000 - 14500 (14500 is what the system should be getting)
    Now if I switch the cards and put card B into slot A and card A in the other, those same slowdowns and freezes now become complete system lockups... bsod and or video driver crashes (nvidia kerner stops respondong)
    I know its not a driver, bio or software issues. I am having same symptoms under old and new bios on both mobo and vod cards. Also tryed many different versions of vod drivers. I have also dissabled on board sound, wifi and bluetooth to rule those out.
    Quote from: fulwider8 on 24-February-13, 07:31:54
    Not sure if this might be your issues...Would like to know some of your symptoms. But I have a post here on Ix boards. I was having a slight issue with my driver crashing, and not running great in SLI. Not a blue screen or anything like that. I really thought my video cards were defective. Come to find out. I had one stick of ram that was making all the issues happen. My symptoms.... Every-time I ran my cards in sli..it would cause a stop driver error in Nvidia control panel. If I ran the cards without sli or by themselves. no errors. One of the guys here suggested taking ram out and using only the second and 4th dimm. I took out 2 sticks of ram and it cleared right away. Found out that one of the sticks I took out was bad...Not bad enough to stop working..But just enough to cause these issues. Just a thought or a suggestion-check your ram? I would have never thought the ram was causing my problems..
    Not sure if I am speaking out of place..But I only own the z77a-gd65...I have owned other z77a boards too. I have only tried to disable the pci-e 3.0 on this board with no issues. Hope you figure it out. Would like to know what is causing your issues. I plan on purchasing this same board in the future.
    Thanks for the feedback fulwinder, I thought the same at first  and tryed another manufacturers ram and the results did not change:(

  • Could anyone explain THAT???

    Hi guys, well I was heaving a lot of trouble with my 13 macbook, after it went back from the tech support to fix the famous ramdon shut downs it started to have random slowdowns, I went to an age of exploring mainatence tools, I went trought wall of them, onyx, disk warrior, tech4, iDefrag, I reseted the pram the vram , and nothing. I did a clean reinstall of the system, updated, I got smcfancontrol to set my fans to max speed (it could be the hot weather making the processor slow by temperature) but nothhing could get me away from the rainbow beachdisk of death. But then I decided to try windows xp with bootcamp, and guess what?? Perfect smothness, even with hardcore cpu usage. Could anyone just give me an idea of what this could be?? By the way, last week my battery just died (another usual mac defect) and I had to call the stupid tech guys again that never help me and guess what, one month and apple dont even reply me. but ok, thats another thred, can anyone just wonder why macbook works fine with xp?

    these are very intense slowsdowns, that makes impossible to continue to work, it makes you stuck for minutes in each action you take. These slowdowns didnt exited when I bought the macbook, and now they appear even if I am just surfing the web with 1 windows in some simple sites.
    The only explanation I can imagine is some kind of conflict between the new logic board the tech guys instaled to fix the random shutdown, but some kind of issue somewhat related to the osx too, this is too wierd, apple is a big lie, there is a big worm inside this apple, this is pure marketing bulshit, I will never buy an apple produtc, and I know that a lot of people are having terrible experiences with all apple produtcs. They could have been something in the late 80 and begining of the 90, but now they are totaly crap, I wish I could just recive my money back. Apple is just a fancy toy for grown up kids, it is not a pro tool. it is a toy

  • Working on Project, all deleted, and can't undo

    Hello, all-
    I recently purchased Final Cut Pro X, and have been thoroughly enjoying it.  I haven't seen many of the previously mentioned bugs, save for random slowdowns, and it's been all-in-all a good experience.
    However, I was working on a project today, when suddenly everything in the timeline just... disappeared.
    I wondered if, maybe, it had accidentally been deleted; so I went to the "Undo" command, but it's greyed out.
    I've been working on this project for weeks now...
    Is there anything I can do, or is my project gone forever?

    We had the same experience.  The project was there, but FCPX crashed during an all night render, and when we came back the original media of the video were nowhere to be found, only an alias file for a video file that had been obliterated...  The trash was empty and the file was nowhere to be found.
    ALWAYS keep a backup of your media, but I;m still trying to figure out a way to backup the project everynight as well...

  • Draw with single mouse click, help me!!!!

    I am using this code - as you understood from it- to paint with the mouse click.
    please help me either by completing it or by telling me what to do.
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class Hello extends JFrame{
         Graphics g;
         ImageIcon icon = new ImageIcon("hello.gif");
         public Hello(){
              super("Hello");
              setSize(200, 200);
              addMouseListener(
                   new MouseAdapter(){
                        public void mouseClicked(MouseEvent e){
                             icon.paintIcon(Hello.this, g, e.getX(), e.getY());
                             g.fillRect(10, 40, 10, 80);
                             JOptionPane.showMessageDialog(Hello.this, e.getX() + ", " + e.getY());
                             //repaint();
         // i have tried to place this listener in the paint method, but no way out.
              setVisible(true);
         public void paint(final Graphics g){
              this.g = g;
              icon.paintIcon(this, g, 100, 50);
         public static void main(String[] args){
              new Hello();
    **

    You can't save a graphics object like that and then paint on it.
    What you need is to use a BufferedImage, paint on that, and then paint that to the screen.
    See my paintarea class. You are welcome to use + modify this class as well as take any code snippets to fit into whatever you have but please add a comment where ever you've incorporated stuff from my class
    PaintArea.java
    ===========
    * Created on Jun 15, 2005 by @author Tom Jacobs
    package tjacobs.ui;
    import java.awt.image.BufferedImage;
    import java.awt.*;
    import java.awt.event.*;
    import java.beans.PropertyChangeEvent;
    import java.beans.PropertyChangeListener;
    import javax.swing.ImageIcon;
    import javax.swing.JComboBox;
    import javax.swing.JComponent;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JToolBar;
    import javax.swing.SwingUtilities;
    import tjacobs.MathUtils;
    * PaintArea is a component that you can draw in similar to but
    * much simpler than the windows paint program.
    public class PaintArea extends JComponent {
         BufferedImage mImg; //= new BufferedImage();
         int mBrushSize = 1;
         private boolean mSizeChanged = false;
         private Color mColor1, mColor2;
         static class PaintIcon extends ImageIcon {
              int mSize;
              public PaintIcon(Image im, int size) {
                   super(im);
                   mSize = size;
         public PaintArea() {
              super();
              setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
              addComponentListener(new CListener());
              MListener ml = new MListener();
              addMouseListener(ml);
              addMouseMotionListener(ml);
              setBackground(Color.WHITE);
              setForeground(Color.BLACK);
         public void paintComponent(Graphics g) {
              if (mSizeChanged) {
                   handleResize();
              //g.drawImage(mImg, mImg.getWidth(), mImg.getHeight(), null);
              g.drawImage(mImg, 0, 0, null);
              //super.paintComponent(g);
              //System.out.println("Image = " + mImg);
              //System.out.println("Size: " + mImg.getWidth() + "," + mImg.getHeight());
         public void setBackground(Color c) {
              super.setBackground(c);
              if (mImg != null) {
                   Graphics g = mImg.getGraphics();
                   g.setColor(c);
                   g.fillRect(0, 0, mImg.getWidth(), mImg.getHeight());
                   g.dispose();
         public void setColor1(Color c) {
              mColor1 = c;
         public void setColor2(Color c) {
              mColor2 = c;
         public Color getColor1() {
              return mColor1;
         public Color getColor2() {
              return mColor2;
         class ToolBar extends JToolBar {
              ToolBar() {
                   final ColorButton fore = new ColorButton();
                   fore.setToolTipText("Foreground Color");
                   final ColorButton back = new ColorButton();
                   back.setToolTipText("Background Color");
                   JComboBox brushSize = new JComboBox();
                   //super.createImage(1, 1).;
                   FontMetrics fm = new FontMetrics(getFont()) {};
                   int ht = fm.getHeight();
                   int useheight = fm.getHeight() % 2 == 0 ? fm.getHeight() + 1 : fm.getHeight();
                   final BufferedImage im1 = new BufferedImage(useheight, useheight, BufferedImage.TYPE_INT_RGB);
                   Graphics g = im1.getGraphics();
                   g.setColor(Color.WHITE);
                   g.fillRect(0, 0, useheight, useheight);
                   g.setColor(Color.BLACK);
                   g.fillOval(useheight / 2, useheight / 2, 1, 1);
                   g.dispose();
                   //im1.setRGB(useheight / 2 + 1, useheight / 2 + 1, 0xFFFFFF);
                   final BufferedImage im2 = new BufferedImage(useheight, useheight, BufferedImage.TYPE_INT_RGB);
                   g = im2.getGraphics();
                   g.setColor(Color.WHITE);
                   g.fillRect(0, 0, useheight, useheight);
                   g.setColor(Color.BLACK);
                   g.fillOval(useheight / 2 - 1, useheight / 2 - 1, 3, 3);
                   g.dispose();
    //               im2.setRGB(useheight / 2 - 1, useheight / 2 - 1, 3, 3, new int[] {     0, 0xFFFFFF, 0,
    //                                                            0xFFFFFF, 0xFFFFFFF, 0xFFFFFF,
    //                                                            0, 0xFFFFFF, 0}, 0, 1);
                   final BufferedImage im3 = new BufferedImage(useheight, useheight, BufferedImage.TYPE_INT_RGB);
                   g = im3.getGraphics();
                   g.setColor(Color.WHITE);
                   g.fillRect(0, 0, useheight, useheight);
                   g.setColor(Color.BLACK);
                   g.fillOval(useheight / 2 - 2, useheight / 2 - 2, 5, 5);
                   g.dispose();
    //               im3.setRGB(useheight / 2 - 2, useheight / 2 - 2, 5, 5, new int[] {     0, 0, 0xFFFFFF, 0, 0, 
    //                                                            0, 0xFFFFFF, 0xFFFFFFF, 0xFFFFFF, 0,
    //                                                            0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF,
    //                                                            0, 0xFFFFFF, 0xFFFFFFF, 0xFFFFFF, 0,
    //                                                            0, 0, 0xFFFFFF, 0, 0}, 0, 1);
                   //JLabel l1 = new JLabel("1 pt", new ImageIcon(im1), JLabel.LEFT);
                   //JLabel l2 = new JLabel("3 pt", new ImageIcon(im2), JLabel.LEFT);
                   //JLabel l3 = new JLabel("5 pt", new ImageIcon(im3), JLabel.LEFT);
                   brushSize.addItem(new PaintIcon(im1, 1));
                   brushSize.addItem(new PaintIcon(im2, 3));
                   brushSize.addItem(new PaintIcon(im3, 5));
                   //brushSize.addItem("Other");
                   add(fore);
                   add(back);
                   add(brushSize);
                   PropertyChangeListener pl = new PropertyChangeListener() {
                        public void propertyChange(PropertyChangeEvent ev) {
                             Object src = ev.getSource();
                             if (src != fore && src != back) {
                                  return;
                             Color c = (Color) ev.getNewValue();
                             if (ev.getSource() == fore) {
                                  mColor1 = c;
                             else {
                                  mColor2 = c;
                   fore.addPropertyChangeListener("Color", pl);
                   back.addPropertyChangeListener("Color", pl);
                   fore.changeColor(Color.BLACK);
                   back.changeColor(Color.WHITE);
                   brushSize.addItemListener(new ItemListener() {
                        public void itemStateChanged(ItemEvent ev) {
                             System.out.println("ItemEvent");
                             if (ev.getID() == ItemEvent.DESELECTED) {
                                  return;
                             System.out.println("Selected");
                             Object o = ev.getItem();
                             mBrushSize = ((PaintIcon) o).mSize;
                   //Graphics g = im1.getGraphics();
                   //g.fillOval(0, 0, 1, 1);
                   //BufferedImage im1 = new BufferedImage();
                   //BufferedImage im1 = new BufferedImage();
         protected class MListener extends MouseAdapter implements MouseMotionListener {
              Point mLastPoint;
              public void mouseDragged(MouseEvent me) {
                   Graphics g = mImg.getGraphics();
                   if ((me.getModifiers() & InputEvent.BUTTON1_MASK) != 0) {
                        g.setColor(mColor1);
                   } else {
                        g.setColor(mColor2);
                   Point p = me.getPoint();
                   if (mLastPoint == null) {
                        g.fillOval(p.x - mBrushSize / 2, p.y - mBrushSize / 2, mBrushSize, mBrushSize);
                        //g.drawLine(p.x, p.y, p.x, p.y);
                   else {
                        g.drawLine(mLastPoint.x, mLastPoint.y, p.x, p.y);
                        //g.fillOval(p.x - mBrushSize / 2, p.y - mBrushSize / 2, mBrushSize, mBrushSize);
                        double angle = MathUtils.angle(mLastPoint, p);
                        if (angle < 0) {
                             angle += 2 * Math.PI;
                        double distance = MathUtils.distance(mLastPoint, p) * 1.5;
                        if (angle < Math.PI / 4 || angle > 7 * Math.PI / 4 || Math.abs(Math.PI - angle) < Math.PI / 4) {
                             for (int i = 0; i < mBrushSize / 2; i ++) {
                                  g.drawLine(mLastPoint.x, mLastPoint.y + i, p.x, p.y + i);
                                  g.drawLine(mLastPoint.x, mLastPoint.y - i, p.x, p.y - i);
    //                              System.out.println("y");
    //                              System.out.println("angle = " + angle / Math.PI * 180);
                        else {
                             for (int i = 0; i < mBrushSize / 2; i ++) {
                                  g.drawLine(mLastPoint.x + i, mLastPoint.y, p.x + i, p.y);
                                  g.drawLine(mLastPoint.x  - i, mLastPoint.y, p.x - i, p.y);
    //                              System.out.println("x");
    //                    System.out.println("new = " + PaintUtils.printPoint(p));
    //                    System.out.println("last = " + PaintUtils.printPoint(mLastPoint));
                        //System.out.println("distance = " + distance);
                        //Graphics2D g2 = (Graphics2D) g;
                        //g2.translate(mLastPoint.x + mBrushSize / 2, mLastPoint.y);
                        //g2.rotate(angle);
                        //g2.fillRect(0, 0, (int) Math.ceil(distance), mBrushSize);
                        //g2.rotate(-angle);
                        //g2.translate(-mLastPoint.x + mBrushSize / 2, -mLastPoint.y);
    //                    g.setColor(Color.RED);
    //                    g.drawRect(p.x, p.y, 1, 1);
                   mLastPoint = p;
                   g.dispose();
                   repaint();
              public void mouseMoved(MouseEvent me) {}
              public void mouseReleased(MouseEvent me) {
                   mLastPoint = null;
         private void handleResize() {
              Dimension size = getSize();
              mSizeChanged = false;
              if (mImg == null) {
                   mImg = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_RGB);
                   Graphics g = mImg.getGraphics();
                   g.setColor(getBackground());
                   g.fillRect(0, 0, mImg.getWidth(), mImg.getHeight());
                   g.dispose();
              else {
                   int newWidth = Math.max(mImg.getWidth(),getWidth());
                   int newHeight = Math.max(mImg.getHeight(),getHeight());
                   if (newHeight == mImg.getHeight() && newWidth == mImg.getWidth()) {
                        return;
                   BufferedImage bi2 = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_INT_RGB);
                   Graphics g = bi2.getGraphics();
                   g.setColor(getBackground());
                   g.fillRect(0, 0, bi2.getWidth(), bi2.getHeight());
                   g.drawImage(mImg, mImg.getWidth(), mImg.getHeight(), null);
                   g.dispose();
                   mImg = bi2;
         public JToolBar getToolBar() {
              if (mToolBar == null) {
                   mToolBar = new ToolBar();
              return mToolBar;
         private ToolBar mToolBar;
         public static void main (String args[]) {
              PaintArea pa = new PaintArea();
              JPanel parent = new JPanel();
              parent.setLayout(new BorderLayout());
              parent.add(pa, BorderLayout.CENTER);
              pa.setPreferredSize(new Dimension(150, 150));
              parent.add(pa.getToolBar(), BorderLayout.NORTH);
              WindowUtilities.visualize(parent);
         protected class CListener extends ComponentAdapter {
              public void componentResized(ComponentEvent ce) {
                   mSizeChanged = true;
    }

Maybe you are looking for

  • Move Assets from one device to another.

    I need to move all of the assets in "Library" to "Media". Is there a simple way to do this and have all of the meta data point to "Media" instead of "Library"?

  • {SOLVED}SAMBA/CUPS Printer gone on both Linux and Windows Computers

    Greetings all, Have found myself in a pickle that has got me scratching my head. For a while now, I have had a headless server set up with Arch Linux with SAMBA and CUPS installed.  All computers in the house have had the printer set as default and h

  • Error occurs during reseed - the EDB file is being used by another process

    Greetings, We were notified today that one of our databases in an Exchange 2013 cluster is currently in a failed state. We have three servers - two at the primary site and one in the DR site. The database has a mounted and healthy copy on its preferr

  • Unable to access any of the radio stations on iTunes

    I have iTunes 10 and am unable to access any of the radio stations. I keep getting error messages to try again later and check my Internet connection (it is working fine). Any help would be appreciated!

  • How to make more than one home tab?

    On all the windows based browsers, you can type all your home page addresses in or press set current and all the tabs open will now be your home pages. I got firefox for mac to open all my tabs, but I need to do the same for safari.