I have a Java code making a JFrame interface. I want to deploy same interface (same looking) on a web page. For example taking a scenario: I click on a link on web page then same interface (as frame) opens and it performs functions same way as frame works in Netbeans.
Is there any way to accomplish it? Can I deploy same interface on a server?
Java Web Start will let you access your existing Swing app from a web page without any code changes. However, the app won't be ON the web page, but rather a download and auto-launch kind of thing. If you've already done Swing development, then you may already be familiar with this since all of the Java tutorials have this.
EDIT:
For an example of how this works, see the How to Use Password Fields tutorial, and click the Launch button on the web page.
You can either deploy your application as an applet, or look at using GWT.
Related
I'm looking for some ideas on the general architecture for creating a Windows application (I'm open to suggestions: Java, C++, C# and also for frameworks) in which I can show another application running inside of it. Very similar to the iframe concept, where a web page is rendered within the frame.
I think I would need to instal the framed application as part of a custom installer, or even assume it is preinstalled in the OS. The important part initially is to be able to framed a graphical application inside another.
I have an application which is composed of many JFrame objects (using Java and Netbeans). The 'main' frame has 4 buttons and each button opens another frame. Now my problem is that I want the whole application to be run on the web as a website.
I was considering 3 possible scenarios (from my research):
Use Java Web Start
Convert JFrame to JApplet
Create from scratch a Java web application
I was hoping that maybe someone can give me some help, and guidelines of which option I should opt for.
The quickest option is to modify your application to run as an applet (yes, this would involve making a JApplet from your JFrame). However, you should realize that the Java Applet is considered an outdated technology. Most mobile devices won't run them and even some popular desktop browsers won't (Mac Chrome). What's more, Oracle now requires all applets to be signed in order to run with default security settings. This means purchasing a yearly (~$200) signing certificate.
Java Web Start is not really fundamentally different from applets and will suffer the same issues as above.
Think again about your choice of technology. A Java web application (e.g., Spring MVC) or a JavaScript application (e.g., GWT, JQuery) are better choices.
For deploying Java desktop apps., the best option is usually to install the app. using Java Web Start. JWS works on Windows, OS X & Unix/Linux.
Applet deployment has always been difficult, with weird bugs in particular versions of specific JREs in conjunction with particular browsers. My 'favorite' bug happened in a version of Firefox that triggered an applet to reload when the user scrolled up in the web page.
See also The Use of Multiple JFrames, Good/Bad Practice?
I am making an application in java which would be showing a HTML web page, getting the address of the webpage from a config file. The web page will be on the local disk. Now what i want is, when i start the Java program, the program will be showing the the webpage fullscreen on the computer without the mouse cursor. Now for that i would be first needing a HTML Engine or a web browser which can run inside the java application(events liek press of button etc etc will be passed to the web page from the java application). I cant find a way to show these web pages. I would be needing to show current tech web pages , such that it can process everything from jQuery, Js, Ajax, CSS3, HTML 5. So that beautiful web pages are able to be shown through the Java program.
JxBrowser is a good api for such purpose. It uses the chromium engine which offers an optimum speed just like native browsers. I have used it and it worked for me
Maybe you can give a try to jxbrowser
It promise to be a very good component.
From the home page:
Embed a lightweight Chromium-based Swing component into your Java
application to display modern web pages built with HTML5, CSS3,
JavaScript, Flash, Silverlight etc.
This is possible if you're willing to use javaFx.
I'm not sure to which extent the latest html5 and css3 goodies are supported, but it's a decent browser enough : java fx WebView component
You can try using the SWT Browser control if your application runs on Windows.
It wraps the currently installed Internet Explorer and gives you a very powerful access to its functionality including event listeners, etc.
I just wanted to ask, how can we open Java Applet like a program, but not an application integrated in a web page.
You push a button in web page and java program will start, but not a java applet integrated in a web page.
Or like a webpage but without address bar :)
This is possible somehow , right?
Thank you for your time and for your answers!
UPDATE
This would be like a solution: http://orangoo.com/labs/greybox/normal_usage.html
Greybox!
Everything is okey, except you cant drag / move that popup window anywhere. Maybe someone is familar with Greybox and can suggest how this is possible? ( To move popup window)
:)
How about using Java Web Start technology instead?
http://docs.oracle.com/javase/tutorial/deployment/webstart/
Java Web Start software provides the power to launch full-featured
applications with a single click. Users can download and launch
applications, such as a complete spreadsheet program or an Internet
chat client, without going through lengthy installation procedures.
With Java Web Start software, users can launch a Java application by
clicking a link in a web page. The link points to a Java Network
Launch Protocol (JNLP) file, which instructs Java Web Start software
to download, cache, and run the application.
I've made an application with Java which is a game. I'm wondering if it is possible to put this game on html page or similiar in order to play it with a webbrowser. The GUI has been built with JFrame, JPanel etc etc.
The easiest way would be to use Applets:
An applet is a program written in the Java programming language that
can be included in an HTML page, much in the same way an image is
included in a page.
Yes indeed. Applet is the first choice.
Another option is "Java Network Launch Protocol" (JNLP) but note the games won't be embedded in the web page, it will be launched as it is a shortcut on you desktop.
You might be interested in
Swingweb (open source)
Ajaxswing (commercial)
Which should mean your clients won't need a jvm.
I disagree with the first two replies that suggest applets should be the first choice. I can only assume that neither poster has much experience at deploying applets to people coming from the World Wild Web. Applets are a PITA at the best of times.
Instead, focus on Java Web Start which can launch the existing JFrame based game from a link. It might require as little as creating a single launch file (JNLP) for the app. and linking to that.
As to embedding the game into a browser window, consider this. What exactly does the browser window wrapper do for the game? What does it add to the game? If the answer is 'nothing', then definitely go for JWS.