Improve scrolling in graphics

Here is some code
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class junk extends JFrame implements MouseMotionListener  {
  junkit ju = new junkit();
   public junk() {
    super();
    setSize(530,550);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container pane = getContentPane();
    FlowLayout flow = new FlowLayout();
    pane. addMouseMotionListener(this);
    pane.add(ju);   
    setVisible(true); 
   public void mouseMoved(MouseEvent me) {
     ju.runner = null;
     System.exit(0);
   public void mouseDragged(MouseEvent me) {}
   public static void main(String[] args) {
    junk test = new junk();
class junkit extends JPanel implements Runnable{
Thread runner,runner1;
   int y1 = 0;
  int x1 =  30;
  Image dear;
  public junkit() {
   Toolkit kit = Toolkit.getDefaultToolkit();
   dear = kit.getImage("dear.gif");
  runner = new Thread(this);
  runner.start();
public void paintComponent(Graphics g1) {
   Graphics2D d2 = (Graphics2D)g1;
  GradientPaint gg1 = new  GradientPaint(30,30,Color.blue,30,
                     300,
                  Color.white);
    d2.setPaint(gg1);
    d2.fillRect(0,0,530,550);
    d2.setPaint(Color.white);
    d2.fillArc(x1,y1,30,30,0,360);
    d2.drawImage(dear,100,300,200,200,this);
  public void run() {
  Thread thisthread = Thread.currentThread();
  while(runner == thisthread) {
    y1++;
    if(y1 > 400){y1=0;}
    repaint();
   try{ Thread.sleep(1); }
    catch(Exception ee) {ee.printStackTrace();}
}The problem is when it is scrolling down there is a pause for like a sec then it starts for alittle more the it pauses agian and so on. I dont know y this is doing this could you explain and tell me how I can inprove on this.Also I am on linux and I have tried diffrent things but it is still there.Thank you for any help you give

=========
question1
=========
hi,
I just tried your program, but everything seems to be working fine without any problem. But, one thing, as soon as the frame loads a small flicker takes place, this could be because as you are drawing an image on the frame, the frame takes a small amount of time for the image to be visible. Also, as the run() method uses repaint, the image might flicker every one or two seconds as you mentioned.
Regards,
Balaji.SN

Similar Messages

  • Bootcamp w. XP Pro SP2: Ultra-slow "sticky" scrolling and graphics performa

    Hi,
    unpacking my Uni-MBP 15" today was unfortunately sofar the best part of owning a new Mac:
    After installing and running Xp Pro Sp2 with Bootcamp, I'm quite disappointed:
    Scrolling pages as well as general graphics performance is - sofar- horrible.
    It also looks like there is no good driver easily available to correctly support the 2 graphics cards of the system - neither on the OSX DVD nor Apple support or Nvidia ( I tried all the downloads)
    XP advanced display settings tells me that it doesn't know what cards are installed (set to an unknown Plug and Play VGA adapter).
    I am sure there is somewhere a helpful post, but I couldn't find it - therefore:
    HELP! How do I get decent graphics performance in XP with my MBP???
    Thank you for your help!

    Hi,
    unpacking my Uni-MBP 15" today was unfortunately sofar the best part of owning a new Mac:
    After installing and running Xp Pro Sp2 with Bootcamp, I'm quite disappointed:
    Scrolling pages as well as general graphics performance is - sofar- horrible.
    It also looks like there is no good driver easily available to correctly support the 2 graphics cards of the system - neither on the OSX DVD nor Apple support or Nvidia ( I tried all the downloads)
    XP advanced display settings tells me that it doesn't know what cards are installed (set to an unknown Plug and Play VGA adapter).
    I am sure there is somewhere a helpful post, but I couldn't find it - therefore:
    HELP! How do I get decent graphics performance in XP with my MBP???
    Thank you for your help!

  • Scroll with graphics?

    Got a quick question, I’m making an end scroll for my film in Motion, and wanted to add the Kodak graphic and a few others down at the end. I’m using a “basic motion path” to do so, but have a heck of a time getting the graphic to sync up with the speed of the scrolling text. Is there any way to put the graphic “in” with the text, like a “text box” like in Word, or to group it so the graphics will just move off the same motion path?

    Nest the graphic and the text on a layer, then put a throw on that layer?
    Patrick

  • Scroll graphic files

    I am working on a product catalog, I would like to scroll the
    graphics
    files, vertically and there is more than one images in a row.
    I know how to scroll text using scrollbar UI COmponent, but
    does not
    know regarding how to scroll graphic files. If anyone knows
    please
    help.
    Thanks in advance
    Regards
    Muhammad ALi

    Hi there
    If you line the images up in flash in one key frame, then
    click on frame number 60 (or something depending on how fast you
    want to go) and Insert - Key Frame. Then in frame 60 move the
    images up the page. Select frames 1 - 60, right click, Motion
    Tween. Have a play with that...

  • [SOLVED] Fixing slow scrolling in firefox with nvidia and 64 bit

    I'm experiencing very slow scrolling with firefox on sites like
    http://www.roadrunnerrecords.com/blabbermouth.net/
    http://www.vai.com/News/index.html
    I'm running 64 bit with KDEmod. Scrolling is fine when I remove flash completely but on Ubuntu 10.04 (64 bit) the abnove sites scroll fine on a different machine (with intel graphics). I read somewhere by modifying xorg with "AccelMethod" "EXA" to "XXA" scrolling becomes very smoth onm ATI and Intel. Here is my xorg.conf:
    Section "ServerLayout"
            Identifier     "X.org Configured"
            Screen      0  "Screen0" 0 0
            InputDevice    "Mouse0" "CorePointer"
            InputDevice    "Keyboard0" "CoreKeyboard"
    EndSection
    Section "Files"
            ModulePath   "/usr/lib/xorg/modules"
            FontPath     "/usr/share/fonts/misc"
            FontPath     "/usr/share/fonts/100dpi:unscaled"
            FontPath     "/usr/share/fonts/75dpi:unscaled"
            FontPath     "/usr/share/fonts/TTF"
            FontPath     "/usr/share/fonts/Type1"
    EndSection
    Section "Module"
            Load  "glx"
            Load  "record"
            Load  "dbe"
            Load  "extmod"
    EndSection
    Section "InputDevice"
            Identifier  "Keyboard0"
            Driver      "kbd"
    EndSection
    Section "InputDevice"
            Identifier  "Mouse0"
            Driver      "mouse"
            Option      "Protocol" "auto"
            Option      "Device" "/dev/input/mice"
            Option      "ZAxisMapping" "4 5 6 7"
    EndSection
    Section "Monitor"
            Identifier   "Monitor0"
            VendorName   "Monitor Vendor"
            ModelName    "Monitor Model"
            HorizSync    28.0 - 72.0
            VertRefresh  43.0 - 60.0
    EndSection
    Section "Device"
            Identifier  "Card0"
            Driver      "nvidia"
            VendorName  "nVidia Corporation"
            BoardName   "G92 [GeForce 9800 GT]"
            Option      "RenderAccel" "true"
            Option      "NoLogo" "true"
            Option      "AGPFastWrite" "true"
            Option      "EnablePageFlip" "true"
            BusID       "PCI:1:0:0"
    EndSection
    Section "Screen"
            Identifier "Screen0"
            Device     "Card0"
            Monitor    "Monitor0"
            SubSection "Display"
                    Viewport   0 0
                    Depth     1
            EndSubSection
            SubSection "Display"
                    Viewport   0 0
                    Depth     4
            EndSubSection
            SubSection "Display"
                    Viewport   0 0
                    Depth     8
            EndSubSection
            SubSection "Display"
                    Viewport   0 0
                    Depth     15
            EndSubSection
            SubSection "Display"
                    Viewport   0 0
                    Depth     16
            EndSubSection
            SubSection "Display"
                    Viewport   0 0
                    Depth     24
                    Modes    "1680x1050"
            EndSubSection
    EndSection
    Section "Extensions"
            Option "Composite" "Enable"
            Option "RENDER" "Enable"
    EndSection
    is there something I can change to improve scrolling in firefox? I've tried to turnoff desktop effects and scrolling is the same annd also running firefox from a fresh profile. Hence, i suspect my nvidia 9800GT card to be the culprit. If anyone has a working xorg.conf with nvidia, 64 bit and smooth scrolling on the above mentioned sites please SHARE! Many Thanks!
    Last edited by fettouhi (2012-02-22 17:42:10)

    karol wrote:
    > Tried it now and that worked. Running without a xorg.conf buty now I can't turn on desktop effects in KDE. How do I set that up?
    Sorry, I don't use KDE, but it may be related to how do you start KDE: from xinit or via KDM or sth.
    > How do I determine what driver xorg is using now that I'm running without it xorg.conf?
    It's running the same driver as before.
    > Using the binary nvidia blob driver.
    Did you uninstall it? Did you install the nouveau driver? 'pacman -Qqs xf86-video' will tell you what drivers you have installed.
    No, I don't have the nouveau driver installed. I have to check if I have the nv driver installed but I didn't uninstall the nvidia driver. I'm starting KDE via xinit.

  • Is the 13inch MBP for $1199 practical for graphic design?

    Hi,
    I'm wondering if someone can please advise... my wife wants to get into graphic design, and I would like to get her a laptop for a gift... I use a macbook pro 2.53 but that's not in my budget...
    would the macbook pro for $1200 (13inch 2.26 2gb 160hd) be better than the macbook for 999?
    do you think those specs are sufficient for running PS, Ilustrator etc..?
    I'm looking for something she can use to learn graphic design on and actually do work... is 13in screen practical?
    Thanks

    Hi chaimdan,
    Photoshop is actually more dependent on the CPU /RAM/HD than on the Graphic processor, so the absence of the dedicated GPU won't hurt her with the base model MBP compared to your own. It will be a little slower with Photoshop than your own because of the ten percent or so difference in CPU speed, but not much.
    I'd be inclined to bump it up to 4 Gig of RAM though (i installed Corsair "MacRAM" in my own which was much cheaper than ordering the computer with the 4 Gig configuration). I found a substantial improvement with various graphics related apps after upgrading.
    To connect to a large monitor you will need an adaptor - either "MiniDisplay Port to DVI" or MiniDisplay Port to VGA", depending on the monitor . Almost all current flat screen monitors will support DVI, which is the way to go if you can.
    Personally I'd get the MBP rather than the MB because of the FW port. While USB is Ok for backing up, to avoid filling up her internal drive too much (Photoshop likes plenty of room to move for optimum performance) she is going to need to think about getting an external drive for storing images, or even for use as a "scratch drive" when using Photoshop, before too long. FW800 is vastly better for this sort of purpose.
    Cheers
    Rod

  • How to slow Motion Scroll Effects and anchors?

    I am using a down pointing arrow to cue the user to scroll down to the next section. I thought I could automate by linking the arrow to an anchor that is positioned down the page. Cool, it works. However, the jump is so fast that all the fancy Motion Scroll Effects I'm using on the next section are nearly invisible. I see that this site does what I want when you press the "Scroll Down" graphic: Digital Marketing Agency in Johannesburg, South Africa
    Is it possible to slow down the browser scroll when jumping to an anchor, using only Muse?
    Thanks,
    JohnS

    There's no way of controlling the speed of the scroll, other than the distance between your trigger and the anchor points. Since it uses an ease in control, the closer the anchor is to the trigger, the slower the scroll will be and likewise, the further away the anchor, the quicker it scrolls.

  • Cool Scrolling pic menu

    Hello, if anyone could point me in the right direction, I'd
    really appreciate it. I have a bit of code that scrolls a graphic
    depending on if your mouse is on the left or right of center of the
    graphic. I would like the scrolling to stop if the mouse is rolled
    off of the stage and if the graphic reaches its end. The code I
    have looks like so:
    _root.onEnterFrame = function(){
    bigrow_mc._x = bigrow_mc._x + (0.5 * Stage.width -
    _root._xmouse)/10;
    bigrow_mc is the name of my long, horizontal graphic that
    scrolls off the stage into oblivion. It goes forever. Really. The
    action works rather nicely, but how to get it to stop. I know I
    need an 'if' statement.... or a listener?
    var myListener:Object = new Object();
    myListener.onMouseOut = function() {
    stop();
    I know this is wrong, but I don't know where to go from here.
    I am new to Actionscript, but eager to learn. If there are any
    tutorials out ther that I could ber pointed to, I'd really
    appreciate it.

    My ultimate goal is to have a movie clip menu that scrolls
    when the mouse is over. I've seen it done a couple of times before,
    but never a complete tutorial...

  • Scrolling in iTunes

    Ever since the upgrade to iTunes 11.1 and OSX 10.9 I'm unable to scroll in iTunes under the iPhone selection screens for Music, Podcasts, etc.  For example, there are certain podcasts that I do not want to sync the entire library, just selected podcasts.  But I'm unable to scroll down to check and uncheck selected podcasts to sync.  Am I missing something?

    I don't know if this will work for you, but it's worth a try:
    Try reducing the size of the columns / number of columns on display (or increasing the size of the window itself?) so that the iTunes window does not have a horizontal scroll bar (i.e. only has a vertical scroll bar visible). This seems to improve scrolling speed for me.
    The only place i notice poor scrolling in iTunes is on the iMix front page in the store - that's really sluggish.

  • Smoother Scrolling with Firefox?

    I like to use the arrow keys to scroll, but scrolling is not smooth and fluid in Firefox as it is with Safari, with the cursor stopping at each line on a page. I have tried checking and unchecking the scrolling options within Firefox preferences to no avail. Any ideas?

    I can't recall the name at the moment, but there is an add-in on the FireFox add-in site that is supposed to improve scrolling.

  • Graphics breaking up randomly in Lion

    This problem has only appeared since I installed Lion.
    In Safari, and i thin Preview or iTunes as well, though I'm not sure, when scrolling, the graphics will sometimes spontaneously break up into small rectangles. If I stop scrolling, the image remains that way. If I continue scrolling, the problem often goes away.
    The image below does not quite do justice to the issue, but it may give you an idea. It's as though the image were made of two grids of suares, which were suddenly moved apart.
    This has only happened three or four times since I got Lion, but is very strange.
    Has anyone seen anything like this before?
    Is this a known issue with Lion?
    I'd appreciate any information.
    Cheer,
    Jellyfrank

    I am experiencing something simliar but not as severe. Anyone got explaination?
    I am using MBP Retina Display with OSX 1.8

  • Is a Video Card Much Better Than Sandy Bridge Integrated Graphics?

    Windows 7 Pro 64bit
    Does Photoshop benefit much from an Intel Sandy Bridge I2500K CPU computer having a video card?
    The Sandy Bridge CPU, of course, has greatly improved on-board graphics compared to prior incarnations of Intel's CPUs.
    If a video card is useful for PS, how powerful ought it be to achieve a good cost/benefit ratio, or which one is recommended? (the so-called sweet spot of price and performance)
    Does it matter whether it's an AMD or NVidia type?

    Do either of you two (Silent785 or Mylenium) have personal experience with a Sandy Bridge integrated GPU?  Just wondering.
    I have not evaluated a Sandy Bridge GPU myself.
    TomBrooklyn wrote:
    If a video card is useful for PS, how powerful ought it be to achieve a good cost/benefit ratio, or which one is recommended? (the so-called sweet spot of price and performance)
    Does it matter whether it's an AMD or NVidia type?
    I've found that you want a video card that scores at least 500 on this benchmark for best Photoshop performance, ideally 1000 or more:
    http://www.videocardbenchmark.net/
    The specific card I'd recommend right now today is a VisionTek ATI Radeon HD 6670 1 GB GDDR5, because it's a great compromise between quiet/low power operation and high rendering speed.
    As an OpenGL developer of 2D graphics software myself, I can tell you that in my experience ATI makes the best structured, most stable display drivers (and are least likely to break something with a new release), followed fairly closely by nVidia.  Intel has been a distant third, but one can imagine that if they're integrating GPUs on their processors now that they might better-fund a development team to make their OpenGL implementations more solid.
    -Noel

  • Team Calendar: Business graphic not showing the correct language

    Hello,
    We are using the Team Calendar application for two different languages: Spanish and catalan.
    When spanish locale ('ES') is set in the business graphic the weekly day short descriptions are correct shown in spanish "Lu", "Ma", "Mi",...
    Althought when catalan locale ('CA') is set, the business graphic shows the days in english not in catalan "Mon", "Tue", "Wed"...
    Did anyone has a similar problem?
    Any idea on how to improve the business graphic to accept more locales?
    Thanks,
    Gabriel.

    Hi,
    the Catalan locale will be added to the forthcoming IGS 7.00 patch, see note 1105634.
    If you use IGS 6.40 you have to install patch 20.
    Regards, Kai

  • Outlook 2007 - Blocked Images "Red X" for HTTPS Links

    Exchange 2007 SP1 / Outlook 2007 SP1 - One of my users receives their airline tickets via email from Delta.  The barcode image in the email is linked to a secure HTTPS site.  Outlook blocks this image but other ISPs (GMail, Charter WebMail, etc...) do not so its not a corrupt image; it has to be a security setting in Outlook.  I've already tried the methods below with no success.  Any ideas?
    1.  Tools, Trust Center, Automatic Download.  Uncheck "Don't download pictures autmatically...".
    2.  HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Security. It contains a key called "OutlookSecureTempFolder ".
    3.  Internet Explorer, Tools, Internet Options, Advanced Tab, Multimedia - Show Pictures

    I couldn’t view pix in Outlook 2007 emails I received. I got this solution from
    http://office-outlook.com/outlook-forum/index.php/m/291552/#msg_291552
     and it worked for me:
    “I had the same problem. Just empty white boxes where the images were supposed
    to be. But I found the answer to it on the net. It seems I selected an option
    and never bothered to read what it was for (silly me).
    It is the Show Picture Placeholders option.
    The description for it says "Display an empty box in place of each graphic
    in the document to improve scrolling performance"
    If you have the same problem, do the following:
    Create a New email, click the Office Button in the top left, choose the
    Editor Options button at the bottom right, select Advanced, scroll down to
    the "Display email content" section and make sure there is no tick next to
    the "Show Picture Placeholders" option.
    Try it. It worked for me right now :)
    dimarvalc”

  • Is it possible to use my ram as dedicated video ram on windows 8 bootcamp

    i have a mid 2014 MacBook pro
    8gb of ram
    dual core i5
    intel iris 5100 graphics
    im using my mac for gaming and need some dedicated video ram, I saw other computers like asus or Toshiba that were able to boot into windows bios and change there ram as dedicated ram, bootcamp has no bios so im wondering if there any third party applications of something built into bootcamp that would allow me to change a setting like that.
    thanks in advance

    From http://www.intel.com/support/graphics/sb/CS-033984.htm
    How is graphics memory allocated in Windows 8/8.1*?
    The Microsoft Windows 8/8.1 operating system adds improved support for graphics, simplifying graphics, memory configuration, and management. As part of this new graphics memory management, the Intel® HD Graphics Driver leaves more of the graphics memory sizing to Windows 8/8.1.
    W8+ report GPU memory differently as compared to OSX.
    This is from a 2012 Intel HD4K running W8.1 64-bit. Notice the value of Adapter RAM versus what is reported in Screen Resolution.

Maybe you are looking for

  • Airport extreme (n) scannen with hp psc1315

    hi i have a hp all in one psc 1315 i have connected him to the airport extreme (n) and print through the network but i can not use the scanner function. No i have read about the HP Wireless G 2101nw printer server that i can connect to the airport ex

  • Trying to install Reader 9.1 - error 1402

    So I'm trying to install Reader 9.1. I'm using Windows XP, Firefox 3.0.11. The installation gets to about 98%, and then I get an error message that says: Error 1402. Could not open key: HKEY\LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

  • Messages from call transaction don't appear

    Hello everyone, I'm having a problem that i never experienced. I have a call transaction for T-code 'FOB1', like this:   CALL TRANSACTION f_tcode USING bdc_tab MODE f_mode UPDATE 'S'                                        MESSAGES INTO messtab. I all

  • Need to add a TAB in the header line of PO

    Hi, Can someone suggest me where to add a screen tab in the header line of PO. Please help me with the exit name. Thanx. Kamlesh

  • XML queries (EXISTSNODE, CONTAINS) giving inconsitance results

    Hi, I am querying data from a table that has xmltype datatype and getting inconsistant results with two different approaches. I would like to have the top 500 records for a "REGION". My first query uses CONTAINS with "HASPTH" and the second query use