Try this Java code (with the JPedal jar on your classpath).
Viewer viewer = new Viewer(rootContainer, null);
ViewerFX viewer = new ViewerFX(rootContainer, null);
Now the object has been set up correctly it can be added to your application like any other swing component.
Here is the simple Swing application I made, demonstrating how this can be done.
If you wish to remove some or all of the viewer user interface that is also possible by simply setting the preferences to display the desired components and passing in the path (on the file system or within the jar by adding “jar:” to the start of the path) to this file in the Viewer(Container display, String PreferencesPath) constructor.