Get rid of sub menu in Java Swing using Windows builder - java

I am trying to learn Java Swing and Windows Builder by creating a personal project. I added a menu bar File, Edit, View, Help etc. When I click on 'File' I get Open,Save,Save As. This is also correct. But using the default options in Windows Builder, Gives me a sub menu under 'Open' indicated by an arrow but I don't want this all I want is:
File
- Open
- Save
- Save As
And I want to get rid of
File
- Open ->NULL (this is what comes as default in Windows builder)

You probably added an "Open" JMenu, instead of adding an "Open" JMenuItem. The source code would confirm it.
JMenuItem is a leaf in the menu tree. JMenu is a container for other JMenus and JMenuItems.

Related

How to customize 'new' option in Eclipse

When I'm using Eclipse to code in Java, I want to use the 'New' button (located below File, Edit...) to create a new class. I know it's possible because I've been able to use it like that on a different computer. However, the only options displayed are "Project", "Example", "Other...". So I have to select other and go find "Class".
I want a way to modify this list to include Java Project, Class, and whatever else I need. It's the same story when I right-click the src folder in the package explorer. I want to make a class in that folder, but I have to click other, navigate the new window to class, etc.
Can this be simplified?
Make sure you're in the right perspective. I see what you're looking for if I'm in the "Java" perspective, but not in other perspectives, such as "Java EE" or "Debug".
A "perspective" in Eclipse is the set of panes, toolbars, menus, etc. for a particular purpose. There should be toolbar buttons all the way on the right for them.
in order to customize new option in Eclipse, On the top of Eclipse, click on Window, Navigate to > Perspective > Customize Perspective > Menu Visibility > file > new.
now you can customize new Option.

IntelliJ asking to configure SDK and "run" won't appear in dropdown

I am using the Lynda.com tutorial Gradle for Java Developers to learn Gradle. In the tutorial, he opens a new project with no template and copies a folder from the exercise files into the new project (I'm not sure if this is relevant to my problem). Without altering the Java class found in said folder, he right-clicks it from the sidebar and clicks "run" from the drop-down menu.
When I right-click it the class, "run" does not appear. Additionally, there is a message at the top of the text editor that says something along the lines of needing to configure an SDK. When I click on it, a pop-up saying something about "1.8" appears, as well as an "OK" button. When I choose run from the top menu, it simply brings up an "edit configuration" pop-up.
Can anyone explain to me why my layout is so different from the tutor's?
Edit: Now I see where my issue came from. The tutor was misleading with his "how to use the exercise files" video. He showed it to be as simple as clicking "open" on Intellij and opening the folder or dragging the folder to the intellij icon, without configuring an SDK. But in the tutorial video I was watching, he did something completely different by creating a new project and pasting a folder within the folder for the video, which actually ended up looking different from the template he used (His project was called GradleLab and he copied the exercise files within it, while all the other exercise files include the GradleLab folder

How to change popup in Eclipse?

I am new to using Eclipse (I just downloaded it).
I began creating a new project, wrote some code, added some packages and classes and closed the project.
Now, I opened it again and I'd like to add a class to a package. So I right-click on that package and the standard popup window appears. But when I now hover over "New ->", there are only three options: "Project", "Example" and "Other". The first time I worked on the project, there were many more options, f.ex. I was able to click on "Class" direct. Right now, I have to select "Other", type "Class" into another window and click "Ok".
Is there any switch or so in the settings that I accidentally enabled that changes the default right-click popup?
I added an image.
Thank you for help!
It seems you are not in the Java perspective: Window > Perspective > Open Perspective > Java

create a new class do not appear right click menu eclipse

I have a really annoying problem in Eclipse java neon, when i do a right click on a package in order to create a new class or in any area, Eclipse don't show me proposition like class, package or even project but only a incomplete menu unusable
I have already launch eclipse with -clean but not help
An illustration of the problem, I also notice that Eclipse is in... debug mode ? (upper left corner)
Select menu Window -> Perspective -> Customize Perspective....
Select Menu Visibility tab.
Select tree node File -> New.
Toggle check box of menu items as you like.
You are in the Debug Perspective (see What is a Perspective?). You can switch back to the Java or JEE perspective (where most development activities are typically performed) by using the perspective switcher toolbar in the upper-right corner of the Eclipse window.
I suggest you learn about the use of Perspectives in Eclipse.
Try
File --> New --> (Then choose what you want)
Specify the Source folder and package.
When I don't find something in the menu there, I just click on Other... and search for whatever I want to create. Regardless of the Perspective.
Of course it could more practical to customize the Perspective to include the frequently used items as mentioned.

adding an option of your application to window's right click menu

i am creating a java application and want to provide a functionality of it in mouse right click menu on windows os
like if we have notepad++ installed then if we right click on some file then it shows an option "edit with notepad++"
i want to do similar kind of thing but with selected text
You'll have to add to your program a functionality to insert your program path into the registry. Check adding program to windows right click option menu for help.

Categories

Resources