使用 DJ Native Swing API 浏览器...如何在网页和网页中显示特定位置如何关闭浏览器的滚动条?
好吧,这就是我的问题: 我做了一个 JPanel
来打开网页,但它接缝 它没有像我想要的那样工作,所以我正在寻找一种方法来使 DJ NATIVE SWING-SWT API JWebBrowser
仅打开网站上的特定位置 我关闭垂直或水平滚动条... 那么可以这样做吗? 需要您的帮助,请回答。 附: 我尝试了这些方法来关闭滚动:
JwebBrowser.setBarsVisible(false);
JwebBrowser.setButtonBarVisible(false);
JwebBrowser.setLocationBarVisible(false);
但我认为它们与滚动无关......
ok that's my problem :
i made a JPanel
to open web pages but it seams
that it's not working like i want so im looking for a way to make the
DJ NATIVE SWING-SWT API JWebBrowser
open a specific location on web site only
and i turn off the scroll bars vertical or horziontal...
so is it possible to do this?
need your help, please answer.
P.S :
i tried these methods to turn off scrolling:
JwebBrowser.setBarsVisible(false);
JwebBrowser.setButtonBarVisible(false);
JwebBrowser.setLocationBarVisible(false);
but i think they have nothing to do with scrolling....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
滚动条是本机组件的一部分。事实上,如果您有框架集或文本组件,同一页面中可能会有很多滚动条。
隐藏滚动条的一种方法是,我认为在加载目标页面后注入 JavaScript 即可完成此任务。
Scroll bars are part of the native component. In fact, if you have frame sets or text components, there can be lots of scroll bars in the same page.
One way of hiding scroll bars is I think to inject Javascript once the target page is loaded that would do this task.
我相信这就是克里斯托弗的意思。这类似于我用来确保渲染的本机组件处于其最大尺寸的代码。我发现的 +20 足以克服任何不一致之处。
I believe this is what Christopher was getting at. This is similar to the code I used to make sure the rendered native component was at its maximum size. The +20 I found was enough of a fudge to overcome any inconsistencies.