Why update(Graphics g) in JPanel is not called?

Hi,
I have Overridden the following two functions in a JPanel:
1. void paint(Graphics g)
2. void update(Graphics g)
in order to define my own content in the JPanel. As far as I know that override update() by the following code:
public void update(Graphics g)
System.out.println("update is called");
     paint(g);
the original content will not be cleared when it is repainted.
However, I find that update() has never been called. And the content is cleared to its default background color before my defined content is painted. it leads to flashing of the screen.
can anyone tell me why update() is not called??
Thank you,
FS

Hi,
YOu should read the following article that explains the differences between AWT and Swing painting.
http://java.sun.com/products/jfc/tsc/articles/painting/index.html
The article makes one important distinction between the two:
This means that for Swing components, update() is never invoked.
Regards,
Manfred.

Similar Messages

  • Why tuxedo7.1 or Tuxedo6.5 can not call the service on Tuxedo8.0 server

    Why tuxedo7.1 or Tuxedo6.5 can not call the service on Tuxedo8.0 server.
    I wrote the Server Application with Tuxedo version 8.0.
    And used tuxedo71 WS client to call the service.
    The client application displayd tpinit fail.
    ULog told me "prv7.1 not allowed,use -t option on wsl".
    Is there any way to solve this problem?
    thanks!

    risen,
    Yes there is a way to solve this. As the error message suggests, use the -t
    option on your WSL server. Look at
    http://edocs.bea.com/tuxedo/tux80/atmi/secadm10.htm#1284650
    [ I know this documentation is astonishingly well hidden! ]
    Peter.
    risen wrote:
    Why tuxedo7.1 or Tuxedo6.5 can not call the service on Tuxedo8.0 server.
    I wrote the Server Application with Tuxedo version 8.0.
    And used tuxedo71 WS client to call the service.
    The client application displayd tpinit fail.
    ULog told me "prv7.1 not allowed,use -t option on wsl".
    Is there any way to solve this problem?
    thanks!

  • h:CommandLink : Action event not called on the first click

    Hi,
    I am facing a problem here.
    I have a JSF page:
    When I first load the page, I have few text boxes and dropdowns. With out doing anything If I click the <h:commandLink I call an action in my pagecode.
    But the problem is on the very first load of the page, without doing anything if I click on the command link action event in my pagecode is not called, but If I click on the link the second timethe pagecode actionevent is called.
    So I think tried submitting the form in the JSF page onclik of the commandlink it works in my Local IBM RAD. But doesnot work in the WebSphere Portal.
    So can you tell me if I can submit the form atleast once when the page loads for the first time
    This is my command link:
    <tr>
    <td colspan="2" align="center">
    <h:commandLink styleClass="commandLink" id="lnkBtnCreateUser" action="#{pc_Createuser.doLnkBtnCreateUserAction}">
    <hx:graphicImageEx styleClass="graphicImageEx" id="imgBtnCreateUser" value="/theme/images/btnCreateUser.gif" style="border:0;cursor:pointer" onclick="return onFormSubmit();"></hx:graphicImageEx>
    </h:commandLink>
    </td>
    </tr>
    function onFormSubmit(){
    //enabling all the disable components
    So can anybody please help me on this. Why exactly the pageCode action event is not called for the very first click ???

    seems that a prependID="false" attribute in the respective form was causing the trouble. At least it's working now that I've deleted it.
    I introduced it, because last time the component ID's messed up the output of the error/success messages ("j_id:xxx isn't that of a usefull information to the enduser).
    Edited by: stger on Apr 9, 2008 5:41 PM

  • Download the updated version of the software can not use and why?

    Download the updated version of the software can not use and why?

    It will help if you tell us what model of iPod touch you have, how and from where you downloaded the update, what version of iOS this update is, and details about the problem; "can not use" doesn't give us anywhere near enough information on which to base a diagnosis and offer suggestions.
    Regards.

  • HT4528 why did it say my phone was "Not Trusted" when i updated it

    why did it say my phone was "Not Trusted" when i updated it

    Is your phone jailbroken?

  • The update of web page iCloud is great, but why don't u just remove the "Notes" label from the "Mail" app?

    The update of web page iCloud is great, but why don't u just remove the "Notes" label from the "Mail" app?
    In additional, I also would like to see a "iOS liked" way to edit my "United contact" on the web page iCloud, just like on my iphone. That would be really great and more greater!
    Anyway, thanks for your work!

    frederickfromacworth wrote:
    but the updated icons on the update page don't go away.
    It's difficult to tell exactly what you mean, or where you are looking.
    But if you're looking in the App Store on the iPad, in the Updates area, and you still see the icons, they presumably now say "Open" to the right instead of "Update".  They will stay that way as a history of what you have done.  They will disappear after a while - something like 30 days.  That is fine.

  • Why does i tunes keep bouncing and not open after I have done an update

    why does i tunes keep bouncing and not open after I have done an update ?

    Hello, romani-jo. 
    Thank you for visiting Apple Support Communities. 
    Try resetting your System Management Controller or SMC.  Try launching iTunes after processing these steps.  If the issue persists, try downloading a fresh copy of iTunes by accessing the second link below. 
    Intel-based Macs: Resetting the System Management Controller (SMC)
    http://support.apple.com/kb/ht3964
    http://www.apple.com/itunes/
    Cheers,
    Jason H. 

  • Connected to the "creative cloud free 30 day" Updated photoshop to 13.0.1 not 13.1.1. Why ?

    Connected to the "creative cloud free 30 day" Updated photoshop to 13.0.1 not 13.1.1. Why ? This version is available only to paying subscribers?

    Free trial of Creative Cloud.
    Screenshot - http://dl.dropbox.com/u/34239816/screenshots/screen121220-192324.jpg

  • I have East west plug-ins and have them PLAY updated! but still Logic can not see These plug-ins! can anyone tell me why?

    I have East west plug-ins and I have PLAY updated! but still Logic can not see These plug-ins! (play) can anyone tell me why?

    Hi
    You may need to run Logic in 32bit mode to get the AudioUnit Manager to scan the new plugins?
    http://support.apple.com/kb/TS3934
    http://support.apple.com/kb/HT3989
    http://support.apple.com/kb/TS3171
    CCT

  • I cannot upload the latest update for photoshop and I am not sure as to why or how to resolve this.

    I cannot upload the latest update for photoshop and I am not sure as to why or how to resolve this.

    Are you connecting via wifi? if so try an eithernet cable as I have found on windows 8 running the adobe manager will disconnect the broadband modem from the internet and requires rebooting the modem. But a direct cable to the modem works just fine.

  • Equium A110-276 - why Shared Graphics Memory is not set to max 128 MB?

    I have an Equium A110-276 and the maximum memory of the graphics is 128MB...
    Now, when I bought this notebook, it says that the graphics memory is 128MB which is correct.
    So I can play high graphics games and applications.
    After 9 months, the shared memory for the graphics became 64MB! What the?!
    Now when I play and use the applications which need 128MB, they're notifying me that my graphics memory is 64MB which is low and the applications may become slow.
    Anyone had this problem?
    I tried contacting Toshiba and they said that I need to put more RAM, I tried to call 4 times and they always say the same thing... but I already have 1024MB of RAM which is enough... My problem is why the motherboard or the BIOS is not sharing up to 128MB of RAM for the graphics...

    Hi
    The Equium A110-276 supports a Intel 945GM graphic chip!!!!
    The Intel graphic cards assign the shared memory automatically!!! The graphic driver controls the memory and you cannot set the amount manually!!!
    If the application needs more graphic memory then the driver will assign and share the memory automatically!
    Dont worry, everything looks ok!

  • Why after update Iso 5 by iPhone and not open, without using Itune. Just screen keep show apple logo for few hours already.

    Why after update Iso 5 by iPhone and not open, without using Itune. Just screen keep show apple logo for few hours already.

    Try to reset - Press both the home and on/off buttons for at least 10 seconds until the Apple logo reappears.

  • App store icon graphics gone, so are screen shots.  Updates page looks like it's not properly loaded - just text, no icons and no 'install' option. Can anyone help?

    It happened after i did a load of updates.  Icons are now missing - not a huge problem because they still download (just nice to get a glimpse of what i'm buying - there's no screenshots any more either).
    Updates page doesn't look like it's loaded properly - just a load of text down left side, no images and no option to install updates.
    I've done a hard restart and it hasn't helped.  I'm hoping i don't need to do something more drastic...?

    You could try "buying" a free app, which might help to reset things?

  • Why does the Latest update for iOS 7 say firmware not compatible

    Hi,
    I have tried updating my daughters iPad mini (original not retina) with latest update. I have it connected to the mac via iTunes and it downloads the update ok. When it tries to install it it says the firmware is not compatible. It is a wifi only model. I have updated 4 iPhones, 1 identical iPad mini and my iPad 2 with no problems. Can anyone help?
    Thanks

    Reset iPad and try again.
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • Why is it siri and panorama is not available in the ipod touch 4th gen in iOS update

    why is it siri and panorama is not available in the ipod touch 4th gen in iOS update

    Because the hardware does not support them.

Maybe you are looking for

  • Running any wine application instantly crashes entire X server

    I'm not really sure how to debug this issue. Suddenly, without performing any pacman update or other major changes, running any wine application (even winecfg) crashes X. Looking at strace, it appears to be a GPU related issue, and temporarily removi

  • Error in Installing Oracle 9i on Redhat 7.2

    I'm installing Oracle 9i on redhat 7.2. The machine I'm installing it on is an AMD k-6 500 mhz pc. While attempting to install Oracle 9i I'm successful (well, I think maybe not) except for the fact that the oui reports the following error: "configura

  • How to set default Print layout in SDK!

    Hi All In Form Delivery (ID=140) I want to Add Button to set default print layout by Addon. Please let me know the interface and the table to do it. Thanks

  • All pages contents are diagonal (text, pictures, buttons...)

    when i open firefox, the home page loads, but everything is diagonal, and it's the same for every page, they load but all the contents are diagonal. an example: i see a button that should be in a corner standing in the middle of the page and when i w

  • Export to Multi-tabbed Excel File

    Hi, I'm using Crystal Reports XI R1 and aside from designing reports in WEBi, do newer versions of Crystal support exporting reports to multi-tabbed Excel files?  Thanks, Brian