Automatic do background work in panelX when you cardLayout.show(panelX)?

Let me first explain what I try to accomplish
+Panel 1: A form that allow people to enter username and password to connect to a database
+Panel 2: Use the connection that just created in panel1 to access database and load data into a JcomboBox
+ContentPane that hold these 2 panel (Layout: cardlayout)
+Top container is a JApplet
So when the program load, I will cardlayout.show(Panel1), then if the user press a "submit" button, I will cardlayout.show(Panel2). Simple enough. Panel2' s job is to silently access a database using the connection that is created in panel1 a load some information onto a JComboBox. My question is how do I design so that when the user press that "submit" button, it detects that now panel2 is in focus so invoke my loadData() that access the database and load data onto the JcomboBox?
Right now i have it so that when panel2 show, the user have to click the "load" button to load information. However, I wish to change that. So please give me some advice.
Thank you very much and happy thanksgiving

JohnBrand wrote:
A clarifying question - should the uploading and downloading be done on a SwingWorker background thread or should it be on a non-SwingWorker thread? You can do it either way. It's fielder's choice here.
Don't the SwingWorker threads end up on the Event Dispatch Thread?Some methods of SwingWorker are always called in the EDT including the done method and the process method, but the main method, doInBackground, in fact the only method that is required in a SwingWorker-extended class is done off of the EDT. Having methods that reliably work on and off of the EDT is what makes using a SwingWorker object an easier way to create background threads in Swing vs. creating a roll-your-own background thread.

Similar Messages

  • Symbol will automatically update in your (bb logo), when you broadcast this message.?

    hey guys i have a quick question. (hopefully)
    i recived a bbm message full of symbols (smileys and little logos) and at the bottom it said
    Symbol will automatically update in your (bb logo), when you broadcast this message.
    so my question is, if i broacast this message (which i have no clue how to do so if someone could tell me that would be very appreciated) will i get all these symbols in my symbol list?

    hmmm sounds a bit fishy to me, I don't see how broadcasting this message to all of your contacts is going to magically unlock these symbols.

  • Thunderbird automatically syncs unsubscribed Gmail All Mail when you hit the "a" key

    I do not sync Gmail All Mail as it is simply a duplicate of all my other folders.
    However, if you accidently hit the "a" on the keyboard whilst in the folder view, Thunderbird automatically opens the Gmail All Mail folder and starts downloading/syncing the folder. Mine is around 20Gb so rather annoying.
    I have to close TB, open it then quickly, unsubscribe to the Gmail All Mail folder, then close, delete the msf file and then I can go back into TB for it to work normally.
    Is there a solution to this? How can I stop the "a" key from opening an unsubscribed folder?
    Thanks for the help
    Paul

    You are archiving when you press 'a', and in gmail this is interpreted as moving it to All Mail.
    I'd suggest you look at the KeyConfig add-on, which lets you specify (and disable!) keyboard short-cuts.
    http://kb.mozillazine.org/Keyconfig_extension:_Thunderbird

  • Since i upgraded to FF4 Beta. The suggestion bit in my Google toolbar, works but not when you click on a suggestion?

    It gives suggestions but when you click on them nothing happens they just disappear.

    Hi satorilori-
    You might try this:
    -> Clear Cookies & Cache
    https://support.mozilla.com/en-US/kb/Template:clearCookiesCache
    -> Clear the Network Cache
    -> Reload web page(s) and bypass the cache.
    Press and hold Shift and left-click the Reload button.
    Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    Press "Cmd + Shift + R" (MAC)
    Check and tell if its working. Hope that helps!

  • What is done by Flash when you press "Show all" option???

    Hello,
    I need technical information. I'd like to know which kind of resizing is done by Flash when you press the "Show all" option. What differences between "Show all" and 100% are there???
    I'm programming an application and the Flash Player Proyector always has the "Show all" option enabled modifying the size of my content!!!!!
    Thanks in advance.

    https://support.mozilla.org/en-US/kb/firefox-sync-take-your-bookmarks-and-tabs-with-you#w_wheres-all-my-data

  • Automatically create Object, Character & Paragraphs style when you copy & paste the same item.

    InDesign could create styles automatically. If I am copying and paste an object or paragraph - that means I will be using it in multiple pages and consequently be making changes to it. I know I can always create a syle for all my elements, but having that feature build-in would be great. Especially for the designers like me who works on small documents. Great Forum!
    Thanks!

    InDesign make it really easy for you to create styles. I just believe that having it as an automatic feature (of course, an optional feature) would save time when working in small - mini publications, where there is really no need to create syles . Just my thought.

  • Reader X has stopped working error message, when you close program

    I have a user that gets the error message that reader has stopped working, whenever she closes reader.  Uninstall and re-install has not helped

    Looks like itunes was still trying to communicate with my iphone and got confused when it couldnt find it.    Found this in another post and it worked great.
    Solution:
    Make sure you are not connected to the internet and then open itunes. Sync your phone and then enable the internet again. Then stay connected to the internet and close your itunes and reopen it. Bam problem solved.
    By WaKaDo

  • Changing background colour of W995 (when you don't have wallpaper)?

    Hello,
    If i set my phone to have no wallpaper the background colour for the main screen is grey.  Sorry if this is a dumb question, but does anyone know how to change this to black?  I think it was black to start with but somehow it got changed and I can't see a straightforward way of setting it back to black using the Display options because on my phone (W995) there is option here for colour change.
    Many thanks for any help anyone can offer

    What I really want to do is to set the background to black, then have a picture that i've taken in landscape as my wallpaper.  Because it's in landscape some of the background is still seen at the top and bottom and i want this to be black rather than grey.  I'm sure it was before, I just find it crazy that it has changed and there is no easy or obvious way to change it back - especially as the default setting must have been black.  I tried doing a reset of setting but it still came up as grey, even though I had to reset the time and date and so on.
    I wish they just had a menu so you could select a background colour, but it seems that doesn't exist.  Sorry to be seeming so difficult, because I appreciate your suggestions - I should have explained before that it isn't so much that I want a black wallpaper as a black background to put an image on top of as wallpaper.

  • Map dosen't work properly and when you are type some events in CALENDER suddenly it will disappear (after 10 sec)

    Map dosen't work properly and CALENDER  has problem , after type events to some dates , suddenly disappear , it dosen't save.

    Anyone know how to delete this posting? Lack of response indicates I either asked the question in a stupid way or didn't ask worthwhile question to start with. I'm guessing it was a bit of both.

  • Keeping stalonetray on top when you toggle show desktop

    I'm sure it's easy, but I can't seem to get my stalonetray to stay visible (it toggles off with the rest of the windows) when I hit W-d to toggle show desktop (LXDE/openbox).
    Here's my .staylonetrayrc:
    transparent true
    sticky true
    skip_taskbar true
    geometry 124x24+1190-0
    window_layer top
    window_type toolbar
    .config/openbox/lxde-rc.xml (just the part with the show desktop keybinding)
    <keybind key="W-d">
    <action name="ToggleShowDesktop"/>
    </keybind>
    Any ideas? I've tried the other values for window_type (dock,utility, normal) but it doesn't change anything.
    Thanks!
    Scott
    Last edited by firecat53 (2008-09-23 20:00:47)

    Hopefully this addresses the same problem that you're having:
    http://bbs.archlinux.org/viewtopic.php?id=39842
    --EDIT--
    By the way, Scott, what an awesome name. I think that it may, in fact, be the best... EVER.
    Last edited by skottish (2008-09-23 20:41:15)

  • Ipad will work when you hit home and then slide the unlock bar - then when you get to the homepage, nothing works - not the home button, it wont rotate, scroll, cant choose icons...nothing.  help!

    Ipad will come on when you hit home and then slide the unlock bar works fine - then when you get to the home page where the icons are, nothing works - not the home button, it wont rotate, scroll, cant choose icons...nothing.  help!

    The home button is the main button off the screen - where is the sleep button?  When I hit home I only see the lock slider (its black) and a button that has a flower on it that pulls up photos we took that are on the ipad.  Thanks for your help!

  • How can I work with lightroom when I use two computers ?

    I am new to Lightroom and work with a laptop at home and a PC at work. Before I started to use LR3 I simply duplicated my pic files onto both machines, edited on whichever machine I wanted and then synchronised the folders. This system provided me with a working copy at either home or work and also a backup copy on the other machine.
    I would like to operate the same system with LR3 but am unable to figure it out due to the automatic filing system used by the programmme to seperate the raw files and the instructions for those files.
    Can anyone provide me with simple step by step instructions on how to transfer the files/instructions by using  a flash drive and "Copy and replace"system
    as I am totally confused by the grammar, syntax, and terminology used by Adobe.

    Hi Geoffbubbles,
    if you see only 1 photo you did export only 1 photo in the catalog.
    Make sure you select all (e.g. <ctrl> A or remove the tick from "export selected photos only" in the dialog box of export-as-catalog =>will pick the total folder).
    What Dorin mentions are catalogs as transportation vehicles between the two LR computer catalogs.
    Let's assume you start on your home-comp and transfer to the work-comp.
    When you EXPORT you give a name "home-to-work" for the transport catalog. You decide if you include the pictures by ticking "exclude negative files".
    You would do so only for the first time, when your work-comp would not yet have them.
    These are the original files which would never be touched, but which LR needs to have available to do develop work (i.e. to write develop instructions into its database). [Or maybe only you need them in order to have LR display the effects of what you are doing, if your slider settings achieve your desired result.]
    When you transfer your new settings from the work-comp to the home-comp which has the original files already you only need to transfer the DB-records for the files, i.e. the catalog parts. Then it is sufficient to export-as-catalog (name it "work-to-home") without the tick for the negative files. Which will obviously save a lot of data to transfer.
    As would leaving off the tick for "include available previews", but then your receiving computer would have to render the previews itself - your choice where you spend the effort.
    Depending on your ticks checked in export dialog the data on the transfer stick will show different folders:
    1 wrapping folder with the name you specified as transportation catalog name (in the example above "home-to-work")
    therein the catalog file *.lrcat (home-to-work.lrcat)
    if "include negative files" ticked: as many subfolders as the original folder structure/names of the pictures in it had on the sending machine
    if "include available previews" ticked: an *Previews.lrdata-folder ("home-to-work Previews.lrdata") with lots of subfolders labelled 0...F
    On the receiving computer, when you IMPORT FROM CATALOG, you only select the *.lrcat-file.
    In the dialog box you decide if you import the negative files (prereq you had included them) or if you just add them without moving (why not leave them on the stick i.o. actually copying over to the work-comp?). If there are no new photos, but just new settings, you can either overwrite your old settings (which is probably your intention) or tick "preserve old settings as virtual copies".
    When you use Dorins smart collection "Touched today" the virtual copies should not show up upon re-export on the way "work-to-home", provided you have further tweaked the master versions only. Or they do because in the end you liked them better and continued tweaking on them.
    Note if you do not include previews: you might need to tell LR on the receiving comp to rerender the previews if it contains the photos and earlier previews already - I am not sure, if LR starts off on its own to rerender them.

  • Errors in Version 13  (When you want generate transmittals from submittals)

    Depending on definitions in PROJECT SETTING --> COMMUNICATION [TAB] you could generate automatically Transmittals from Submittals, but:
    1- When you are filling Review Cycle [TAB] --> Revision [TAB] --> FORWARDED date [FIELD] in a submittal document, one Transmittal will be created in Transmittal Queue, the problem is: The receiver of this transmittal must be the person that is defined in Review Cycle [TAB] as receiver of Forwarded Transmittals, not the receiver of Sent Transmittal !!!!!
    2- When you are going to create transmittals by using Distributions [TAB], the software would create two transmittals for each person in distribution list!!!
    Do you have this problem with Version 13?
    Edited by: Hosseini Sassan on Feb 7, 2011 2:13 AM

    Using SP4, I created two Transmittals - one from entering a Sent date and one from the Forwarded date.
    The transmittal created from Sent was TO the company assigned as Sent in the Submittal workflow and was FROM the company assigned as Submittal Coordinator.
    The transmittal created from Forwarded was TO the company assigned as Forwarded in the Submittal workflow and was FROM the company assigned as Submittal Coordinator
    This was as I expected. Please explain specifically what you are finding and how you expect this to work.

  • How can I have a PDF in Full Screnn Mode without it goinging to the next page when you click?

    I'm trying to make, let's say, a mini website using a pdf that includes hyperlinks. I also want the PDF to open in FULL SCREEN Mode. For some reason, when in FULL SCREEN mode you can click on the links (works excellent), but when you click on an area of the page that is NOT a link, it forwards you to the next page in the PDF.
    I ordered the full version of Acrobat X Pro, and thought that it would work saving it out of Powerpoint (original file), but I had to disable the add-in because it just kept on crashing.
    I can't seem to find where i can control the "Do Not Forward to Next Page OnClick".
    Help!
    Thanks!

    If you just purchased Acrobat 10, you might be eligible for a free upgrade to Acrobat 11, which is suppposed to have much improved export to PPT.

  • MMS not working in iPhone4S when installing config profile with APN

    When we use the iPhone Configuration Utility (either the latest version or previous versions) to create a config profile with APN info, then install the profile to an iPhone4S, we noticed that MMS (multimedia messaging) was no longer working. This means we could not send or receive MMS messages. And this is MMS going over the MMS protocol (and not iMessage). We had not seen this before. We routinely do config profiles with APN info and have done for all iPhone models and iOS version before the new iPhone4S. Never had a problem with MMS or anything else. This is for iPhone4S devices in the AT&T network. It is easy to reproduce and you don't need an enterprise APN for that. In fact just a config profile with AT&T's APN settings will still break MMS when installed (other than the MMS, everything else works fine).
    It does not appear an iOS 5 issue. iPhone4 (or iPhone3GS) with iOS 5 do not have this problem. It appears to be tied to the new iPhone4S hardware. The same configuration profile (with the APN info) works fine on iPhone4 with iOS 5 (MMS works fine), but when you put the very same configuration profile to an iPhone4S, MMS quits working.
    Doing a network reset does not solve the problem. Only removing the profile fixes the MMS
    Any ideas, explanations or workarounds?

    I called the Apple care line, and eventually got to 4th tier support, where they declared that there must be an issue with the APN I'm using, regardless of the fact that none of the iPhone 3G, 3GS', and 4's in our office are experiencing this issue while using the same APN.  I guess I shouldn't be surprised about this, afterall who'd expect Apple to actually admit there's a "bug" in one of their products, especially since this is hapenning to a very small number of users on the 4S.  Getting to 4th tier support was free, but to be able to talk to someone who can actually investigate this issue will cost $700.
    I offered to give them access to our private APN for testing, but they were "unable to do that sort of testing".  Additionally, we have tested using a public APN from AT&T (wap.cingular), and still experience the same issue.
    Lastly,  I did some further digging, and I think it has something to do with PDP Context 2 not getting an IP address.  As a disclaimer, I have no clue what a PDP Context is, what it does, what it's for, but obviously MMS needs it.  Going into field test mode on the phone will allow you to see the PDP Contexts, and is where I got this info from.
    On the iPhone 4S, without an APN profile installed, the PDP Contexts are listed 0-3.  These 4 contexts have values for an APN, and an IPv4 address, although context 0 and 2 are the only ones that have values in them.
    When an APN profile isnt installed, MMS' can be sent, cellular internet doesn't work., the values are:
    Context 0
    IPv4:    ip is blank
    APN:   phone (this is the default APN for the iphone 4s on att).
    Context 2
    IPv4:     has a valid public IP address
    APN:     wap.cingular
    When an APN profile is installed, MMS's can't be sent, but cellular internet does work, the values are:
    Context 0:
    IPv4:     Valid public IP address is present
    APN:     Our enterprise APN
    Context 2:
    IPv4:     ip is  blank.
    APN:     wap.cingular
    It appears that when Context 2 has an IP address, MMS' are able to be sent.  One other interesting fact, on the iPhone 4, only 1 PDP Context is listed, while the 4S has 4 listed.
    Hopefully this issue will be resolved in the 5.1 update, as this update contains a baseband update for the 4S, updating it from 1.0.14 to 1.2.01-1.  Unfortunately I don't have access to a 5.1 beta, otherwise I'd test this my self.  If anyone has access to the beta, and wants to test APN profiles/MMS send status, we'd greatly appreciate it!

Maybe you are looking for

  • Itunes not recognising ipod since recent update

    I last used itunes about 1.5 weeks ago to purchase a song and sync to ipod. I'm pretty sure since then I installed an itunes update. I uploaded a new album today and connected my ipod. My computed makes a noise when the ipod connects however no ipod

  • Should an iPod Nano 2nd Generation Work With Windows Vista?

    I understand that many people are having problems with their iPods and come here for support and solutions. I'm just wondering if the iPod Nano 2nd generation 4g I have that is working just fine SHOULD work with latest iTunes on Windows Vista laptop

  • There was a problem with your order please call?

    My wife ordered a 4S 32GB black model and was putting me on her plan of currently 2 phones.  We ordered via the site about a week ago and got the message the phone would ship 11/30, added a data plan etc on a 3rd separate line.  Received an order con

  • Enterprise Manager 10g - change database instance.

    I have installed 10g and I have been using the enterprise manager database control web applet to manage my database. I now have the need to manage a second database, but I cannot get the new databse to show up on the login page; the console still dis

  • Reg : OS commands in Adapter Configuration

    Hi, I have seen the option like <b>Run Operating Sustem Command Before Message processing and After Message</b>. How can I use them Where can I see the results of it. I need an OS command to diplay all the files in a directory before message processi