How is it possible, to run netbeans project in the browser?
My project have only one frame, and uses swing. I have no idea, how is it possible, to write an embedded java application, for browsers.
You are looking for Java WebStart , take a look to this tutorial in Enabling Java Web Start in Netbeans.
More information Lesson: Java Web Start
Also you may interested in Applets, Lesson: Java Applets
Consider looking into JApplets, this sounds to be what you are looking for.
Links:
Example
Documentation
I think if you want to launch it in Browser then it is better in Netbeans you chose Java EE project. This you can run in browser and you can create much better GUI than swing by using HTML and CSS. Of course it will be applet based.
Check this tutorial
Related
I'm doing my academic project currently. Its based on swings and awt. I am running it in command prompt. Is there any possibility for me to run it on a browser
In order to run a Java application in a browser, you need to make it (or wrap it) in an Applet. A Swing application is actually usually designed as a desktop application (meaning, standalone). Applets tend to be pretty resource-intensive for your user.
You should create an applet probably, that could run in a browser.
An applet can have GUI part too similar to a desktop GUI app.
The GUI of the applet can be based on Swing or AWT.
See also:
http://docs.oracle.com/javase/7/docs/api/java/applet/Applet.html
Take a look at Java Web Start which will allow you to deploy your application as is without any redevelopment of the code.
The First Suggestion is to use Applets. If that is not confortable for you and if you have a simple Swing application, I would recommend that you look at AjaxSwing
I onced used it on a simple Application and it works.
Webstart is another Way to go. You have Options to take, pick the one that works best for you.
Is there any tool that can convert already programmed Swing J2SE into JSP J2EE shell?.
Thanks!
No, there is no such tool. Although you might found some attempts to do it, desktop and WEB paradigms are way too different to have a tool that converts between between them properly.
If you absolutely must run your APP on a WEB environment, you might find easier to convert your Swing application into a Web Applet. It's not the same though. An Applet is basically a Swing application running inside a browser. Not a WEB-WEB application.
can we develop java frontend application just like we do in WPF? that runs on windows platform?
Of course, just use Swing or SWT.
of course you can use java also for frontend applications, those applications will require the java VM and will probably run in some platforms not only windows, this in general then depends on the details of your specific application.
Said so, I am not aware of libraries available in the Java world which would let you compose rich and advanced user interface like you can do with WPF.
Of course, Java can be used to create front-end applications that run not only on Windows, but on any operating system that has Java installed on it.
To create front-end GUIs, you could use either AWT(very old, not recommended), Swing or SWT(the latest addition to the Java GUI library by IBM).
XUI is an XML-based frontend development toolset for Java.
If you're looking for a ClickOnce equivalent, Java Web Start would be appropriate.
There are several GUI toolkits out there (as already mentioned by others), but they only provide the basic building blocks. (WPF also falls in this category, AFAIK.)
I recommend to build GUI application on top of a modular Rich Client Platform (RCP) such as the NetBeans Platform (Swing-based) or Eclipse RCP (SWT-based).
Here some links for the NetBeans Platform:
http://platform.netbeans.org/
http://netbeans.org/features/platform/features.html
http://netbeans.org/features/platform/all-docs.html
There´s a technology for desktop frontends from ADOBE called Adobe AIR.
It´s similar to WPF (it uses a variation of XML, in this case MXML), and has several rich components and effects!
Try it out at http://get.adobe.com/air/
I am working on a Java program that has bunch of classes consisting of dialog boxes, JFrames, etc.
Can someone guide me where I can learn how to transform it to an 'applet' kind of. ( I don't even know if applet is the right word)
Like for example, can it be accessible through the internet browser. If I somehow make a domain www.myjavaprogram2011.com it would be nice if it will take it straight to the java program I coded. I see this as anyone can come to this website and use that program.
Thanks!
You may want to look into Jars for distribution or probably more aptly Java Web Start as this allows Clients to be downloaded and run.
Java Applets isn't your best bet as there's lots of security permissions that you need to worry about as well as your jars needs to be signed (especially for client/server data access).
Try using Java Web Start, it will allow you to launch fully-featured application from the Web Browser. Oracle has tutorials on deployment of JWS, etc.
Sounds you're looking for some kind of RIA technology. Have a look at JavaFX, though it's not mature yet IMHO.
Ah, but then, if you already have a Swing application then this isn't an option probably.
Simple question: Can I mix in my desktop application Java and JavaFX Script code? If it is possible could you provide me with some link with examples?
Or could I pack my custom made javafx CustomNode-s in a jar and use them in my project side by side with standard SWING components?
This article gives an example of calling JavaFX from Java, using the Scripting API.
Yes, you can mix Java and JavaFX.
According to one of the FAQ entries:
In addition, developers can use any Java library in their JavaFX applications. This allows JavaFX applications to take advantage of the rich JavaFX UI libraries, as well as the amazing breadth of functionality offered by Java.
The official source of information, including tools downloads, FAQ, and tutorials is the JavaFX web site.
I suggest you to look at dotFX. It can be useful for you. It has a netbeans plugin,too.
Read first here for get more information.
You can use a JavaFX 2.0 with Swing
http://javafx.com/about-javafx/
If you install the JavaFX 2.0 runtime first, then you launch an example http://download.oracle.com/otndocs/products/javafx/samples/SwingInterop/index.html
Supposedly all you have to do is drag and drop the JavaFX application to your desktop in order to make it a desktop application. You can also use Java code in a JavaFX application. Not sure about the other way around.
Yes Javafx and java apis can be mixed and used in your application without any problems.