JButton文本没有出现 [英] JButton text not appearing
问题描述
您好,
我正在尝试将JButton添加到我使用Netbeans制作的旧桌面应用程序中。
我想要这个按钮显示一些标题,所以我在对象的属性中添加了它,使用Netbeans IDE上的jbutton的属性窗口,属性text。
无论我做什么,调整按钮大小,改变属性或其他什么,标题不会出现。
任何人都可以解释一下可能的原因是什么?
并且任何人都能解释我为什么其他jbuttons也与IDE中定义的文本属性会正确显示其标题吗?
谢谢
Hello,
I am trying to add a JButton to an old desktop application I made using Netbeans.
I want this button to show some caption, so I added it in the properties of the object, using the properties window of the jbutton on the Netbeans IDE , property "text".
No matter what I do, resize the button , alter properties or whatever,the caption doesn't appear.
Can anyone explain me what could be a possible reason ?
And can anyone explain me why other jbuttons also with text properties defined in the IDE correcly show their captions?
Thank you
推荐答案
在另一个论坛上找到解决方案。它似乎是一个NetBeans错误,因为我几乎可以肯定。在设计模式下设置text属性时,最好清理项目:否则编译不能正常工作。
Found solution on another forum. It seems to be a NetBeans bug , as I was almost sure. When you set the text property in design mode, then you better clean your project : maybe the compilation doesn't work properly otherwise.
这篇关于JButton文本没有出现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!