How to use backing store in JPanel?

Below is a sketch of a class that extends JPanel. If I remove the variable "draw", the class works fine, except that the graphics drawing code is executed every time the parent window is fronted, resized, etc.
I introduced the variable "draw" hoping that the call super.paintComponent(g) would use the backing store to refresh the display. Instead, the call simply erases the panel.
How can I use the backing store?
Thanks, for your help.
public class DisplayPanel extends JPanel {
     boolean draw = true;
     public void paintComponent(Graphics g) {
         super.paintComponent(g);
         if (!draw)
               return;
          // graphics drawing code here.
         draw = false;
     }

Backing stores are only used on JViewpots. You will need to draw each time.

Similar Messages

  • How to use Apple Store app to purchase item in Favorites?

    How to use Apple Store app to purchase an item in 'Favorites'?

    You can't delete the App Store app on the iPod. You can only hide it via Restrictions (Settings>General>Restrictions).
    If not hidden by restrictions, have you used the SpotLight search to try to find it?
    Last
    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.             

  • HOw to use aap store without card

    Hi how to use app store without card

    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card

  • How to enable backing store in X11?

    Hi !
    I want to remotely login to my schools server (solaris) to do the projects. The environment variables dont match. and it asks me to enable backing store. Can some one please tell me how to do that in X11.app please..
    Here is what I do to login
    DISPLAY=localhost:0.0
    export DISPLAY
    ssh -Y [email protected]
    password:
    try to invoke the IC station Tool (Design Tool for Layouts )
    Here is the error I get
    ERROR: You may have an Error in your mgclocationmap entries.
    Read Error messages carefully and correct any such problems.
    Re-invoke application after problems are resolved.
    Mentor Graphics software executing under Sun SPARC Solaris.
    // Error: MGCLOCATIONMAP set to an invalid path. Unsetting it. (from: DDMS/DDMSCore/DDMSFILE 37)
    // Note: starting to load custom userware (from: Uims/basetoolkit/ui_sessiontk 81)
    // Note: Begin Loading userware for the Design Kit (from: Uims/basetoolkit/ui_sessiontk 81)
    thanks
    and bunch of more warnings
    There is another warning I get in the beginning that tells me to Enable Backing store . By doing it it should solve the problem.
    I have searched over the internet and I have found out that in X11 Backing store is not enabled by default and I have to edit some file and remove -bs from that file .
    Can someone guide me how to do this?
    I would really appreciate it .
    Thanks
    Viky

    I suggest you ask your question here:
    Forum: Mac OS X Technologies > Unix

  • How to Enable backing store in X11.app

    Hi !
    I want to remotely login to my schools server (solaris) to do the projects. The environment variables dont match. and it asks me to enable backing store. Can some one please tell me how to do that please..
    thanks

    I suggest you ask your question here:
    Forum: Mac OS X Technologies > Unix

  • How to use itunes store purchased music in SP?

    Hello,
    I know that iTunes store music is copywrited and you can't use it in any commercial product. But I am making a movie of my vacation that maybe 10 of my friends and family will see.
    I would like to use my iTunes music in this movie and of course the songs I want are the ones that I bought on the music store.
    How would I be able to use those songs in my project? If you can do it in iMovie, you should be able to do it in Soundtrack. If I bought a CD I would be able to!
    Are there any kind of utilities to take that lock of the songs?
    D

    i haven't actually tried any importing music with drm into STP yet, but in the past on my pc, if drm was causing issue with using an mp3 in certain applications (soundforge was a regular), i'd simply burn the track as audio and extract the audio back from the cd...
    a little cheeky but drm should be there to prevent piracy, not hinder the legally paying customer

  • How to use back to my mac from iOS?

    I have enabled back to my mac on my macbook running ML and have enabled the same for my user ID in the airport express router to which the macbook pro is connected.
    i would like t know how i can access the shared folder from my ios devices while
    within the wifi network
    outside the wifi network over the ios devices 3g internet.
    tried a lot to figure it out since many months now.
    Neerav

    Just some additional info.  For basic back to my mac to work you need a router (any brand) that supports UPNP or NAT-PMP - or an apple airport router device (Airport Extreme, Time Capsule or Airport Express) (which must be configured as your primary router - and not in "bridge" mode).  You need at least two Macs - one in your house - and one as the remote device.  You need to set up your iCloud id on both Macs and enable Back to My Mac in iCloud preferences - using the same icloud id for both Macs.  You also need to ensure that you have enabled at least "Screen Sharing" in the sharing preferences of both Macs - and optionally enable File Sharing.  You will see the Mac in the other Mac's shared pane - in Finder - both locally and remotely.
    If you are using an Apple router (airport extreme, express or time capsule) - the icloud id's that you enter on airport device (via airport utility) - are only for the purpose of remote sharing of drives and printers attached to that airport device - and are not related to the back to my mac functionality.  If you don't need to remote share the printers or drives directly attached to the airport device (via USB) - then you do not need to enter any iCloud id's on the airport device itself.
    For example - you have a time capsule set up as a router.  You have 3 people in your house that want to remotely access files on the Time Capsule's drive(s).  You would enter your iCloud id, along with the iCloud id's of other household members.  You would then all be able to independently share the time capsule drive remotely.
    With an Airport Express router - you would only be able to share a USB printer attached to the Airport Express.
    As for iPad - there may be 3rd party apps that would mimic the Back to My Mac functionality - but to the best of my knowledge there is no Apple-provided Back to My Mac app for the iPad.

  • How to use iBook Store?

    I've purchased the 64 GB (WiFi) iPad and love it. I've also purchased the "iBook Store" app, for when I'm out and about, using WiFi. But, if I'm NOT on Wifi, how do I access the iBook Store?
    When I open iTunes, I see the category "iPad Books", but not the "iBook Store". Am I missing something?
    Thanks for your help, in advance.

    HI Mike,
    You have to have a wi fi connection in order to access the iBook Store. When not at home many internet cafes offer wi fi for a nominal price or free.
    Check out the AT&T data plan here. http://www.apple.com/ipad/3g/
    Carolyn

  • How to use an Image as JPanel's background

    I want to use an Image as my JPane background, how can I do that? anyone will be kind to provide some sample code?
    Thank you, please help
    Emily

    Do you want to tile the image or scale?
    The simplest way I can think of would be to extend JPanel and override paintComponent(Graphics g) to either tile the image or to scale it over the panel.

  • How to switch back stores

    so i just got back from traveling in us and in there I bought an iTunes gift card and switch to us store to redeem it there but it still left me with 0.47 dollars left but when I arrived at my home country it said you have to spend it all to switch store so can you guys solve this problem?

    Try contacting iTunes Support and ask them if they can remove the balance from your account so that you can change countries : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • How to use online store?  Always tries to use program

    Like a lot of people, I can't access the iTunes store through iTunes. A lot of posts I've read say to use the online store, but whenever I try to do that, it tries to use the iTunes program. I can search for artists and songs online, but as soon as I go to listen to them, it brings up iTunes and I get that annoying error notification. Not to mention that I want to connect to check out the top 100 downloads and there doesn't appear to be any way to do that from the online store.
    Any suggestions? Thanks.
      Windows XP  

    Alright, I guess I misunderstood.
    On a thread about not being able to connect to the iTunes store, a few people mentioned using the iTunes online store; I thought it was an alternative, but I guess I was wrong.
    So the error notification doesn't matter anymore either. Thanks.

  • How to use Itunes Store without credit card

    I've followed all the guides on how to download free apps in the Itunes store without having to enter a credit card, but there is no "none" option for me. What am I doing wrong? I just want to download free apps without having to enter a credit card since I don't have one anyway. Any help would be GREATLY appreciated. Thanks.

    You've followed all the steps in this article exactly?
    http://support.apple.com/kb/HT2534
    Read the steps carefully as the order in which you follow them is apparently critical.
    If you still are unable to get it to work, you may not be able to open an account without entering in some sort of payment method (credit card, prepaid iTunes card, gift certificate, etc.) Perhaps a relative or friend would enter in their own credit card long enough to get your account activated after which they could remove the information.
    Regards.

  • HT1491 how to use itunes store with no credit card?or no itunes card

    hi trying to access the itunes store but i have no credit card or itunes card . can this been done?

    Yes. Instructions >  Creating an iTunes Store account without a credit card

  • How to use App Store under proxy and firewall?

    Greetings all,
    We have an iPad which connects to Wifi with no problems. Under WiFi settings, I configure the Proxy HTTP manually.
    I know that Youtube is blocked by a proxy. But iTunes and APP Store don't load without any apparent reason. Every other programs (Safari, Mail, Google Maps, etc...) load perfectly.
    Ports 80 and 443 are open inside the proxy and firewall.
    Through which protocols, ports or ip works APP Store/iTunes?
    Thank you.
    Regards

    Just to be a bit clearer, this is what happens at work. At home, everything works perfectly.

  • How can use up store without cart,i wsnt to telecharger only free games,but there isn't line whith word "no",whithout pay.

    Hello,how to registre in upstore whithout cart viza and ets,i want only free games.but unfortunately there is no word"whithout cart"how can i activate my account in upstore whithout carts?thank you!

    http://support.apple.com/kb/ht2534

Maybe you are looking for

  • Error in text determination procedure

    hi gurus i have defined text determination procedure from customer master to sales order and it works fine, when i am defining a text det procedure for delivery document i have referenced the text from sales order. i am able to define it but while as

  • Can't iTunes from one mac, but can from others

    On my Mac Pro, when I go into iTunes, choose "multiple speaker", I get a list of the airport express devices in the house...but I cannot check the boxes next to any of them (except the computer). However, from my MacBook Pro, I can. I run SL, have re

  • Save Output to: setting not being saved

    This has been driving me nuts for a couple of years, so I figured I'd finally ask if anyone else sees this behavior. My script grabs a PDF and converts each page to new, separate, PDF files using a custom name and number. There are three components:

  • FTP connection looses connection if it exceeds 90 seconds.

    FTP connection dropped after 90 seconds. I believe the problem is in a firewall but cannot get much help from that group. Is there somewhere else that controls the timeout for FTP that I am missing? No timeout is set in /etc/ftpd/ftpaccess. I did cha

  • How would I transfer my songs from my old pc to the new mac?

    Some are songs that I downloaded onto my old pc so how would i make them appear on my iTunes on the new mac? Right now, only some random songs are listed under my music