Adding a Swing component to HtmlPanel

  • How can I add a Swing component to HtmlPanel?

    I tried something like
    htmlPanel.add(new JButton("ABC")); or
    htmlBlockPanel.addComponent(new JButton("ABC")); or
    rbBlock.addComponent(new JButton("ABC"));
    but does not work. I have not seen anything on HtmlPanel.

    Thank you

    • That component doesn't allow it. You should be able to put the HtmlPanel on top of another panel and add components around it, though. If you want to show something on top of HtmlPanel, I guess you could layer it.