如何清理面板中两点之间的线

发布于 2024-10-03 10:23:01 字数 134 浏览 0 评论 0原文

你好 我有一个面板,您可以在其中放置一些点,然后通过单击按钮,将在点之间绘制线条。还有一个按钮,当您单击它时,所有线条将被删除,点将显示在面板上(只是删除了行)我该怎么做。 有什么特殊的方法吗? 谢谢

我与 netbeans 合作,AWT

Hi
I have a panel that you can put some points one it and by clicking on a button ,lines will be drawn between points.also there is a button that when you click on it ,all lines will be deleted and points will be on your panel (just lines are deleted) how can I do this.
is there any special method for this?
thanks

I work with netbeans ,AWT

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

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

发布评论

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

评论(1

雾里花 2024-10-10 10:23:01

选项一:再次绘制线条,只是这次使用“背景颜色”。如果您的背景不是纯色,这将不起作用。

选项二:重画一切,不画线条。效率不是很高,但如果你有复杂的背景(文本、图像等),它确实是你唯一的选择。

Option one: Draw the lines again, only this time in the "background color". This won't work if your background isn't a solid color.

Option two: Redraw Everything, without the lines. Not very efficient, but it really your only option if you have a complex background (text, images, etc).

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