JOptionPane and not have a valid parent error(Runtime)

I have the following code in my program ; it compiles but gives me a Runtime error :
java.lang.RuntimeException: JOptionPane: parentComponent does not have a valid parent
Here is the code :
JOptionPane.showInternalOptionDialo(null, "Please  select a color", "Example 5",
JOptionPane.DEFAULT_OPTION,
JOptionPane.QUESTION_MESSAGE,
  null, new Objec{"Red" , "Green", "Blue"} , "Blue");[How do I set a parentComponent to the JOptionPane so that it works?

Either pass something other than null as the first parameter (I'd recommend this approach), or call setRootFrame first.

Similar Messages

  • "parentComponent does not have a valid parent" error

    I'm trying to display a JOption pane with the following code:
    JOptionPane.showInternalMessageDialog(JOptionPane.getRootFrame(), word, "information", JOptionPane.INFORMATION_MESSAGE);
    I've also tried the following variation:
    JOptionPane.showInternalMessageDialog(this, word, "information", JOptionPane.INFORMATION_MESSAGE);
    My class is structured in the following way. My class is named JFrame and it extends JFrame. The main function creates a new JFrame object, calling the constructor, which calls a private void initComponents() method. My public void actionPerformed() method invokes a private void search() method, which at this point has nothing in it other than the line stated above which creates the JOptionPane. One thing I'm unclear about is whether to use "this" or "JFrame" in the "showInternalMessageDialog" window.

    The first argument of JOptionPane.showInternalConfirmDialog requires a JInternalFrame.
    Have a look at lines 1156-1157 in
    http://guma.ii.fmph.uniba.sk/jdk/javax/swing/JOptionPane.java.html
    I think you'll have to got with a JDialog.
    Peter
    from Peter i just report it***********Thank you Peter.

  • TS3212 I have removed my pop-up blocker completely and still receive the following error message when attempting to download iTunes:  "The file was blocked because it does not have a valid digital signature that verifies its publisher".....any ideas?

    have removed my pop-up blocker completely and still receive the following error message when attempting to download iTunes:  "The file was blocked because it does not have a valid digital signature that verifies its publisher".....any ideas?

    That suggests that the installer is getting damaged during the download.
    I'd first try downloading an installer from the Apple website using a different web browser:
    http://www.apple.com/itunes/download/
    If you use Firefox instead of IE for the download (or vice versa), do you get a working installer?

  • Saved keynote document could not be read. Error message says The document does not have a valid format.

    Using Keynote '09 on an iMac OS 10.8.4. Two of my students saved a Keynote file then the next day when trying to open received an error message- The document "4b Molly.key" could not be read. The document does not have a valid format. The students are saving correctly. Any ideas how we can retrieve a working file? Why did this happen?

    Just tagging on as I encounted this problem this morning.  I'm using Mavericks, on MBP (late 2013). 
    Have both Keynote 5 and 6 - tried to open the file in both, to no avail.   I have also tried the renaming of .key to .zip that seemed to work for others with previous OS, but does not fix now.  Also tried uploading to iCloud, renaming, redownloading - no fix there either.  I've tried to open on iPad and on a different user's iMac - again, get the same error.
    It worked yesterday and the day before.  It is a large file; however, I realized that from last night to this morning the only different thing I did was that I inserted photos in the keynote deck by drag & drop verses Insert/Choose and wondering if this corrupted the file.
    I'm going to hope a fix is out there somewhere and that I don't have to spend hours upon days upon weeks redoing this 98+ page deck.
    Any suggestions?

  • ERROR ITMS-4103: "Country WW does not have a valid currency" at Book/Offer (MZItmspOfferPackage)

    Dear,
    i 've got this error when i tried to upload my book using iTunes Producer and i don't know how to solve it
    if any one know the solving please inform me
    ERROR ITMS-4103: "Country WW does not have a valid currency" at Book/Offer (MZItmspOfferPackage)

    Hello ModernGuide
    For specific issues with uploading your book and dealing currency, you will want to contact Apple Directly and the article below will have contact information for phone support or support through email.
    Authors & Book Publishers: Frequently Asked Questions
    http://www.apple.com/itunes/content-providers/book-faq.html
    Apple provides support to iBooks Store authors and publishers via email and phone:
    Send an email to [email protected]
    If you have an Apple ID enabled for iTunes Connect, you can contact the iBooks Publisher Support team by phone, Monday through Friday from 7 a.m. to 5 p.m. (PT). Local phone support is available in English in the countries listed below
    Austria, Australia, Denmark, France, Germany, Italy, Netherlands, Norway, Spain, Sweden, U.K., U.S.
    Regards,
    -Norm G.

  • Recently updated to itunes 10.6.1, but during update it says itunes does not have a valid signature and update fails ,now older version is not able to connect to itunes store

    Recently updated to itunes 10.6.1, but during update it says itunes does not have a valid signature and update fails ,now older version is not able to connect to itunes store error 306. I am using windows 7.

    (Apologies for butting in, wha.)
    now older version is not able to connect to itunes store error 306. I am using windows 7.
    If you still get the 306 after updating to 10.6.1.7, perhaps try the following user tip:
    iTunes for Windows 9.0.x: Error 306

  • Error #2046: The loaded file did not have a valid signature in flex 4

    As part of our CI build, the ant script that builds the client side (flex 4) projects also runs a set of FlexUnit4 tests on the deployed project. Most of the tests work but a few fail with this error
    RSL
    http://local.foo.com/bar/com/blah/components/someComponent/framework_4.1.0.16076.swz failed to load.
    Error #2046: The loaded file did not have a valid signature.
    The build machine is running Ununtu 10.10 with Firefox 3.6 and Flashplayer 10.2. If I run  the exact same set of tasks, accessed from the same URL in windows everything passes with no problem. After some searching I did run across this thread: http://forums.adobe.com/message/2747415#2747415 but when I went looking for the libflashsupport.so file mentioned, the Ubuntu docs seemed to indicate that it was no longer needed.
    I'm at my wits end here. Is libflashsupport.so actually needed in Ubuntu 10.10 and if so where would I find it? If not does anyone know of another issue that could be responsible for this?

    hello,
    I have the same issue, Ubuntu 10.10, flashplayer 10.3rc1
    mxmlc SimplePrj.mxml -debug=true -benchmark=true --target-player=10 -output ../deploy/SimplePrj.swf
    mxlc verbose:
    Loading configuration file /home/.../flex-config.xml
    Initial setup: 79ms
    start loading swcs 9ms Running Total: 88ms
    Loaded 34 SWCs: 740ms
    precompile: 1062ms
    Required RSLs:
        http://fpdownload.adobe.com/pub/swz/flex/4.5.0.20967/framework_4.5.0.20967.swz with 1 failover.
        http://fpdownload.adobe.com/pub/swz/tlf/2.0.0.232/textLayout_2.0.0.232.swz with 1 failover.
        http://fpdownload.adobe.com/pub/swz/flex/4.5.0.20967/spark_4.5.0.20967.swz with 1 failover.
        http://fpdownload.adobe.com/pub/swz/flex/4.5.0.20967/sparkskins_4.5.0.20967.swz with 1 failover.
        http://fpdownload.adobe.com/pub/swz/flex/4.5.0.20967/mx_4.5.0.20967.swz with 1 failover.
    Files: 540 Time: 3380ms
    Linking... 27ms
    SWF Encoding... 18ms
    /.../SimplePrj/deploy/SimplePrj.swf (80059 bytes)
    postcompile: 45ms
    Total time: 4259ms
    Peak memory usage: 81 MB (Heap: 62, Non-Heap: 19)
    I had to copy the swz to deploy folder since failovers are not yet available.
    * accessing from windows machines it loads swz without complaints.
    Jaco

  • Error #2046: The loaded file did not have a valid signature.

    I have three different applications which suddenly stopped working with this error
    Error #2046: The loaded file did not have a valid signature.
    None of the sites has been touched in Months, I assumed they would keep working the way they had.
    I wonder how many other sites are experiencing this and how many PO'd customers there are out there??
    This is really bad business practice, what is causing it?
    Dan Pride
    Note: the three were developed around the same time, one domain went down for a few days and was then renewed????

    Daniel... have you found a solution to your problem?
    I am also having the same problem. I was googling with no avail, when I noticed you added this post just yesterday,
    so I am thinking that adobe has done something to the swz files hosted on thier servers.
    Can someone from Adobe confirm if anything was done to either swz files or the crossdomain files on their end?
    I am in the same boat as you... no changes on our side, but the application has suddenly stopped working.
    We were building against a beta build of flex 4 (4.0.0.10485)
    I wonder which sdk version you are using?
    Here is what I see through the debugger...
    Warning: Ignoring 'secure' attribute in policy file from http://fpdownload.adobe.com/pub/swz/crossdomain.xml. The 'secure' attribute is only permitted in HTTPS and socket policy files. See http://www.adobe.com/go/strict_policy_files for details.
    [SWF] C:\Inetpub\wwwdata\xxxxxxxxx_Application.swf - 847,661 bytes after decompression
    Error #2046: The loaded file did not have a valid signature.
    Failed to load RSL http://fpdownload.adobe.com/pub/swz/flex/4.0.0.10485/framework_4.0.0.10485.swz
    Failing over to RSL framework_4.0.0.10485.swz
    Error #2046: The loaded file did not have a valid signature.
    PS... I have tried multple PCs (XP, Vista, Server 2008) with different versions of flash player (10.0.45.2, 10.0.22.87)
    Any help appreciated.

  • CMDTUX_CAT:4382: ERROR: You do not have a valid SDK license.

    Today, I installed the Tuxedo 10.0 64-bit file on a Solaris 9 box, and got error "You do not have a valid SDK license" when used buildserver after setup. The license key file which was downloaded from this site (http://commerce.bea.com/showproduct.jsp?family=TUX&major=10&minor=0) contains the line "TYPE=RTK", and that doesn't seem to be a right type for a developer license.
    Curently, is there any other web site that will provide a developer license file for Tuxedo 10 ?
    Advice is appreciated.

    I went to the edelivery site and downloaded the SDK license, the Tuxedo 10 installation is running ok now.
    Wayne, thank you for the advice.

  • Anyone know what is Error #2046: The loaded file did not have a valid signature

    can anyone help me solve this issue? when i try to run project or make swf file
    Error #2046: The loaded file did not have a valid signature
    show up. how do i get a valid signature? or it show up because it is a trial version?
    please help me!!

    Hi Ryan,
    Please see this recent post: http://forums.adobe.com/message/3277736#3277736
    Your best option is to open your project in the shipping version of Flash Catalyst CS5 and re-publish it.  Catalyst CS5 can open projects that were created with the beta 2 release (October 2009) or newer.
    If your project won't open, then it was probably created in an earlier beta/alpha version of Catalyst.  If you know how to write Flex code, with some work you can upgrade these old projects by hand: import the project into Flash Builder 4 and then resolve any problems you encounter with compiling and running the project.
    Sorry for the trouble -- hope this info helps,
    - Peter

  • HT204053 I have an old apple id that is no longer valid coming up on my iphone and is now now allowing me access to emails because i do not have a valid password. when i click to reset the password and ask for an email - the email never arrives to any of

    i have an old apple id coming up on my iphone. i do not have a valid password and every attempt to reset it either by email or by questions does not work. When i select email to reset i do not receive an email in any of my mail boxes. when i select ask questions - my answers do not match
    please help

    If you're talking about an old iCloud ID, you have to delete the old account, provide the password for the old ID when prompted to turn off Find My iPhone, then sign back in with the ID you wish to use.  If you don't know the password for your old ID, or if it isn't accepted, go to https//appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Tap edit next to the primary email account, tap Edit, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https//appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • Pages document "could not be read" bc. it "does not have a valid format"

    The document in question was properly saved and Pages was not open when my computer hung as it was shutting down. MS Word would not quit or force-quit and I had to hard restart the computer. When I later tried to open this Pages document, which I had been working on before Word froze, Page would not open it and responded with the error message: "This document "document_name.pages" could not be read. This document does not have a valid format." When I looked at the document in question I noticed that its file size was 0KB. I have no idea why this happened, but I suppose it has to do with my computer not shutting down properly and perhaps with Word freezing. If I repair my drive permission, re-index it, anything, will it help? Just a note on the status of this machine: spotlight stopped working earlier this morning and I was waiting to finish this document before repairing disk permissions and trying to fix that issue with Spotlight.
    In the meantime I have tried various fixes. First I tried to change the file ending to .zip, unpack it and open it. Then the same, but this time I tried to view package contents. It doesn't show up in the contextual menu as even having a package to show the contents of. The file is effectively empty, but I don't know where the contents went! The funny thing is that the MS Word doc was recovered automatically. Is it possible that Pages doesn't have an auto-recovery mechanism?
    I need this file urgently, or at least the text in it. It is the bibliography of an important paper due tomorrow at 5 pm.Any advice or suggestions would be greatly appreciated.
    BTW, I have used a file-recovery program in the past. It is called "Stellar Phoenix" and it worked wonderfully to find a Word doc that I accidentally deleted. It can't find .pages document though. In order to do so, I would need to tell the program what the average file size is, as well as the header information as follows. "Header (in hexadecimal)" "At Offset (in decimal)". I have no idea what this means, but if I could insert it, perhaps it could find the lost data. Should I have it search for .pages, .zip, .xml? I'm at a loss, but I know that it doesn't recognize .pages. In the meantime, I sent a support email to them and will see what happens.
    Thank you for your help.
    David

    I can't respond before.
    When the system say that your file size is 0KB, it means that nothing was saved. Only a file descripto exists.
    So, there is nothing to recover.
    Given the time the system crashed, you may have :
    (1) a simple descriptor with nothing written
    (2) a folder with every or only some of the required files.
    In this case, Phoenix is useless : it's unable to revive a folder.
    (3) a flatfile (a compressed version of the folder named above). It's only this kind of file which Phoenix may revive.
    With a bit of luck, Phoenix would be able to revive the index.xml file which was in the original folder created in the temporary folder.
    This file starts with :
    <?xml version="1.0"?><sl:document xmlns:sfa="http://developer.apple.com/namespaces/sfa"
    or
    <?xml version="1.0"?>
    <sl:document xmlns:sfa="http://developer.apple.com/namespaces/sfa"
    The minimal size for a Pages index.xml file is : 520038 bytes.
    If you retrieve the index.xml file, we may try to rebuild an usable package.
    Ask the recovery tool to transfer the recovered file on an other media.
    If the document embedded pictures, the index will give their path and their size which may be useful to recover them.
    Yvan KOENIG (VALLAURIS, France) lundi 1 novembre 2010 10:27:44

  • Internet Connection - Your Apple wireless device does not have a valid IP.

    I just bought an Apple TimeCapsule and set it up normally, following instructions to my Arris cable network on the Videotron provider here in Quebec, Canada. The TimeCapsule did appear as a wireless device on my MacBook Pro (after updating the AirPort software from the provided CD - as was instructed). I went through the whole installation process to obtain at the end this error:
    Internet Connection - Your Apple wireless device does not have a valid IP.
    The only provided instructions were to check the cable and then contact your Internet provider. Well it seems clear to me that if I contact my provider and say that the internet connection works fine directly on my computer, also fine through my "normal" wireless router but not with my new TimeCapsule, I won't get much of a response.
    After a lot of research, a friend indicated the solution in my case.
    You have to really reset the cable modem to convince it to start giving out IPs again.
    To do this:
    1. Unplug your TimeCapsule (possibly you might have to reset to factory defaults - see the documentation)
    2. Unplug your cable modem
    3. Reset your cable modem by pressing the reset button with a pen (or something) for several seconds.
    4. Plug your cable modem back in and let it reboot/restart - until the lights are back on.
    5. Plug in your TimeCapsule
    Everything should now work and you can restart your AirPort set-up on your Mac.
    Good luck!

    My ISP is AOL.  The service is DSL via a broadband modem.  Somewhere during the setup process there appears to be a communicatiosn issue between the Airport Extreme Base Station and the DSL modem.  When I hook the DSL modem directly to my iMac I can connect to the internet without any issues. 
    I tried the factory reset and the DSL modem reboot process described in other posts and seemed very close to success...until the internet setup step.  That is where this issue first presented itself.

  • Time Capsule does not have a valid IP address

    We have 2 computers in our home office: a Win 7 desktop and an iMac.
    We have cable internet; the cable modem (Toshiba PCX2500) is plugged (ethernet) directly into the Time Capsule, which we use as our router to the two computers (also by ethernet).
    The wireless functionality of the Time Capsule has been turned off.
    We’ve been using the Time Capsule like this for the past 18 months (we purchased it new) without any problems.
    Last month, however, we began losing our internet connection regularly (about 3-4 times per day) and getting the dreaded golden flashing light (as opposed to solid green) along with the error (paraphrasing here) “the Apple Wi-Fi does not have a valid IP address.”
    We hadn’t made any changes in our hardware; it just showed up out of the blue.
    After contacting our ISP, we were advised to unplug the cable modem for about 30 seconds, then plug it back it. Most of the time this worked; if not, we had to “cycle” the Time Capsule as well.
    We’re now having to do this about 4-5 times per day.
    Sometimes the Time Capsule’s status light is still green when we have no internet connection. Out of the blue the connection just isn’t there.
    We “cycle” the cable modem and we’re back in business every time.
    Additionally, when we actually do have an internet connection, the speeds fluctuate wildly. We’re paying for 15 Mb service; as of the past 4-5 weeks, we get 15Mb about 50% of the time. The other 50% it generally averages between 3Mb and 6Mb.
    The ISP’s tech support (we’ve contacted them no less than once a week since this started) swears up and down that it’s the router, not their signal or their equipment in any way. They deny all culpability.
    We even had the ISP’s repair people come out on an occasion about 10 days ago to test the signal strength; they reported no problems. “You’ve got great signal strength to your home…” were the exact words.
    Similarly, after calling Apple on 2-3 occasions, we get the exact same response: “It’s not the Time Capsule router, it’s your ISP.”
    The last Apple technician we spoke with (yesterday) said, “I’ve been doing wireless/Internet tech support for years and I can guarantee you – 100% -- that it’s a ‘DNS caching’ issue. I’m 100% positive that’s your problem, and I’m also 100% positive it’s your ISP’s fault.”
    After contacting the ISP again we were informed that they don’t have any such caching problems.
    We’re tired and frustrated! Please help.

    I would suggest running the network via a pc for the day.. pick either your Mac or win7 pc.. you will need to do a bit of fiddling.. even better would be to just borrow a router. Or buy one on a 7day return .. !! Beg borrow.. don't steal. Just get a router other than TC. it won't take long to determine if the TC is the issue.
    IMO at 18months you are suffering failure of the TC power supply. early days but it is showing signs of delinquency. And will get worse. But another router will show it up.. if the PC has dual ethernet cards you can run ICS.. or same sort of thing on the imac to the wireless .. ie the PC or Mac becomes the router with direct connection to the cable modem. Then share internet from there.
    Once you do that for a day or two, you will quickly be able to track down if the issue is cable service/modem or the TC as router.

  • The document could not be read: the document does not have a valid format.

    I created a 10MB document in Pages about a week ago. Around that time, I reopened the document and edited it with no problems. A week later, I've tried to open the document but Pages gives me the following error:
    The document "[Document Name].pages" could not be read. The document does not have a valid format.
    I created, edited, and saved this document in Pages, so I am confused as to why Pages would be unable to re-open the file, especially as I haven't done anything to it since it worked last. I was worried that my hard drive might have corrupted the file so I ran diagnostic tests but everything was fine. I was also worried that because the file is synced with my iDisk that iDisk corrupted the file while syncing it or something but I don't know what I could do to check this. Either way, it's an important file and I need to open it: I thought that by putting it on iDisk I would have a copy in case something happened to my computer but this seems not to have helped (and maybe hurt!).
    Any file recovery tools or other ways that I can open this file?

    No, I don’t have Pages ’08 installed, but did in the past—is this a current issue?
    Pages ’09 is registered.
    I have tried dragging the file onto the app icon directly.
    To recover at least the text, I did the “rename as zip, open index.xml” trick. Of course, in order to interpret that file, you do have to understand XML (thank god I do)… but if I hadn’t, man that would’ve been a major bummer.

Maybe you are looking for

  • Java(TM) 2 Runtime Environment(build 1.5.0=09-b03) + apache-ant-1.6.5 binar

    Dear frineds, I met some probelm when i set up the dspace in fedora 6. It requres JAVA, APACHE ANT , and TOMCAT before you set up the DSPACE. The version i set up is :Java(TM) 2 Runtime Environment(build 1.5.0=09-b03) + apache-ant-1.6.5 binary distri

  • How to submit a form, but not to trigger the validations

    Hi! I have a form on a table and I have 2 radio with submit. The problem is that when I click this radios the page submit and trigger the validations, so I get the "Field1 must have some value" error. How can I solve this problem? Thanks! Best regard

  • Reconciliation and the Key Column for Oracle DB

    I have a oracle DB with the key column called employee number (ie. 12345) In the form for my reconciliation, I assigned the employee number to an extended attribute called employeeId as below. This field is defined in the User Extended Attributes obj

  • I can't delete shared photostream folder

    I have several shared photostream folders and have used this feature a lot.  However, one of my folders appears to have a glitch.  I cannot delete from either my computer or iPhone.  I am not sure what caused it.  I am listed as the photostream folde

  • Powerpoint-style bullets on mac/pc

    Hi All: Anyone have insights as to how to mimic powerpoint-style bullet behavior in Director? In other words, it's not just a matter of numtoChar, it's also the indents, etc... just like ppt, basically! I already know about this: if the platform cont