After spending some time on everything J, JFrame, JPanel, JText, JButton, etc and a bit more time understanding the ObUserAPI.getComponentFromName and inspecting a number of components I have solved this, so here is how to add components (non Java Bean) at run time to a plex panel.
My problem was to take a PDF viewer, in this case icePDF and embed it in plex. You can do similar things as well like adding Buttons, Fieilds, Labels, etc as well.
1) On a plex panel create a new region, and change the region Type to "Site". It turns out that this then implemented as a JPanel.
2) Set the Control Name property of the region to a value, eg "PDFView"
3) Create a source code object with a parameter of "ActiveXControl"
4) in the source code insert the following code.
import java.awt.* ;
import java.awt.event.*;
import javax.swing.*;
import org.icepdf.ri.common.SwingController;
import org.icepdf.ri.common.SwingViewBuilder;
import org.icepdf.ri.util.PropertiesManager;
String filePath = "C:/PDFDocs/Sample.pdf";
// build a controller
SwingController controller = new SwingController();
// Build a SwingViewFactory configured with the controller
SwingViewBuilder factory = new SwingViewBuilder(controller);
// Use the factory to build a JPanel that is pre-configured
//with a complete, active Viewer UI.
JPanel viewerComponentPanel = factory.buildViewerPanel();
// add copy keyboard command
//ComponentKeyBinding.install(controller, viewerComponentPanel);
// add interactive mouse link annotation support via callback
controller.getDocumentViewController().setAnnotationCallback(
new org.icepdf.ri.common.MyAnnotationCallback(
controller.getDocumentViewController()));
// Create a JFrame to display the panel in
//JFrame window = new JFrame("Using the Viewer Component");
JPanel window = (JPanel) ObUserAPI.getComponentFromName(getFunction(), new ObCharFld("*Current"), &(1:).toString());
window.add(viewerComponentPanel, BorderLayout.CENTER);
// Open a PDF document to view
controller.openDocument(filePath);
4) The important lines are those marked in bold
5) In the initialisation of your function, call the source Code object passing on the control name parameter, eg PDFView
You now have a PDF Viewer integrated to a Plex Panel