Suppose I've done this -
SwingNode deviceView = new SwingNode();
JDesktopPane desktop = new JDesktopPane();
// Add elements to desktop
deviceView.setContent(desktop);
Is there a way remove desktop from deviceView? The best way I can come up with is -
deviceView.setContent(new JPanel());
But is there a way to simply remove it?
As noted in the comments I've tried deviceView.setContent(null); which appears to be bugged.
setContent(null)doesn't work? - James_DsetContent(null)(you can try it with aJButtonwhich is not clickable anymore) but theSwingNodedoes not get repainted somehow. - DVarga