How to open a window as Tab from a sub window ?

I mean, I want to create a button on a sub window and if I click it, it can open a new external window. How Can I do?

I tried

getMainWindow().executeJavaScript(“‘’, ‘_blank’)”);
" It shows sub-window cannot execute JavaScript
getMainWindow().open(new ExternalResource(LinkButton.this.url), “_blank”);
also not work.

What should I do?

Thank you very much!