Lwuit-设置标签的代号

发布于 2024-12-10 06:55:50 字数 152 浏览 1 评论 0原文

我是 j2me 的新手,我正在尝试开发一个应用程序。有一个“Form”,“Form”由一个 Label 和一个 TextBox 组成。我应该根据屏幕尺寸在 Label 上启动股票行情。请告诉我该怎么做。 提前致谢

I am new to j2me and i am trying to develop an application.There is a single ´Form´ and ´Form´ consists of a Label and a TextBox. I should start ticker on the Label depending on the screen size.please let me know how do i do it.
Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

岛徒 2024-12-17 06:55:50

最简单的解决方案是:

if (label.getPreferredW() > Display.getInstance().getDisplayWidth()) {
            label.startTicker();
}

The easiest solution is:

if (label.getPreferredW() > Display.getInstance().getDisplayWidth()) {
            label.startTicker();
}
任谁 2024-12-17 06:55:50

如果你想强制它开始计时,你必须使用 startTicker() 方法。当您希望其停止时,请使用 stopTicker

在 Shai 的博客中,您可以了解有关更复杂组件中的股票代码的更多信息:

http://lwuit.blogspot.com/2008/06/implementing-selected-item-ticker-in.html
http://lwuit.blogspot.com/2009/10/tickering-everywhere.html

If you want to force it to ticker you must use startTicker() method. When you want it to stop, use stopTicker.

In Shai´s blog, you have more info about ticker in more complex components:

http://lwuit.blogspot.com/2008/06/implementing-selected-item-ticker-in.html
http://lwuit.blogspot.com/2009/10/tickering-everywhere.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文