Creating a wizard using NetBeans 14 - java

I want to create a wizard from NetBeans 14. I have been searching related materials… I followed the NetBeans tutorial for creating the assistant… Everything was fine until I tried to integrate the wizard into my project. The problem is that in the tutorial the wizard is created as a standalone module and is executed through a dynamic submenu at the NetBeans IDE, the idea is to execute the wizard when the user clicks on a button of the application. Here I found two questions (1 and 2) related, but in the end I haven’t been able to achieve my goal, resulting in an error importing: org.openide.util.HelpCtx. However, in the wizard module everything is working fine and no error is rising. My final questions are:
How can I integrate the previously created module into my application without losing the dependencies and everything works fine? Is there a way of doing so without copying the files into my application?
Am I using the right approach for creating a wizard or is there another way of doing this, an easy one?
Thanks in advance.

Related

Unable to add Servlet in eclipse

I am setting up a simple server project in eclipse (using a Glassfish as a server if it's relevant). I cannot seem to add a Servlet though. Unlike another question I've seen where a project cannot be selected I can select the project, but the finish or next buttons remain disabled. I tried manually creating a class that extends HttpServlet ahead of time and selecting but it the finish and next buttons are still disabled:
I am running Eclipse 4.3, and I have tried starting it with -clean. Beyond that I'm not sure what to try.
EDIT:
As I said I orginally tried to create a new class using the dialog and only when that did not work did I create my WebService class. Here is what I orignally tried (using NewWebService as the name since WebService now already exists)
Although the question is already marked as answered. There could be other reason to have "next" or "finish" buttons grayed out in "Create Servlet" Dialog.
This could happen, if the PROJECTNAME/WebContent/WEB-INF/web.xml file is corrupt by i.e. misspelled tags or attributes.
#Fr33dan: Check if dynamic web Module is checked in in your project facets.Also is this a maven project?
In the screen shot you provided it seems like you are checking the box Use an existing Servlet class or JSP. Just uncheck it and it should work fine, you will be able to create new class.

Import existing Swing project to NetBeans

I have been sent a Java file containing a GUI interface that I have to edit and add features. I have created a project on NetBeans and I am able to launch it. The problem is I can't edit the interface, and all the documentation I have found is about creating a new interface. So I would like to know if there is a way to edit the interface of the project with NetBeans. I am using NetBeans 7.2 on Linux.
So I would like to know if there is a way to edit the interface of the project with NetBeans.
Yes there is. But not using the 'form designer' or whatever Netbeans is calling it now. It requires actual knowledge of coding Java.
For the lazy people:
Open the old swing on the design tab, select all the items, copy and paste into the new swing file.
and voila..
It is also import the code from the old file (everything that is related to the swing elements).
I hope it helps

Play! framework. create a new view

I created a new project using the play console
now, by default I got in my views directory two files:
main.scala.html
index.scala.html
I want to add a new view file. I call it "forums.scala.html"
now, I know that in order to render a view you need to do this:
views.html.forums.render("Forums");
the problem is that the intellisense doesn't recognize "forums"
but index and main it does recognize.
I've noticed those files:
class_managed/views.html/index.class
class_managed/views.html/main.class
but there is no forums.class so I suspect this is the problem.
I tried to build the project, but it didn't help.
so, what is the solution?
thanks
Your new views are compiled to managed sources after next browser hit if you are using play run for starting Play in dev mode.
If you'll use play ~run it will try to compile it as soon at it will recognize change in the file.
Finally if you started your app in production mode ie. via play start you have to stop it with ctrl+c and run again. Anyway, developing application in production mode is just a bad idea :)
Depending on your IDE most probably you'll need to refresh file structure to allow it find freshly created managed sources.
right click on ther project and click refresh, that worked for me - found it in another thread.
Found the solution.
running "compile" command did the work.
I understood that intelliJ do it auto, so I will probably use it instead of eclipse.
cheers!
If you want to program in scala, my recommendation is to forget about intellisense. Eclipses scala-ide is quite buggy, dont know about netbeans. And because of nonstandard layout of play2 application, non std development tools (play console), it becames even more handy to use simple text redactor (like sublime or textmate) with good old open-folder-as-project feature.

Reusing Eclipse Run menu in Eclipse RCP application

I want to create an eclipse RCP application for a custom language. A programs which is written using the cutom language should be run and show it's output when the user click on the Run button.
Is it possible to integrate eclipse Run menu in eclipse RCP application with it's default features as we create NEW menu item by using ActionFactory? If it is possible how to do that?
Thanks in advance.
If you "just" want the Run menu along with the default entries, just include a dependency to org.eclipse.debug.ui.
You will then need to add launch configuration types for your specific language using the various extension point from the plugins org.eclipse.debug.core and org.eclipse.debug.ui.
As always, when it comes to the more advanced functionality of Eclipse, the easiest way to get access to the functionality is via resources and examples. Although it is a bit dated, the article "We Have Lift-off" (http://www.eclipse.org/articles/Article-Launch-Framework/launch.html) is the best starting point for this. Have a look at the various references to org.eclipse.debug.core.launchConfigurationTypes to find the best example to use asa starting point - in particular the ANT Build stuff as this is pretty simple...
In general you can find the plug-in that contributes a specific entry using the PDE Menu Spy (Alt-Shift-F2 on MacOS)...

Netbeans Project Types

I'm building a Java application using NetBeans 7.0. The app is intended for use on Windows, so I guess the tool I'm really making most use of is Java Swing (for the cool, nifty screen elements).
My question relates to NetBeans' process of creating the various project types. The application I'm building is based on the "Java Desktop Application" template (?). My problem is that there seems to be a nice load of bloat built into that, and I can't figure out how to remove most of it without blowing up the app.
As a test, I created a "Java Application"project, but this has the opposite problem -- there's absolutely nothing built into the code, and I can figure out how to add anything. Specifically, a Java Desktop Application project created in NetBeans give me the ability to directly edit the screen layout like in Visual Studio. However, a Java Application does not appear to have this capability, I have no idea how (or even if) this can be addressed.
If I could start with a no-frills Java application, and add some capability to edit its layout and control the function of the screen elements (i.e. make it a windows application, I think), that would be just about perfect.
Does anybody have a suggestion for a minimal, but functional NetBeans application start point??
Thanks,
R.
If you start with a plain Java Application then as you realize you start with a bare bones type application. To add a GUI you can add New>JFRame Form. It adds a class that extends JFrame and Netbeans will recognize that it should open it in the visual editor for you.

Categories

Resources