简体   繁体   English

我们该如何动词?

[英]How can we make a movable sentence?

例如,我想在我的主框架中使用一个类似于“系统”的句子,它可以从框架的左侧移动到框架的右侧或向上移动到向下。我该怎么做?

I think you are trying to implement a sliding text. 认为您正在尝试实施滑动文本。 You may use the Timer class to set your label's(or whatever the component is) position. 您可以使用Timer类来设置标签(或组件的位置)的位置。 Every time the Timer ticks, you may increment the position or decrement it, the rest is up to your choice. 每当计时器计时时,您可以增加或减少位置,其余的取决于您的选择。

And I also must say, that you should be more clear when asking questions. 我还必须说,在提问时您应该更加清楚。

I guess you are looking for a mqrquee component in Swing. 我想您正在Swing中寻找一个mqrquee组件。 Here is a simple3 example of how to rite one in swing. 是一个简单的例子,说明如何挥杆动作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM