blimmer
blimmer

Reputation: 2486

Prevent SWT Browser Widget modal dialog popups

On my application, I'm using the SWT browser widget to check for network connectivity. The reason for this is long, but long story short I HAVE to use the browser widget to check for connectivity. Unfortunately, on Mac and Debian, I get a modal dialog that pops up and tells me that the page load failed.

This message is being passed from the native browser and the SWT browser widget is passing this message through, displaying it as a modal dialog box. I need to intercept this message and handle it, displaying a more useful message to users in the event of a "Page load failed". Here's a screenshot of what it looks like:

SWT Browser Widget Modal Dialog error

Does anyone know how to intercept these messages instead of displaying them to the user?

Upvotes: 1

Views: 742

Answers (1)

Sorceror
Sorceror

Reputation: 4843

Few days ago, there was almost same question How to detect internet connection with SWT browser (or handle server not available). Check the answer for code, which might help you..

Upvotes: 1

Related Questions