简体   繁体   English

空的 Netbeans 7 调色板? 如何恢复?

[英]Empty Netbeans 7 palette? How to restore it?

I use Netbeans 7 on Kubuntu 12.04.我在 Kubuntu 12.04 上使用 Netbeans 7。 I start Netbeans like this:我这样启动 Netbeans:

netbeans --cp:a /usr/share/java/xercesImpl.jar & 

cause of known issue with Netbeans and Kubuntu 12.04. Netbeans 和 Kubuntu 12.04 已知问题的原因。 In the middle of my project my palette with Swing components just .. disappeared!在我的项目中间,我的带有 Swing 组件的调色板……消失了!

I see only sth like this:我只看到这样的东西:

在此处输入图片说明

How to restore default Netbeans palette?如何恢复默认的 Netbeans 调色板?

I checked Ctrl+Shift+8 shortcut but with no results - the problem is still the same.我检查了 Ctrl+Shift+8 快捷方式但没有结果 - 问题仍然存在。

**EDIT: I dont know what I did but now I see ONLY EMPTY palette :( : ** **编辑:我不知道我做了什么,但现在我只看到空调色板:(:**

在此处输入图片说明

I also tried this:我也试过这个:

1) I cd'ed to /home/mazix/.netbeans/7.0/config/Windows2Local/Groups/commonpalette , ls'ed and saw only this: CommonPalette.wstcgrp 1) 我 cd 到/home/mazix/.netbeans/7.0/config/Windows2Local/Groups/commonpalette , ls'ed 并且只看到这个: CommonPalette.wstcgrp

2) cd'ed to /home/mazix/.netbeans/7.0/config/Windows2Local/Components and saw this: 2) cd 到/home/mazix/.netbeans/7.0/config/Windows2Local/Components并看到:

AnalyzerTopComponent.settings output.settings AnalyzeStackTopComponent.settings projectTabLogical_tc.settings breakpointsView.settings projectTab_tc.settings CallHierarchyTopComponent.settings properties_1.settings callstackView.settings properties.settings CommonPalette.settings refactoring-preview.settings ComponentInspector.settings AnalyzerTopComponent.settings output.settings AnalyzeStackTopComponent.settings projectTabLogical_tc.settings breakpointsView.settings projectTab_tc.settings CallHierarchyTopComponent.settings properties_1.settings callstackView.settings properties.settings CommonPalette.settings refactoring-preview.settings ComponentInspector.settings
ReporterResultTopComponent.settings CssPreviewTC.settings ReporterResultTopComponent.settings CssPreviewTC.settings
resultsView.settings debugging.settings resultsView.settings 调试.设置
search-results.settings DeclarationTopComponent.settings search-results.settings 声明TopComponent.settings
services.settings evaluator.settings services.settings evaluator.settings
sessionsView.settings favorites.settings sessionView.settings 收藏夹.设置
sources.settings find-usages.settings source.settings find-usages.settings
StyleBuilderTC.settings gsf-testrunner-results.settings StyleBuilderTC.settings gsf-testrunner-results.settings
svnversioning.settings hgversioning.settings svnversioning.settings hgversioning.settings
synchronize.settings JavadocTopComponent.settings同步.settings JavadocTopComponent.settings
TaskListTopComponent.settings localsView.settings TaskListTopComponent.settings localsView.settings
TerminalContainerTopComponent.settings MultiView-java#007Cform#007C_1.settings threadsView.settings MultiView-java#007Cform#007C_2.settings versioning_output.settings MultiView-java#007Cform#007C_4.settings watchesView.settings MultiView-java#007Cform#007C.settings Welcome.settings navigatorTC.settings TerminalContainerTopComponent.settings MultiView-java#007Cform#007C_1.settings threadsView.settings MultiView-java#007Cform#007C_2.settings versioning_output.settings MultiView-java#007Cform#007C_4.settings watchView.settings MultiView-java#007Cform#007Cform#007 Welcome设置导航器TC.settings

and didnt see any _hidden files :(并没有看到任何 _hidden 文件:(

Open NetBeans and choose Window -> Palette It will appear but it will be empty because you didn't choose a GUI class yet. 打开NetBeans并选择Window - > Palette它将出现,但它将为空,因为您尚未选择GUI类。

To fill the palette with the GUI components like labels, follow these steps: 要使用标签等GUI组件填充调色板,请按照下列步骤操作:

  1. Create a new project . 创建一个新项目。

  2. Right click in the package name or project name, and choose New -> Other... 右键单击包名称或项目名称,然后选择New - > Other ...

  3. In the New File dialog box, choose the "Swing GUI Forms" from category and the "JFrame" Form file type sub window. 在“新建文件”对话框中,从类别中选择“Swing GUI窗体”,然后选择“JFrame”窗体文件类型子窗口。 Click Next. 点击下一步。

  4. Enter name lets say "MyGUI" for the new the class which you created now. 输入名称让我们为您现在创建的新类说“MyGUI”。

  5. The palette window is now full with components like labels, text,checkboxes, ... 调色板窗口现在已满,包含标签,文本,复选框等组件......

if not appear yet make sure to press "Design" button in the upper of the GUI class bar "MyGUI"class 如果还没有出现,请确保按GUI类栏“MyGUI”类的上方的“设计”按钮

I got the same issue and this work for me window -> reset window. 我得到了同样的问题,这对我工作窗口 - >重置窗口。 hope it work for you :) 希望它对你有用:)

I think the same problem occur here.Check this solution .it may helpful to you. 我认为同样的问题发生在这里。检查这个解决方案。它可能对你有帮助。

This steps for restore the default palette? 此步骤用于恢复默认调色板?

  1. Exit the IDE. 退出IDE。
  2. Go to your user directory and go down to config/Palette subdir. 转到您的用户目录,然后转到config / Palette subdir。 In this directory, the files or directories deleted from the default palette content are presented as empty files with _hidden suffix in their names. 在此目录中,从默认调色板内容中删除的文件或目录将显示为名称中带有_hidden后缀的空文件。
  3. Delete these _hidden files to let the palette categories and items appear again in the IDE. 删除这些_hidden文件,让调色板类别和项目再次出现在IDE中。

I think this will help you 我想这会对你有所帮助

Do one thing, simply right click on your netbeans project and then open it. 做一件事,只需右键单击您的netbeans项目,然后打开它。 It resolves the problem. 它解决了这个问题。 You will observe if u open a new project the palette is there, so just copy the project with a different name, its will solve your problem. 您将观察是否打开了一个新项目,调色板在那里,所以只需使用不同的名称复制项目,它将解决您的问题。

In my case after creating a new project without a default constructor, the search box at the palette holds a single character ie '='. 在我的情况下,在创建没有默认构造函数的新项目之后,调色板上的搜索框包含单个字符,即'='。 this results in an empty palette too. 这也导致了一个空的调色板。

In that case the solution is obvious: just delete the content of the search input. 在这种情况下,解决方案显而易见:只需删除搜索输入的内容即可。 It puzzled me for a moment, though, not noticing the search input field content. 不过,我感到困惑的是,没有注意到搜索输入字段的内容。

I had the same situation with my netbeans. 我的netbeans也有同样的情况。 The only solution I did was to backup my project folder (saving it to other drive). 我做的唯一解决方案是备份我的项目文件夹(将其保存到其他驱动器)。 Then re-install the netbeans. 然后重新安装netbeans。 Afterwards I re-paste the project folder at the directory and re-open it. 然后我将项目文件夹重新粘贴到目录并重新打开它。

Right-click mouse button at palette box. 在调色板框中右键单击鼠标按钮。 Choose command "reset palette". 选择命令“重置调色板”。

I encountered the same problem. 我遇到了同样的问题。 Just check the bottom of the palette to see if there is a search box open. 只需检查调色板底部,查看是否打开了搜索框。 If there is, close it. 如果有,请关闭它。 Then the palette will be available once again. 然后调色板将再次可用。

So, nothing suggested here worked for me, I am leaving my solution.所以,这里没有任何建议对我有用,我要离开我的解决方案。 You create the project, name it.您创建项目并为其命名。 Create a package.创建一个包。 Click on the package with the right mouse button select New filme select Other select AWT GUI Forms select Frame form Now you should see the menu at the right part of your screen with the option to create buttons, labels, etc.用鼠标右键单击包 选择 New filme 选择 Other 选择 AWT GUI Forms 选择 Frame form 现在您应该会在屏幕右侧看到带有创建按钮、标签等选项的菜单。

As of 2021 for mac users;截至 2021 年,Mac 用户;

  1. Open your NetBeans app and click on "windows" located at the top menu of the application.打开您的 NetBeans 应用程序并单击位于应用程序顶部菜单的“窗口”。 A drop down will appear.将出现一个下拉菜单。
  2. Scroll down and click "IDE Tools".向下滚动并单击“IDE 工具”。 You'll see another dropdown containing list of items including palette.您将看到另一个下拉列表,其中包含包括调色板在内的项目列表。
  3. Click on the "palette".单击“调色板”。 This will make the palette visible.这将使调色板可见。

That's all!就这样!

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

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