是否可以从我的应用程序中清除 Netbeans 输出窗口或暂时禁用所有输出?

发布于 2024-07-24 03:31:53 字数 485 浏览 4 评论 0原文

一些背景:

我创建了一个 Swing 应用程序,它使用 Substance LaF (再次感谢,Kirill!)

不幸的是,Swing 在 EDT 之外的某个位置创建了一个面板,因此每次我启动应用程序时都会导致来自 Substance 的异常消息。 这个异常本身就很好,我已经避免了创建令人讨厌的多线程 GUI 错误,但我经常错过重要的输出,因为当我的应用程序执行任何实际工作时,输出窗口已经很混乱。

最简单的方法是根据我的个人需求修补物质源,但我宁愿保持不变。 这就是为什么我想知道...

  1. 是否可以通过调用应用程序中的方法或延迟 Ant 任务之类的方法以编程方式清除输出窗口?
  2. 或者,我可以暂时禁用应用程序的任何输出,包括异常消息吗?

Some background:

I've created a Swing application which uses the Substance LaF (Thanks again, Kirill!)

Unfortunately Swing creates a panel somewhere outside the EDT thus leading to an exception message from Substance every time I start my application. By itself this exception is great, I already saved me from creating nasty multithread GUI bugs, but I often miss important outputs because the output window is already cluttered when my application does any real work.

The easiest way would be to patch the Substance source for my personal needs, but I'd rather leave it untouched. That's why I want to know...

  1. Is it possible to clear the output window programmatically, either by calling a method from my application or something like a delayed Ant task?
  2. Alternatively, can I temporarily disable any outputs from my application, including exceptions messages?

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

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

发布评论

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

评论(1

神经暖 2024-07-31 03:31:53

在这里,您尝试调整输出窗口的默认行为,该窗口是 NetBeans IDE 的一部分。 您将需要使用相关的 NetBeans API。 请查看 OutputWriter 和 OutputEvent

HTH。

Here you are trying to tweak the default behavior of the Output Window which is a part of the NetBeans IDE. You will need to use the relevant NetBeans APIs. Please take a look at OutputWriter and OutputEvent

HTH.

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