java Netbeans 调色板中的 setVisible 在哪里?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11392882/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 04:54:46  来源:igfitidea点击:

Where is setVisible in Netbeans palette?

javanetbeansnetbeans-7

提问by Fran b

I am using Netbeans on design mode for to make a gui. I am looking for a property corresponding to the setVisiblemethod of java and I can not find it.

我在设计模式下使用 Netbeans 来制作 gui。我在找setVisiblejava的方法对应的属性,找不到。

I have looked in Properties and Binding, but have found nothing.

我查看了属性和绑定,但一无所获。

At last I have written this.component.setVisible(false);in Post-Init Code in the section of the pallet code.

最后我this.component.setVisible(false);在托盘代码部分写了Post-Init Code。

Is there another way to do this?

有没有其他方法可以做到这一点?

PS: I use Netbeans 7.1

PS:我使用 Netbeans 7.1

采纳答案by James

Nope!

不!

If you're using netbeans the default is to open components as visible. As far as i'm aware this can't be changed unless you do not use a GUI builder such as netbeans.

如果您使用的是 netbeans,则默认情况下将组件打开为可见。据我所知,除非您不使用诸如 netbeans 之类的 GUI 构建器,否则这无法更改。

As you said in your question you can just simply set the component's .setVisible() parameter to false or true depending on what you would like!

正如您在问题中所说,您可以根据需要简单地将组件的 .setVisible() 参数设置为 false 或 true !

回答by Anuja Shiran

What I did was right click the label and go to Customize code and make the label visibility as false.

我所做的是右键单击标签并转到自定义代码并使标签可见性为假。