I need to add multiple "ViewingComponents", created from different Viewers,
to a JFrame object. When I tried to do it using a JPanel to each ViewingComponent,
and then adding it to another JPanel (mainPanel), and finally adding it to a JFrame
gives me a blank window.
You can reproduce the result by doing the following simple experiment on the
ViewerFromScratch tutorial in Viewers section. Insert the following code after the
toolSystem is initialized.
Code: Select all
JPanel panel = new JPanel();
panel.add((Component) viewer.getViewingComponent());Code: Select all
frame.getContentPane().add(panel);I need to add several ViewingComponents to JFrame. Is there
another way to do it?
Many Thanks!
Karuna