Very small program will not show any PDF!

Here is my program. I must do something wrong, but I cannot see what.
The JPanel remains gray. Any idea?. Thanks.
public class PDFViewer extends JFrame
public PDFViewer()
try
Container c = getContentPane();
Document document = new Document();
document.setUrl(new File("f.PDF").toURL());
JPanel area = document.getPeer();
area.setVisible(true);
c.add(new JScrollPane(area));
setSize(200, 250);
catch (Exception ex) {ex.printStackTrace(); }
public static void main(String[] args)
PDFViewer v = new PDFViewer();
v.setVisible(true);
}

Thank you for the answer. By testing your advice, I did the test on another pdf and it worked. In fact, I have a pb with the first pdf I used. I cannot view it with pdfgo library, but this pdf will show nicely with acrobat reader.
So now, I have a different problem.
Anyway, thank you.

Similar Messages

  • Just installed java3d but the demo programs will not show any graphics

    Hi,
    I just installed java 3D and when I run a demo program
    like "HelloUniverse" a window pops up but it is blank. Nothing is
    happening.I cant figure out what is going wrong.
    Any help is appreciated,
    Thanks.

    you might want to seek help in the 3D forum....

  • After reloading adobe creative suite cs3 on my mac 10.4.11 acrobat will not open any pdfs it previously opened. help!

    after reloading adobe creative suite cs3 on my mac 10.4.11 acrobat will not open any pdfs it previously opened. help!

    hello.   hey, thanks very much for writing back.  i got some good info with a search or two.  (info about what regedit is and what corresponds to it in OS X -- regedit allows you to edit "preference" keys for individual programs,  OSX's equivalent for these keys are the .plists in User & System: Preferences and Application Support)
    what i ended up doing was uninstalling Premiere Pro (not the suite, just PPro).   Then i deleted a few preference files:
    from User /Preferences/Adobe:
    com.adobe.AdobePremierePro.plist
    com.Adobe.Premiere Pro.5.0.plist
    and from System Preferences:
    the file:  Adobe Premiere Pro Prefs
    and..
    /.../Premiere Pro/5.0/...
    AMEPrefs.xml     (i noticed that there's also a preference file in Media Encoder's own folder so i didn't sweat this one)
    Debug Database.txt
    Placeholder Preset.epr
    PostEncodeCmds.pref
    PresetCache.xml
    Trace Database.txt
    NOTE:
    of course i don't know if deleting any files beyond the 2 .plist files in User Prefs was necessary, but...  it seems to have worked.
    I then reinstalled Premiere Pro CS5, and fired up an old project and i've got playback of HD and DV files, and snappy editing and rendering,  so hopefully i'm good to go.   I'm just going to stick with v5.0.0 because i actually don't remember ever having any trouble with it, and i don't remember v5.0.4 adding anything i was 'missing' or 'needed'
    hopefully, this thread will be useful for any future folks that run into trouble - and it's got a solution for both Windows and OS X
    happy editing,
    peace

  • Reader X will not open any PDF

    I am running Windows XP SP3 and have just insta
    lled Reader 10.1.0 and it will not open any PDF's
    created in earlier versions, and just gives me a Microsoft error messag
    e any help would be appreciated.  have tried repairin
    gg and uninstalling and re-installing.

    Have the same problem and, while not a total solution, offer a work-around that might help you temporarily.
    And, yes, I'm running XP SP3 as well, so.....
    1.) Find the folder where the Reader X lives (on my system - /Windows/Program Files/Adobe/Reader 10.0/Reader).
    2.) Locate AcroRd32 - the file with the Adobe icon.
    3.) Right click and go to Properties.
    4.) Set Campatibility to *Windows2000*
    Reply "OK" to everything and try opening your file(s) again......
    Now, you'll still get the Error message initially, and intermittantly, but the PDF window won't close; you can read the document and saving the file still works.
    Again, it's not a fix, kinda cludgy, but it got me back on track even tho the message popping up is an annoyance.
    Maybe Adobe will fix it as I've seen several folks here with similar experiences.
    Happ New Year, btw!!

  • Bookmarks toolbar Firefox 10.0.2/OSX 10.6.8 - gone. View Toolbars Bookmarks Toolbar - checked. Dragging URL's to bookmarks toolbar area no longer works. Gray area appears/disappears when checked/unchecked but will not show any or accept new bookmarks.

    My bookmarks toolbar in Firefox 10.0.2 Mac OSX 10.6.8 suddenly disappeared. View>Toolbars>Bookmarks Toolbar is checked. Dragging URL's to the bookmarks toolbar area no longer works. The gray area appears and disappears when checking/unchecking under View/Toolbars menu, but will not show any or accept addition of bookmarks.

    Make sure that toolbars like the "Navigation Toolbar" and the "Bookmarks Toolbar" are visible: "View > Toolbars"
    *Open the Customize window via "View > Toolbars > Customize"
    *Check that the "Bookmarks Toolbar items" is on the Bookmarks Toolbar
    *If the "Bookmarks Toolbar items" is not on the Bookmarks Toolbar then drag it back from the toolbar palette in the customize window to the Bookmarks Toolbar
    *If missing items are in the toolbar palette then drag them back from the Customize window on the toolbar
    *If you do not see an item on a toolbar and in the toolbar palette then click the "Restore Default Set" button to restore the default toolbar set up
    *http://kb.mozillazine.org/Toolbar_customization
    *https://support.mozilla.org/kb/Back+and+forward+or+other+toolbar+items+are+missing

  • OS is Mountain Lion, upgraded no problems, used an external Hard drive for my time machine, now my iPhoto will not show any of my photo's or ay new ones I import! Help please!!

    OS is Mountain Lion, upgraded no problems, used an external Hard drive for my time machine, now my iPhoto will not show any of my photo's or ay new ones I import! Help please!!

    Do you get this window when you hold down the Command+Option keys and launch iPhoto?
    If not then you're not holding down both keys long enough.
    OT

  • How do i Restore Preview as my default viewer when using Safari,seems adobe has hi jacked Safari,if i uninstall adobe safari will not open any pdf files.

    How do i restore Preview as my default viewer.
    Seems adobe has hi-jacked Safari and and opens using abobe not preview.
    Have uninstalled adobe but safari then will not display any pdf files.
    Preview still works fine to view existing downloaded files.

    Niac --
    What kind of files?  PDFs?  or Others as well?
    If you want Preview to open all PDFs, then find a PDF on your HD.
    Highlight it, and then press the Apple/Comand key along with th letter " i " key.
    When the window comes up, look down to the "Open with" line, and change it from Adobe to Preview.
    Then look slightly below, and select "Change All."
    Now, all PDFs should open with Preview.

  • Safari 7.0.5 Will not show a pdf. I Can't view, save, download or print a PDF. Just get a black page.

    Safari 7.0.5 Will not show a pdf. I Can't view, save, download or print a PDF. Just get a black page.

    Macintosh HD > Library > Internet Plug-ins
    Look for these two files.
    AdobePDFViewerNPAPI.plugin
    AdobePDFViewer.plugin
    Right click those and select “Move To Trash’.

  • Firefox will not open any pdf files

    FF will not open any pdf files with built in viewer or adobe. I have set applications in all different ways with no luck. PDF works with IE.
    I have ff 33.1.1 and Win 7 and i have tried all suggestions concerning pdf. I even downloaded ff again, uninstalled oldff, and installed new. no luck. all i get is a pop up stating ...download is in progress, please wait.... but it never loads. started after last update. Is ther a way to delete the last update to firefox?
    thanks

    Hello,
    In order to change the default reader for PDF files (to not open PDF files with Firefox's internal PDF reader), follow these steps:
    #Click the menu button [[Image:New Fx Menu]] and click Options (Preferences for Linux and Mac).
    #In the Options (Preferences for Linux and Mac) window, select the ''Applications'' panel.
    #In the ''Search'' field, type ''PDF''. You should find ''Portable Document Format (PDF)''.
    #On the right hand side you should find an ''Action'' column. Use that to select your favorite PDF reader. In order to view PDF files in Firefox, choose ''Preview in Firefox''.
    Did this fix your problems? Please report back to us!
    Thank you.

  • TS1398 My iphone 4 will not show any networks, when there is wifi, what do i do?

    I ordered my iphone 4 from ebay, and t is unlocked. its really new but fror some reason will NOT connect to wifi. it wont even show other networks when there is wifi. any solutions to my problem??

    I have this Exact same issue, I bought it from a friend though, and it will not show any networks to choose while I am at home and my computer and other phones are connecting perfectly to my wifi. I have tried to reset the network settings, I just restored the whole phone when I transferred my info to it. If anyone knows of anything else please advise.

  • HT4060 My Ipad air  the battery is dead will not show any signs  tried all cables and correct 12w charger  any ideas?

    My Ipad air the batterry is dead and will not show any signs, tried all cables and correct 12w charger, any ideas ?

    Does you used lighning official cable ?
    If yes  :
    -Try to to wash the connector with a brush and little bit of alcohol by paying attention !
    OR
    - Restore youre iPad

  • My iphone 4 will not show any wifi networks

    my phone will not show any wi-fi networks i'm not sure whats wrong, i tried restoring multiple times nothing changed.. im not sure what to do.

    I have this Exact same issue, I bought it from a friend though, and it will not show any networks to choose while I am at home and my computer and other phones are connecting perfectly to my wifi. I have tried to reset the network settings, I just restored the whole phone when I transferred my info to it. If anyone knows of anything else please advise.

  • I installed adobe reader but it will not display any pdf

    I installed adobe reader but it will not display any pdf

    What version of Reader in what OS? Does the program open? What happens when you use File->Open to open a pdf file on your computer? Any error messages?

  • ATV2 - Will not show any video w/o reboot

    I have 2 Apple TV devices (both are 2nd generation).
    One of them is fine.  But the other one will not show a signal after about a day of no use. I have to unplug the power, then plug it back in to get a signal out of it.
    The other day, I watched the LED light as I was trying to turn it on. It just flashes when I press the power button on the remote, so it is indeed getting my remote commands. After I try to turn it on about 5-7 times, the LED stays lit. But the TV still says "no signal".  If I unplug it from the power, then plug it back in, only then it comes back up and seems to work ok.  But if we don't use it again for about a day, when we come back to it.. we get the same thing and it needs to be unplugged again and plugged back in (power).
    I tried to reset to factory settings, but that didn't help.
    This started happening after the 4.2 update (I think that was about 3 updates ago).
    Any ideas I can try?
    Thanks in advance.

    Hi
    As I see this I mostly suspect one of three reasons
    • iMovie Event's and or iMovie Project's folders have/has been moved/altered on DeskTop/Finder - DON'T - but try to move everything back exactly where it was
    • iMovie pref. file got corrupted (very easily done by e.g. Panic/Force halt's) - trash it when iMovie is NOT running
    • Material used in Movie Project is located on device not accessibly any longer. E.g. one used audio from Audio-CD then ejected the CD. iMovie (Project's) Don't do ANY copy of the used material - only point's to where it found it and if external hard disks, Audio-CDs etc are disconnected then the iMovie Project get's lost and it has no function to try to find it (at all).
    Yours thinking - bengt W

  • Safari Will Not Show Any Cached Web Pages From Any Website.

    Basically my problem is exactly as stated in the heading. Any web page I try to view a cached snapshot of returns: "Your search did not match any documents." Up until a week or so ago, I could cache any web page, unless it truly was to old to display a cached snapshot. It would never highlight the key words typed in the search bar when the cached option was selected, but it always showed the page. Now it will not cache any page.
    The links are not broken, because I can search every page from my desktop computer with no problems. It's only on my iPhone. I could try to view 5,000 cached web pages, and every one of them returns the same message: "Your search did not.....". I've cleared my history, cache, cookies, as well as log off, and power down the phone, and turn it back on. Nothing fixes the issue. I have the latest update, and have no other problems with my phone at all. Has anyone else had this problem? Any solutions? This is very frustrating. A google search turned up nothing. This has to have happened to more people than just me. Hopefully I don't have to use the cache feature to find the answer:)

    I guess I'll join another forum, were there's people smart enough to help.

Maybe you are looking for

  • Unique Album Art Question

    I have spent days scouring these message boards to make sure I wasn't asking a repeat question. I am running iTunes 7.3.2 and I'm having a problem with album art making it to my video iPod. My iPod will not display album art for half of my music that

  • Why has my computer slowed after updating with mavericks

    i updated to mavericks .since i did this my computer has slowed and i am also getting problems with streaming can i revert back to mountain lion.

  • How do I upgrade to lion?

    Currently use snow leopard.  Computer won't support mountain lion (has Intel Core duo processor, but needs "core 2" to run mountain lion). Don't want to scrap computer yet and want to upgrade to lion, but can't find anywhere to purchase lion to upgra

  • Quick Outline in EA3

    The quick outline does still not appear to be working properly for me in EA3 If i open a package from a FIND DB object search and choose quick outline all i get is the package name listed at the top of the outline with nothing below it. If i open a p

  • I want to delete first two zeroes in pranr(12)

    Hi lifnr(char,10),parnr(char,12) i am getting problem while comparing  lifnr, parnr . I already   used 'CONVERSION_EXIT_ALPHA_OUTPUT'. but still it is not working. SELECT LIFNR          FROM LFA1          INTO TABLE I_LFA1          FOR ALL ENTRIES IN