标题为 “Intellij 插件可配置中的分隔符”。

huangapple go评论63阅读模式
英文:

Titled Seperator in Intellij Plugin Configurable

问题

我正在尝试创建一个带标题的分隔符。以下是一个示例(来自Intellij Idea Scala插件):

标题为 “Intellij 插件可配置中的分隔符”。

我尝试过使用JSeparator和TitledBorder,但两者都不是您在图片中看到的效果:JSeparator不支持文本标题,而TitledBorder会围绕整个面板,而不仅仅是顶部。

有什么办法可以创建这样的分隔符吗?提前谢谢。

英文:

I am trying to create a seperator with a title. Here is an example (from the Intellij Idea Scala plugin):

标题为 “Intellij 插件可配置中的分隔符”。

I tried both a JSeparator and a titled border, but both aren't what you can see in the picture: The JSeparator doesn't support text titles, and the titled border surrounds the entire panel, and isn't just on top.

Any idea how such separator can be created? Thanks ahead.

答案1

得分: 1

尝试使用 TitledSeparator 类。

要发现现有的任何 UI 实现,您可以使用 UI Inspector

英文:

Try with TitledSeparator class.

To discover any of the existing UI implementations, you can use UI Inspector.

huangapple
  • 本文由 发表于 2020年9月26日 02:31:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/64069612.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定