Navigating to external URL with a button

Hi all, I’m wanting to navigate to an external URL that isn’t a route in my application. The Anchor element provides this functionality, however I don’t want a link, I instead want a Button. Is there any way I can attach an Anchor element to a Button? How would you guys go about achieving navigating to an external URL with a Button?

I’ve attached a screenshot of the Button I want to use to navigate to the external URL, and the Anchor element that I have in place now that actually does that.
unknown.png

You could simply style an Anchor as a Button

No need for styling I think.

https://stackoverflow.com/questions/73395474/vaadin-23-open-new-browser-tab-with-url-on-button-click/73398202?noredirect=1#comment129657847_73398202

Button button = new Button("Click Me", e -> {
    UI.getCurrent().getPage().open("https://stackoverflow.com", "_self");
});
add(button);

Thank you both!