When using icepdf as embedded JPanel using new SwingViewBuilder(...).buildViewerPanel(), then SwingContoller.viewer remains null.
But this means that dialogs don't have a parent, see various openDocument methods (I'm using the variant using an InputStream), or saveFileAs().
Wouldn't it be correct to use the JPanel instance as parent in these cases?
Probably it's not a great problem when calling Resources.showMessageDialog(null, ...), I'm not sure about that?
But when saving a PDF it crashes when calling fileDialog.setVisible(true) as fileDialog has no parent in that case.
By setting the system property org.icepdf.ri.viewer.jfilechooser to true I was able to avoid this problem, so I don't know if it was introduced for that purpose? But again, the dialog doesn't have a parent and isn't modal... so from the user's perspective it's not ideal.
When using icepdf as embedded JPanel using new SwingViewBuilder(...).buildViewerPanel(), then SwingContoller.viewer remains null.
But this means that dialogs don't have a parent, see various openDocument methods (I'm using the variant using an InputStream), or saveFileAs().
Wouldn't it be correct to use the JPanel instance as parent in these cases?
Probably it's not a great problem when calling Resources.showMessageDialog(null, ...), I'm not sure about that?
But when saving a PDF it crashes when calling fileDialog.setVisible(true) as fileDialog has no parent in that case.
By setting the system property
org.icepdf.ri.viewer.jfilechooserto true I was able to avoid this problem, so I don't know if it was introduced for that purpose? But again, the dialog doesn't have a parent and isn't modal... so from the user's perspective it's not ideal.