Flickering Image update (only one Image drawn on Component), 10+ Duke Dolla

I've made an RBGFilter for Images and Combined it with a Thread
to make an Image fade from Color to Grayscale.
I use it together with an home made JComponent. It works, but the Image flickers.
I've tried longer sleep periods (I thougt that maybe the filter was to slow) but it still flickered when changing the Image. I tried dubbel buffering, but couldn't get it to change the Image. Anyway, I suppose double buffering wouldn't help much, while it's only one Image to be drawn and it covers the entire Component.
Does anyone have a clue about how to do?? You'll get plenty of Duke Dollars!
(in the fade class)
public void run()
try{
while( !Thread.interrupted() ){
Thread.sleep( 70 );
//Change colors:
Image tmpImage = Toolkit.getDefaultToolkit().createImage(
new FilteredImageSource( colorImage.getSource(), fadeFilter ) );
ImageComponent.setImage( tmpImage ); //Home made component
//test if fading is finished...
catch( InterruptedException ie ){}
(in the home made component)
public void setImage( Image theImage )
this.theImage = theImage;
repaint();
public void paintComponent( Graphics g )
g.drawImage( theImage, 0, 0, this );
}

I dont know much about java but i do know a bit about MFC and this reminds me of a similiar issue in mfc. So heres my bet:
Calls to repaint do call directly to paintComponent they first execute some code that paints the background of the component then calls the paintComponent routine. Typically the background is white and this results in flickering.
Thats just a hunch. Because its similiar to an issue that you get in MFC around animation with framework paint calls.
You can play the hunch by calling paintComponent directly and see if your flickering goes away. If it does find a way to use repaint without it repainting the background before it calls paintComponent (im sure theres a way or a similiar framework routine)
One last thing? is the custom componet that your working with swing based? Cause swing based components are supposed to double buffer by default.

Similar Messages

  • My iPhone show only one image Conect USB to iTunes (on PC).What i doing??

    My iPhone show only one image: Conect USB to iTunes (on PC), and I do not restart my iPhone.What i doing?

    Hello 2000Skyfall,
    It seems your device may be stuck in recovery mode. At this point your device may need to be restored. Have you created a backup at any point via iCloud or iTunes? The following article provides details on recovery mode:
    If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support
    Get more help
    Learn what to do if you don't see your device in iTunes for OS X, or in iTunes for Windows.
    If you put your device into recovery mode by mistake, restart it. Or you can wait 15 minutes and your device will exit recovery mode by itself.
    Thank you for contributing to Apple Support Communities.
    Cheers,
    Bobby_D

  • How to flag only ONE image when several selected in 'N' mode ?

    Hi,
    I want to compare several images in a same serie. I select. I press N key, then I select in strip bottom bar the group of picture.
    I want to put a flag (or star) to only the ONE I prefer, but all pics get the flags or star...
    I need to take out the reject by clicking each X of each pic to threw them away, and finally pick only the on I want...
    How to pick or star only ONE image on N mode (ENSEMBLE Mode in french LR)
    Manys tks
    Fred

    I can't reproduce your issue on Mac or Windows. Quite often when odd ball behaviour arises it's an indication that Lr preference file has become corrupt. Have you tried trashing your Lr preference file then relaunching the application? The name and location for the preference file described here Preference and other file locations in Lightroom 5

  • Print multiples of the same image on one paper. I tried to change the layout to 9 per page, but it's only showing up and printing one per page, though it is the size i would like. But only one image is showing up as opposed to 9

    I'm trying to print multiples of the same image on one paper. I tried to change the layout to 9 per page, but it's only showing up and printing one per page, though it is the size i would like. But only one image is showing up as opposed to 9. HELP!!Version 7.0 (826.4)
    I'm using Preview Version 7

    Hello @kgingeri1, 
    Welcome to the HP forums.
    If you have sent a test print via ePrint, and experience this issue, i would call the Cloud Services department.
    If ePrint works fine, it is definitely a Google Cloud Print issue.
    Also, when you print from your android device, are you using Google Cloud print or the HP ePrint app?
    Please call our Cloud Services at 855-785-2777.
    If you live outside the US/Canada Region, please click the link below to get the support number for your region. http://www8.hp.com/us/en/contact-hp/ww-phone-assist.html
    Hours:
    Mon-Fri. 8am - 11pm, Sat. 9am-8pm - EST
    Mon-Fri. 7am - 10pm, Sat. 8am-7pm - CST
    Mon-Fri. 6am - 9pm, Sat. 7am-6pm - MST
    Mon-Fri. 5am - 8pm, Sat. 6am-5pm - PST
    Aardvark1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!

  • Flagging only one image

    Hi. I am a longtime Lightroom user but trying to give Aperture a chance. I want to be able to select 4-5 images and view them as large as possible (I'm using "view multiple" under view cycles and then be able to tag or rate only the one image I've selected of this group. I can do this in Lightroom but Aperture sees that all these images are selected and therefore all get the rating/tag. But I've only selected them for the purposes of viewing them larger, not to give them the same metadata.
    Thanks
    Andy

    Hi Andy -- Welcome to our little sunny clearing in the orchard.
    Aperture is subtle and deft, but not at all obvious.
    There are at least two good ways to do what you want:
    • Turn on "Primary Only".  This will apply any changes you make to just the Primary Selection (indicated by the heavier border) and leave the other selected Images unaltered.
    • Use the controls on the Info tab of the Inspector.  These controls are always limited to the Primary Selection (just as the menu commands are usually applied to all selected Images).  If there is a control you want that does not show, select a Metadata View that includes it, or add it to the Metadata View that you want to use.  The same works for Adjustments as well.
    Somewhat more confusing for beginners (and a little different that what you asked for):
    • You can select a number of Images, show only one of the selection in the Viewer, and step through the _selected_ Images.  Set the Main Viewer to "Show One", and use "{apostrophe}" to step through the selected Images.

  • Access for update only one column in table?

    Hi all,
    My need is to grant access for update only one column c1 in table t1.
    I guess I should use view, could you please give me some example? Maybe other ideas?

    Hi,
    You can grant privileges on individual columns.
    GRANT   UPDATE (c1)
    ON      t1
    TO      grantee_name;Look up GRANT in the SQL language manual. Annoyingly, in recent editions of the manual, GRANT is not indexed, but it's in alphabetic order with all the other statements:
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_9013.htm#i2155015

  • LSMW to update only one field in materials

    Hello experts,
    My requirement is to update only one field 'HRKFT-Origin Group as Subdivision of Cost Element' in material using LSMW. I tried with Standard Batch/Direct Input -> Object - 0020, Method - 0000. But it was not successful as it gave me warning - 'The material cannot be maintained since no maintainable data transferred' at the end.
    Now I want to try this using BAPI method in LSMW. But it is showing me error - No target structures could be determined..
    Please guide me.
    Regards,
    Aparna Gaikwad

    Hi
    i tried the same and am able to do it using LSMW Batch i/p.  Object - 0020, Method - 0000.
    There in source fields define material, plant and origin grp. in structure relations map the below
    BGR00 Batch Input Structure for Session Data                       <<<< MBEW1 Material COsting
          Select Target Structure BGR00 .
        BMM00 Material Master: Transaction Data for Batch Input            <<<< MBEW1 Material COsting
              Select Target Structure BMM00 .
            BMMH1 Material Master: Transfer of Main Data                       <<<< MBEW1 Material COsting
    Next in field mapping map those 3 fields: material, plant and origin grp.
    while testing do one thing. first take the data and try the same using MM02 manually. if tht is working fine ( i mean if the material is having costing view and you are able to chnage the origin group). then test with the same material, plant and a different origin grp. It will work.

  • Grant to update only one row

    Hi all,
    I'm working with an 10.2.0.3 Oracle Enterprise version.
    I need to create a new user on my database with permission to update only one row on table.
    Have you notice if this is possible? In case, how is the grant to do this?
    Regards,
    dbajug

    Try this:
    SQL> create user usr1 identified by usr1;
    User created.
    SQL> create user usr2 identified by usr2;
    User created.
    SQL> grant connect, resource to usr1,usr2;
    Grant succeeded.
    SQL> conn usr1/usr1
    Connected.
    SQL> create table t (id number);
    Table created.
    SQL> insert into t values(1);
    1 row created.
    SQL> insert into t values(2);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> grant update on t to usr2;
    Grant succeeded.
    SQL> create or replace trigger trg_t
      2  before update on t
      3  for each row
      4  begin
      5  if :old.id>1 then
      6  raise_application_error(-22299,'You cant change the specific value ');
      7  end if;
      8  end;
      9  /
    Trigger created.
    SQL> update usr1.t set id=2 where id=1;
    1 row updated.
    SQL> update usr1.t set id=2 where id=2;
    update usr1.t set id=2 where id=2
    ERROR at line 1:
    ORA-21000: error number argument to raise_application_error of -22299 is out of
    range
    ORA-06512: at "USR1.TRG_T", line 3
    ORA-04088: error during execution of trigger 'USR1.TRG_T'
    SQL>

  • Why won't Painter erase a keyword on only ONE image at a time?

    This has been driving me crazy - I'd like to delete a keyword on select images. I have hundreds of keywords and many are nested, so sometimes I screw up and need to erase selectively. I thought this problem was a bug, but it has persisted into LR 2.4!
    In Grid mode, I select Painter, choose a keyword and search through images where the eraser icon shows. However, if I then click on that image, Lightroom sometimes erases that one image, but more commonly erases four or five at a time! (No, they aren't highlighted.)
    Any ideas? I'd sure appreciate them!
    Deb

    Thanks, Ian, but now I think it's a bug, not me. Occasionally, erasing with the Painter tool works fine, but more often it's truly a spray can out of control! I am using a tablet, not a mouse. Even if I highlight one image and then click quickly on the Painter, sometimes it will erase 3-6 additional images. I can't figure a rhyme or reason, except it seems more likely when I have hundreds of images showing.
    I had wondered if there was a way to set the Painter to only erase one image at a time. If I slide it over images (like spraying), it often is out of control.
    Thanks!

  • How to import RAW and JPEG, but see only one image?

    This is driving me crazy.
    I shoot sometimes RAW and sometimes JPEG on the same memory card. So some pictures have only a JPEG file, others (the ones I shot in RAW) have a RAW+JPEG pair (or at least, Aperture sees it that way when displaying the content of the memory card).
    What I want:
    - import only once
    - for JPEG files, JPEG is imported as master
    - for RAW files, RAW only is imported as master
    There seems to be no combination of the import settings that lets me do this?!?!?!?
    If, under the "RAW+JPEG Pairs" settings I select "RAW files only", all JPEG files DISAPPEAR from the import list. WHY? This setting should be for "RAW+JPEG Pairs" only, it should not affect images that only have a JPEG file. I want to import JPEG files as well, so I select "Both (RAW as master)". Now, in the imported project there are TWO images to deal with, which is not what I want.
    Even if I were to import twice, how can I exclude the duplicates?

    Please ignore my post. Aperture behaves correctly. I got confused because many pics look alike, but aren't really the same pic. Sorry for the confusion.

  • Two Swap Image Behaviors - Only One Swap Image Restore Works

    How come?
    I have a button image with a two swap image behaviors applied to it - a rollover for the OVER state and one behavior for a disjointed or "remote" rollover effect.
    Both rollover effects work fine, but the disjointed or remote rollover effect does not return the button to it's original state.  (I've determined this by removing the second or remote swap image behavior and testing it.)
    Why doesn't this work?
    All scripts are contained within the HTML page itself; no linked scripts are used.
    Thanks!

    Page code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>index</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script type="text/javascript">
    <!--
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>
    <style type="text/css">
    <!--
    body {
    background-image: url(images/screens_back.gif);
    -->
    </style></head>
    <body bgcolor="#FFFFFF" onLoad="MM_preloadImages('images/navigation_2_over-05.gif','images/navigation_2_over-06.g if','images/navigation_2_over-07.gif','images/navigation_over-08.gif','images/navigation_o ver-09.gif','images/navigation_over-10.gif','images/team.gif','images/forms.gif','images/e xport.gif','images/consulting.gif','images/programming.gif','images/contact.gif')">
    <table width="792" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
    <tr>
      <td width="792" height="126" colspan="2">
       <img id="index" src="images/index.gif" width="792" height="126" alt="" /></td>
    </tr>
    <tr>
      <td width="792" height="34" colspan="2">
    <table id="Table_01" width="792" height="34" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="34" height="34">
       <img src="images\navigation_2.gif" width="34" height="34" alt="" /></td>
      <td width="426" height="34">
       <img src="images\navigation_2-02.gif" width="426" height="34" alt="" /></td>
      <td width="105" height="34" id="title">
       <img src="images\blank.gif" alt="" name="blank" width="105" height="34" id="blank" /></td>
      <td width="5" height="34">
       <img src="images\navigation_2-04.gif" width="5" height="34" alt="" /></td>
      <td width="36" height="34">
       <img src="images\navigation_2-05.gif" alt="" width="36" height="34" id="Image1" onMouseOver="MM_swapImage('Image1','','images/navigation_2_over-05.gif',1);MM_swapImage(' blank','','images/team.gif',1)" onMouseOut="MM_swapImgRestore()" /></td>
      <td width="32" height="34">
       <img src="images\navigation_2-06.gif" alt="" width="32" height="34" id="Image2" onMouseOver="MM_swapImage('Image2','','images/navigation_2_over-06.gif',1);MM_swapImage(' blank','','images/forms.gif',1)" onMouseOut="MM_swapImgRestore()" /></td>
      <td width="31" height="34">
       <img src="images\navigation_2-07.gif" alt="" width="31" height="34" id="Image3" onMouseOver="MM_swapImage('Image3','','images/navigation_2_over-07.gif',1);MM_swapImage(' blank','','images/export.gif',1)" onMouseOut="MM_swapImgRestore()" /></td>
      <td width="33" height="34">
       <img src="images\navigation_2-08.gif" alt="" width="33" height="34" id="Image4" onMouseOver="MM_swapImage('Image4','','images/navigation_over-08.gif',1);MM_swapImage('bl ank','','images/consulting.gif',1)" onMouseOut="MM_swapImgRestore()" /></td>
      <td width="31" height="34">
       <img src="images\navigation_2-09.gif" alt="" width="31" height="34" id="Image5" onMouseOver="MM_swapImage('Image5','','images/navigation_over-09.gif',1);MM_swapImage('bl ank','','images/programming.gif',1)" onMouseOut="MM_swapImgRestore()" /></td>
      <td width="42" height="34">
       <img src="images\navigation_2-10.gif" alt="" width="42" height="34" id="Image6" onMouseOver="MM_swapImage('Image6','','images/navigation_over-10.gif',1);MM_swapImage('bl ank','','images/contact.gif',1)" onMouseOut="MM_swapImgRestore()" /></td>
      <td width="17" height="34">
       <img src="images\navigation_2-11.gif" width="17" height="34" alt="" /></td>
    </tr>
    </table>
    td>
    </tr>
    <tr>
      <td width="410" height="352">
       <img id="index003" src="images/index-03.gif" width="410" height="352" alt="" /></td>
      <td width="382" height="352">
       <img id="index004" src="images/index-04.gif" width="382" height="352" alt="" /></td>
    </tr>
    <tr>
      <td width="792" height="29" colspan="2">
       <img id="index005" src="images/index-05.gif" width="792" height="29" alt="" /></td>
    </tr>
    </table>
    </body>
    </html>
    I can't publish the page and images until later tonight.
    Thanks, as always.

  • Image update - overwrighting master image - help

    Dear All again,
    This seems to be a problem day for me but I am hope some of you more professional developers can help me some more.
    I have created an insert form where it also updates a 2 other tables. One table is for a image. This is all no automatically with a image named nologo.gif already stored on the server.
    Then there is an update page where people can update their image.
    When someone updates their image it overwrights the original "nologo.gif" file with the new one.
    So them all the other profiles that use this image have a broken image link.
    Does anyone know a way round this problem I have nodoubt caused myself?
    Cheers again,
    Joe

    You have to save the name of the image in your database. Use ADDT file upload behaviour to upload the image and save the image name in a form.

  • MVC: update only one time

    Hi,
    suppose I've this model class:
    public class MyClass extends java.util.Observable {
         public MyClass(){}
         //get methods
         //set methods
         private int x;
         private int y;
         private int z;
         private int t;
         private int s;
    }Now I want that, when I use more than one set method, observers are notified only one time.
    That is,
    if I have this calls:
    MyClass obj = new MyClass();
    obj.setX(1);
    obj.setY(2);
    obj.setZ(3);
    obj.setT(4);
    obj.setS(5);I want that the update method isn't called five times, but only one time.
    I can't add setChanged() and NotifyObservers() in only one of the set method,
    because I 'm interesting in knowing when the model has been modified.
    I thought of adding a new set method like this:
    setModified(){
       setChanged();
       notifyObservers();
    }so, every time I want to notify observers, I run this method.
    But, I want to know:
    Is this the correct way to do?
    Thank you in advance.
    MargNat

    No,
    the five values doesn't always change all at once.
    I can have this code in one class:
    obj.setX(45);
    obj.setY(46);and in another class this:
    obj.setX(45);
    obj.setZ(345);
    obj.setT(345);I simply don't want the observers are called many times.
    the values are indipendent among them, I don't want to have only one set method for them;
    this isn't an object oriented approach.
    Practically, I want to know where exactly must be placed setChanged() and notifyObservers() methods.
    In all model methods?
    In a specific method I can call every time I want to update?
    I must call setChanged() and notifyObserver() directly, as example, like:
    obj.setChanged()
    obj.notifyObservers?
    Thank you again.
    MargNat

  • Make a PDF so it's contents are just one image (i.e. only one image per page)

    Hello,
    I am trying to put a watermark on a pdf and make sure that it can only be removed by actually having to photoshop it out.
    I Have gotten as far as to where the watermark is an object on the page (see attached picture).  However if someone really wanted to they could go into the contents bar and delete the xobject.  I want to somehow merge the two x-objects together so if you delete it the whole page is gone.
    The only way I've figured how to do this is by saving all the pages as jpegs and then re combining them.  It works, but it creates a huge file.  I would really like to be able to do something simpler preferably using the action wizard.
    Does any one have any recommendations?  It seems like there has to be a way to make a watermark extremely hard to remove.
    Thanks

    Why not encrypt the file with a password to prevent it from being edited?
    If you want the file to be composed of images, what you're doing is the
    right thing, but maybe it can be automated a bit better.

  • Cannot view html images from only one sender

    I have the option set to view remote HTML images. I have junk filtering turned off. I have reset my junk mail filters just in case that was the issue.
    There is email from one sender that is a problem. Instead of images I get the blue squares with question marks. I know the images are available because I can view them if I go directly to my Web based email account.
    Additional info - the account is IMAP. It makes no difference if I copy the message to a folder stored on my Mac.

    I figured it out. I had adjusted the height of the input element to a height that did not work well with the padding. Once I removed the height style and adjusted the padding I got the size I wanted and can see the text as it should be.
    Thanks for your help forgottengods!

Maybe you are looking for

  • Opening raw images in Photoshop Elements 9

    When opening raw images in Photoshop Elements 9 (File -> Open or File -> Open As), the Adobe Camera Raw dialog do not open. Instead I get a window with a progress bar and the text "Reading Camera Raw Format". The image then opens in the Photoshop Ele

  • Is iSync compatible with the new Motorola Razor v3xx Gold mobile phone?

    Today I bought a new phone (Gold Razor v3xx) because I lost my 5-month old Motorola Razor v3. I had used iSync to share my contacts in my Address Book using Bluetooth. Now I am stuck because iSync's error message said it can not accept this new devic

  • Best way to implement tree like subcategory chooser in GUI on iphone

    I need to let user choose subcategory, from a tree like structure, 3-4 level deep. and the list is veeeery long. I was wondering what would be the best way to show it to user, and let him choose one. ideas ?

  • Problem with ora_br_copy.sh

    My source ABAP+Java based DBCI is in a UNIX cluster environment. When I run ora_br_copy.sh to create CONTROL.SQL file, it gives me the following error,   <i>Required system resources are missing or not available:   Oracle listener is not started on p

  • To CR or not to CR, A Tip....

    I am relatively new to LV so likely all of you gurus know about this... I built a vi to capture a number of waveforms and write them to a binary file on an RTOS system, based on an external trigger turning ON. When the trigger turned OFF this state t