简体   繁体   English

如何在NetBeans 6.5中删除buttonGroup

[英]How to delete buttonGroup in netbeans 6.5

  1. I'm new to Netbeans I played around with Matisse GUI Editor and would like to delete a buttonGroup with no reference. 我是使用Matisse GUI Editor玩过的Netbeans的buttonGroup ,想删除一个没有引用的buttonGroup I tried the refactor/safe delete action but no way to do so! 我尝试了重构/安全删除操作,但没有办法! That's so bad. 太糟糕了 Is there a trick or do I have to restart everything? 有技巧吗,还是我必须重新启动一切?

  2. By the way, I find it so crazy not to be able to edit the generated grey source code there must be a trick or something? 顺便说一句,我发现无法编辑生成的灰色源代码实在是太疯狂了,这一定有窍门吗? How do Java hardcore GUI developers handle this then? 那么,Java硬核GUI开发人员将如何处理呢?

Thanks for your help! 谢谢你的帮助!

SR SR

  1. For the components that you are not able to see in GUI builder, take a look at "Inspector" window, right click on the component and click on delete. 对于您在GUI构建器中看不到的组件,请查看“检查器”窗口,右键单击该组件,然后单击“删除”。 The window should be to the left-bottom of your screen by default. 默认情况下,该窗口应位于屏幕的左下方。

  2. It's a trade off IMHO :) You get the great GUI builder and you are not allowed to arbitrarily change the generated code. 这是一个权衡的恕我直言:)您可以使用出色的GUI构建器,并且不能随意更改生成的代码。 Since it will cause the GUI builder not to understand the code. 因为这将导致GUI构建器无法理解代码。 For the common task like specifying parameter to constructor of component at object creation, you can always go to 'Code' group at 'Properties' window. 对于像创建对象时为组件的构造函数指定参数这样的常见任务,您始终可以在“属性”窗口中转到“代码”组。 There are some other options such as 'Pre-creation Code' and 'Post-creation Code' too :) 还有其他一些选项,例如“创建前代码”和“创建后代码” :)

Image: 图片: http://lh5.ggpht.com/_5XDoB4MglkY/SYSIp5flFaI/AAAAAAAAE-E/ZIR4ZBLPUz4/s800/NB2.jpg

I had the same problem, it turns out i was trying to delete it from the wrong window pane. 我有同样的问题,原来我正在尝试从错误的窗格中删除它。

I was in the 'Navigator' pane rather than the 'Inspector' pane, if you highlight the button group or any other invisible component here in Netbeans and hit DELETE then it will delete it without problems or leaving unecessary code in the Source view. 我在“导航器”窗格中而不是在“检查器”窗格中,如果您在Netbeans中突出显示按钮组或任何其他不可见组件,然后单击DELETE,则它将毫无问题地删除它或在Source视图中保留不必要的代码。

Hope this helps anyone who might come across this problem again! 希望这对可能再次遇到此问题的人有所帮助!

View the inspector window in 'design' mode and expand all components from the root. 在“设计”模式下查看检查器窗口,然后从根目录展开所有组件。 Deletion reflects directly in 'source' mode. 删除直接反映在“源”模式下。

Doesn't work - there is no delete option. 不起作用-没有删除选项。 Having it selected and going to Edit -> Delete does nothing. 选择它并进入“编辑”->“删除”不会执行任何操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM