As someone experienced in dotnet, I decided to venture into creating a Java applet
for my application. After successfully developing and signing the applet, it functioned perfectly within my application.
However, one issue perplexed me - when I attempted to embed
it into an HTML
file (in this case, a .cshtml file), a mysterious white border appeared around the applet which was not part of the HTML styling.
I made several attempts to remove the border without success. The applet solely consisted of a button adorned with an Icon
, with its border
property set to EmptyBorder
.
A screenshot of the button viewed in the browser displayed a prominent Dx, representing the Java applet, encircled by a glaringly visible white border.
The HTML implementing the applet looked like this:
<applet width="55" height="40" border="0"
codebase="~/Content/My/applet"
id="DxApplet" name="DxApplet"
code="DxApplet.class"
archive="DxButtonApplet.jar">
<param name="boxborder" value="false">
@Html.Raw(ViewBag.AppletParameters)
</applet>
In addition, I applied the following CSS, although no resolution was achieved:
applet:focus {
outline: none;
-moz-outline-style: none;
}
I also inserted the subsequent code in the init
method of the applet:
jButton1
referenced the Dx button.
jButton1.setBorder(null);
jButton1.setBorder(BorderFactory.createEmptyBorder());
Unfortunately, even this adjustment did not alleviate the issue.
I am at a loss as to what step I have missed or where I might be going wrong. Any insights would be greatly appreciated.
To provide further context, here is the concise version of the applet code: https://gist.github.com/anonymous/1f31a97b68d34a5821e9