标签本身之前和之后的组件

标签本身之前和之后的组件

本文介绍了JTabbedPane:标签本身之前和之后的组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这与项目为几个LaF做了类似的事情(标签左边的放大镜图标)。然而,我必须承认,我还不够了解他是如何做到的 - 而且它看起来像一个有点复杂的过程,从而物理上改变了所讨论的LaF(字节码操纵它),注入了laf -widget的东西到UI委托 - 我仍然不知道JTabbedPane或TabbedPaneUI实际上是如何调制注入该图标/按钮。

解决方案 div>

我终于问Kirill / laf-widget如何他设法在laf-widget的标签前面放置一个按钮来装饰JTabbedPanes,这是他的回复:

谢谢,基里尔!

This is similar to the question How to build a Google-chrome tabs and menubar interface in Java Swing? (I want to accomplish the same), but more to the point: How do I put components in front and behind the tabs in a JTabbedPane?

I've already come up with the buttons-idea myself, but I'd rather have a JTabbedPane, since that is really what it is, but decorated with a button or icons on the sides.

I've seen that the laf-widget project from Kirill does something like it (the magnifying-glass icon to the left of the tabs) for several LaFs. However, I must admit that I'm not yet well enough versed to understand how he does it - and also it seems like a somewhat complicated process, whereby one "physically" change the LaF in question (bytecode manipulates it), injecting the laf-widget stuff into the UI delegates - and I still don't know how the JTabbedPane or TabbedPaneUI is actually modulated to inject that icon/button.

解决方案

I finally asked Kirill of Substance LaF/laf-widget of how he manages to put a button in front of the tabs in the laf-widget that decorates JTabbedPanes, and this is his reply:

Thanks, Kirill!

这篇关于JTabbedPane:标签本身之前和之后的组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 11:36