// Create an area that shows the various input events the web browser can send.
JPanel southPanel = new JPanel(new BorderLayout());
southPanel.setBorder(BorderFactory.createTitledBorder("Key and mouse events from the web browser"));
final JTextArea textArea = new JTextArea();
textArea.setEditable(false);
nativeComponent.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
textArea.append(e.toString() + "\n");
}
@Override