Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I know that Android uses Java but not a fully compatible runtime library. Creating UIs in Android is done completely different than for normal Desktop Java. Nevertheless that's a really stupid thing in my opinion, very much Java applications out there have to be rewritten for Android (instead of modified only slightly).
So my question: is there some kind of (3rd party) Swing-library available for Android? Means a Java-package that contains Swing-compatible classes so that an existing Swing-Application has to be modified only slightly? It of course can't be 100% compatible but modifying some things that do not exist on Android is much less work than rewriting the whole GUI-part...
There is no way you can use swing in android, because android is not based on JavaSE, while swing is. android uses a special java that is designed to run on DVM .
Even if their is no compatibility issue. Swing is used for desktop apps which differ in their UI completely from mobile apps.
So given the above points unfortunately you will have to rewrite the UI again for your software. but on the bright side, android's UI is very simple and fun to work with.
give it sometime and good luck!
Edit:
Comparison between Java SE and Android's Java
CodeNameOne?
Supposed to be very similar to Swing.
Also, in my experience, GWT is somewhat similar to Swing.
Either of these will require a rewrite from Swing though.
There is no Swing on Android. You can always develop a JME application and run it via emulation, but that's as close as it gets. Unfortunately, in technology, things change all the time, so for programmers, it's a case of "adapt or die."
Unfortunately, as far as I know, Java Swing Desktop Apps can't run on Android (Dalvik VM), but the good news is: JavaFX as a successor to Swing GUI technology has already been ported to mobile and embedded platform (e.g. Android). If you're interested in this, go http://gluonhq.com/products/mobile/javafxports/ for details.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I'm planning to write a simple program that displays course prerequisites for students at my university in graph form (ie as a network of vertices and edges). I'd like to embed the program in a webpage to save people the hassle of downloading an executable.
Currently I'm looking at making my program a Java applet (Java also would give me access to the handy Swing library), but I don't like the fact that applets can't be viewed on most mobile devices.
What alternatives to applets exist for a project like this? I'd like to make it compatible with as many devices as possible, and also not have to build the graphics stuff from scratch.
One final consideration is I'm doing this mostly as a learning exercise. Ideally the tools I'd be working with would be helpful to know in the future.
Please don't use applets. They have been sufficiently deprecated.
The best way to do this is by using html/js/css. A lot of useful libraries exist that can help you with this task. jQuery seems obvious, but there's also d3.js or vis.js for displaying visual representations of data, and bootstrap for responsiveness (mobile friendliness).
You may use Angularjs with angular-chart for Showing graph in Web Browser.
If your graph data is dynamic you might use Nodejs and mongoDB for backend.
angular-chart is responsive and its easy to show dynamic graph. But as it uses HTML5 canvas some mobile browsers might not show its transitions smoothly depending on the device.
I personally do not prefer using applet in web browser when the same functionality can be achieved using great frameworks like Angularjs.
why dont you try to build your project through Servlet framework
by the way cgi were removed by servlet because of the handling of the request
applet uses the same concept
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
The community reviewed whether to reopen this question 11 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I built an application using GWT in 2012 and it has worked fine until now when a major functionality upgrade is required.
I used GWT because my background is Java and having worked in MVP type projects prior to that it was a good fit.
Today, any problem I encounter and do a google search for has answers that are posted 2 to 3 years ago ( and in a lot of cases don't solve my own issues ) This is telling me that GWT is being left behind.
Because I built the app primarly as a hobby to learn GWT I feel like I would like to learn a more recent framework when rebuilding my application.
So to narrow it down, I want to know if there is any suitable more recent alternative to GWT out there that still allows me to code in Java.
I understand this may seem like a broad question where answers will be mainly based on opinion but how else can you pick peoples brains except asking "What is your opinion" How do I do a,b,c using Java is going to be answered 3 different ways by 3 different people based on their opinion of how it should be done.
I have heard about Vaadin (https://vaadin.com/home)
Vaadin is a covering around GWT giving you more flexibility to work and the same time maintaining the GWT like experience.
Otherwise this is a good compilation, you could pick what you might need:
https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile-to-JS
As a long time GWT user I am increasingly drawn to AngularJS. Obviously we're talking JavaScript rather than Java here, but coming from a Java background myself I'm finding JavaScript with AngularJS a decent alternative to GWT.
Check OpenXava it's easy to use. http://www.openxava.org/ate/gwt-alternative
There is nothing wrong with GWT per se. Polyglot programming has real costs and there is plenty of activity e.g. on gitter. https://gitter.im/gwtproject/gwt
New users can use https://github.com/gwtboot to get started and there are modern ui kits like https://dominokit.github.io/domino-ui-demo/index.html?theme=indigo#home
Since you still want to code in Java and want to learn something new, i would suggest using "modern GWT", i.e. using elemental2 / j2cl. You should consider learning to refactor your app to separate your view layer from the underlying ui framework. Avoid the parts that will go away in GWT 3.0 such as RequestFactory
JSF? http://en.wikipedia.org/wiki/JavaServer_Faces
It's the "official" (part of Java EE) framework for Java web apps. I've used it briefly in the past and was relatively happy with it. I very much prefer it over other frameworks that still rely on JSPs.
cuba-platform if you are looking for ready made components and Web Firm Framework if you are looking for a framework which can be used to build any UI component. Both are java frameworks to build web ui.
I would recommend learning either Swing or JavaFX.
Swing has been arround since Java 1.2 and is the more "mature" one.
javaFX is their new "hip" version and was introduced into the JDK at version 7.
Personally I'd go for JavaFX just to be "future-proof".
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I have to create a desktop application (.exe) where I can use Java swing. The backend code for performing some database operations are written in Java. It will be easy to write the UI in Swing but I want to know if there is something better available than Swing which will look much better than the Swing UI.
Can I use Flex? Can it be easily merged with Java code. Please suggest if any one know any other better options to develop this application.
Currently I would say your best bet is JavaFX2 (this comes with the latest Java 7 releases). This offers a rich modern user interface, and you construct it in Java (optionally combined with XML). JavaFX2 is Oracles official replacement of AWT/Swing, which will not be developed any further.
This image (taken from Oracle documentation) provides some examples.
JavaFX 2 is the more modern replacement for Swing, which is currently relatively young but will likely gain much more momentum when Java 8 is released next year. (With JavaFX 2 the old FXScript has also gone, the API now is pure Java.) Personally speaking, I find the API much easier to learn and much nicer to work with, and aesthetically the default cross platform look actually looks good.
See here:
Is JavaFX replacing Swing as the new client UI library for Java SE?
Yes. However, Swing will remain part of the Java SE specification for the foreseeable future, and therefore included in the JRE. While we recommend developers to leverage JavaFX APIs as much as possible when building new applications, it is possible to extend a Swing application with JavaFX, allowing for a smoother transition.
If you want something that keeps the native look (JavaFX doesn't provide a native skin that I know of at present) then you may want to look at SWT (Like AWT in that it uses native components, but it's much more modern) or qt-jambi (Java bindings for the native QT toolkit.) SWT is probably the more popular and supported of the two.
http://www.oracle.com/technetwork/java/javafx/overview/index.html. I would suggest you to use javafx. It is similar to swing. http://docs.oracle.com/javafx/.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am trying to find a tool that can help a developer in eclipse keep up to date with correct markup respecting accessibility.
The tool I have come across is this one:
http://www.eclipse.org/projects/project_summary.php?projectid=technology.actf
I have managed to test out web pages from within eclipse, but I can't seem to get the GUI Accessibility feature to work on a JFrame. Anyone have any ideas?
Thanks!
I do not believe there's any way to test Swing based applications with this tool. If you look at
http://www.eclipse.org/actf/docs/users/aDesigner/docs/overviewGui.html
The tool appears to test API's such as MSAA and IAccessible2. JFrame is part of the Swing toolkit so does not support any of these interfaces. In order to make Swing applications accessible you need the Java Access Bridge and a supported screen reader. NVDA is an open source screen reader that supports the Java Access bridge. To my knolidge there is no way to do automated accessibility testing of Swing applications. If you need to make a Swing application accessible you'll have to manually test it out with a screen reader. Also of note is the fact that the Java Access bridge is not widely supported and has not been updated in several years and will not run in a 64 bit JVM. A new version of the access bridge is in beta and will work with 64 bit JVM's but most likely will require updated screen reader support. I do not know of any screen readers that officially support the new beta. More info about the beta can be found at
http://jdk6.java.net/6uNea.html
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I understand this question has been asked before, but that was back in 2008, and things have changed. I tried looking for Swing, but the JFC is now outdated, and I can't seem to find Swing anywhere else.
I'd like to know what the best up-to-date java GUI libraries are.
Looking at the question you link to ( Which GUI Library is the best in Java?
), the answers there are still relevant.
Short version:
There are two serious contenders for a GUI: Swing and SWT.
Swing is more mature (arguably), is part of the standard JDK (no deployment issues), very flexible and well-documented.
SWT makes it easier to behave like a native application across different OSes (but this also means significantly more portability issues). It also reportedly performs better in some scenarios (but this depends very much on what you do).
Some other considerations:
I'd seriouly consider creating a web app when making a new app nowadays. In that case, SWT scores an extra point, because it has Eclipse RAP which (more or less) lets you convert a desktop client into a web client by just recompiling against different libraries, because it uses the same API as SWT.
Also, you might consider building atop a client framework, instead of writing from scratch. In that case, if you use Eclipse as your framework, you'll have to use SWT. Or use Netbeans, which is based on Swing...
SWT has been good to me. It provides a native look-and-feel by using native controls when available.
You can optionally use it and JFace in the Eclipse Rich-Client Platform, which provides a framework for applications built atop a community of plug-ins. It has a high learning curve, but provides a mature, powerful framework that you don't have to build.