Can someone please recommend an alternative to Java swing? [closed] - java

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have been mucking about with Java swing lately but it's butt ugly! Are most people who write Java GUI's using swing or something else? I would really appreciate a recommendation. I don't want to use a GUI builder because I need to learn how everything works first.
Thanks!

If you don't like the default Swing look'n'feel, you can change it ; many ready-built themes exist. And it is quite possible to build beautiful and ergonomic applications with Swing : take a look at Netbeans or IntelliJ.
But if you definitely want to use another graphic toolkit, you can try SWT. Contrary to Swing that is pure Java, SWT uses native controls as much as possible (those provided by your OS), and emulates the missing ones. It was developed for, and is used by, the Eclipse platform.

Most people use Swing.
Some use SWT, but you have to dispose object after use. (no auto dispose in Garbage collecting) It give very native look UI.
Some use Qt-Jambi, but then you have to understand some C++ code. Most of them are for interoperating with Qt.
Some ancient code use AWT. Most of them are for legacy reason. I recommend avoid it.

I have been mucking about with Java swing lately but it's butt ugly!
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {}
Are most people who write Java GUI's using swing
For most things, yes. It's built-in, and doesn't suck that bad for a cross-platform GUI library (which all suck to some extent).

SWT
Spring-RCP (ontop of swing)
By the way, Swing's Look and Feel can be customized. There are some pretty good LaFs. See here how to change the look and feel.
Check this question for how to change the look and feel and for a list of nice look and feels

SWT is very good. It tries to use native GUI drawing functions wherever possible. An example of application written with SWT is Eclipse IDE.
http://www.eclipse.org/swt/

you can use native look and feel with swing, thus it's less ugly. Personnally, I use swing for my GUIs in java, and I find it quite straight forward and documented.
Here is a link toward swing documentation:
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

The only thing is ugly in Swing is standart layout manages. They are or too primitive or too complicated.
If you really want to write nice gui without gui builders take a look at alternative layout managers. For example Table layout https://tablelayout.dev.java.net/

Look to SWT http://www.eclipse.org/swt/ - Eclipse entirely built on it.

Related

Is JavaFX a choice for Dynamic GUI for desktop or standalone applications? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I want to make Dynamic UI for a desktop application. I am planning to make it in JavaFX.
Is it a good choice?
Second thing I want to know is that is it possible to have UI by JavaFx and behind the scene major work in done by pure java? I am totally new in JavaFX so correct me if I am wrong.
Also If I am wrong tell me other possibilities for the Dynamic UI and java code behind for a standalone application.
Having JavaFX 2 UI and pure Java background is valid and usual approach.
There is a good example in this question: JavaFX in enterprise web applications - good alternative to classic web pages?
There's also Swing, SWT, and the Eclipse and NetBeans RCP platforms.
Whether or not JavaFX is a "good" choice, that's more opinion than fact. I wonder about its future. Personally, I like a lot of what's available in Swing combined with a nicer language than Java, like Groovy, JRuby, etc. In an enterprise environment, purchasing a LaF seems a reasonable option.
Yes, JavaFX allows re-use of existing Java libraries; integrating existing code was a design goal.
If creating a desktop application with JavaFX is a good choise or not,... I can't tell you. Even the future of JavaFX is unclear. Despite this, it really depends on your aims and requirements (e.g. target audience, maintenance, ...). Maybe, your question has to be more specific. But, if you are your only customer then 'happy coding' with JavaFX :)
Some hints that might help you getting started:
Separation of concerns
To separate UI from all the other stuff is always of high value. A major key is the Separation of concerns. Starting with this article is a good starting point.
Design Patterns
The next step is to decide for a design pattern enabling to separate presentation from the processing of data. Personally, I'm a fan of the Presentation Model. There are many other patterns out there and I'm sure you'll find the one, fitting your requirements. So it is possible - and always a good approach - to use e.g. JavaFX for UI and pure Java for all the other stuff.
Hope this helps.

Java IDE for desktop developement [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I have to create a desktop application in java. I have experience in working with eclipse IDE for web development. Now for Desktop development whether i have to stick with eclipse or Netbeans.
Then, they are telling Eclipse RCP and Netbeans RCP, i heard only swing, Which framework can I use for desktop development.
Thanks.
In my experience, Eclipse is a perfectly cromulent IDE for desktop applications.
Is there any feature in particular you think you'll be missing which could be worth the inconvenience of re-training yourself with a different environment?
Both Eclipse and Netbeans provide services to utilize and design Swing components. Swing is the general window toolkit for Java. Netbeans and Eclipse are IDEs. If you have experience with Eclipse, then use Eclipse as it will be easier for you.
If you need to design a user interface, which is what I think you are trying to get at, then something like Visual Swing Designer might help.
Window Builder from google is the best plugin I have ever seen for ui design.
Personally I use netbeans for swing because its just how I learned.
You can take this chance to learn something new or stay with what you are formiliar with. Only you can make that choice though.
Take into account things like deadlines etc.
Personally I believe Swing would be the best option to go when you plan to develop desktop apps with java. When It come to IDE, as since eclipse is you are used to, better stick to that, for design swing interfaces you can use, some third party plugin of your choice. Number of designers available can be found here,
Best GUI designer for eclipse?

Future of GUI development in Java? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
Considering that
Sun/Oracle decided to not develop Swing any further after they "invented" JavaFX
JavaFX doesn't really work and some consider it a failure already
the not really platform-independent nature of SWT, the manual task to dispose GUI elements and the necessity to bundle platform-specific libraries
is there another way out?
If I would like to do GUI development on the JVM
with a good API (Swing and SWT are not bad, but they are not really good either.)
which "feels" responsive (still a problem today with Swing and SWT, despite the claims that this is solved.)
which won't be obsolete in a few years
what decision should I make?
Is there even a third option available or a possibility there might be one in the future?
An option
which is fast and responsive (Not Swing's ideology of "If it's not fast, it is the developer's fault")
with native look and feel
with a single library which runs on all platforms
Is this realistic?
Thanks!
=========
To clarify: If I have to start a new software project on the JVM, there are several existing options, like using SWT or Swing, using Swing with third-party libraries like SwingX, JIDE, JGoodies, Flamingo or using application frameworks like Netbeans Platform or Eclipse RCP. Is there a supported/suggested way which weakens the pain normally associated with Java GUI development?
The answer is prefer swing, I think.
since 1.4 there are big progress on awt (sun do that because java fx need awt, fortunately)
since 1.5 big progress in thread managment (SwingWorker and concurrents things)
swing is excellent, responsive (what the problem with developper fault ? ), native l&f, and so on
there are excellent libraries, like swingx, trident, etc, and platform, like netbeans.
Of course it is a mature technology (a little old), but I know nothing else. It will be cobol of GUI development :-)
You won't find an objective answer to this question, only personal preferences and options.
SWT
My personal preference is SWT. I started using it, when Swing was to bad to be an option. SWT is "just" a layer on top of the native windowing APIs and thus applications written with SWT feel like natively written applications. Those can also be screwed up. No API will ever be safe from bad developers. The performance is as fast as it can get in my experience. If it is not, there is another way of implementing it, where it will be.
SWT's API is very low level which makes implementing basic stuff unexpectedly tedious, but fortunately most typical usecases can be solved with JFace, which improves the situation. And when you use the API for a while you'll accumulate your own util classes. You can become pretty fast in implementing SWT tools.
Since SWT gives you only the basics, you need MigLayout and Nebula widgets to survive. You might like Glazed Lists.
Qt Jambi
Actually I would have liked to include another option besides SWT and Swing for you: Qt Jambi. But Nokia gave up on this, and it is "maintained by an open source community" now. So I don't know about "not being obsolete in a few years".
Nevertheless I am excited by this ongoing discussion. Some people have written an SWT implementation using Qt Jambi as "native" API. They are trying to figure out how to contribute it. Having Qt as an option might enable your "single library which runs on all platforms" for SWT one day, though I wouldn't count on it anytime soon.
But for me your requirement of "a single library" is not such a big issue. Use maven for your builds, add a few lines of configuration and you'll forget about this very soon.
Swing
I can't really compare SWT to Swing, since my experience with Swing is limitted. As a user I don't like most Swing applications, but I did see some beatiful ones.
Nowadays the native look and feel of Swing apps got pretty good, but you won't fool a power-user. Also performance seems to be really good in new and well done Swing apps, but again, this is only from my limitted view as a user.
Obviously there are more 3rd party extensions for Swing than for SWT - just do a Google search. (But then again, if you endure the pain of learning Eclipse RCP you'll get an huge, interesting infrastructure as well. That's not talking about widgets though, that's stuff like EMF or RAP. I am no Eclipse RCP person - I never had enough patience for that...)
A really big advantage for Swing, if you like that stuff, is Matisse, the GUI builder of Netbeans. Qt has also a well done GUI builder by the way.
Summary
If you plan for long term, I don't see more options than SWT or Swing for GUI development in Java. Both are good enough to satisfy most needs if you spend enough time. But they are not perfect. You'll always envy people using other languages for their widgets, implementation speed, tooling, ... If you are not bound to Java, you might even prefer Flash or Qt.

The best tool for build swing UI visually [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
What is the best and powerful tool for building swing interface?
What tool do you use for swing? Why?
NetBeans Matisse (comes bundled with NetBeans) is good and powerful.
This eclipse plugin seems fresh as well, but I haven't tried it.
Eclipse is my IDE of choice. You can download Eclipse Visual Editor Project(VEP) from here. take a look at this tutorial.
The Eclipse Visual Editor project is a
vendor-neutral, open development
platform supplying frameworks for
creating GUI builders, and exemplary,
extensible tool implementations for
Swing/JFC and SWT/RCP.
if you want some compression between Eclipse's VEP and NetBeans' Matisse, take a look at this and this.
Netbeans comes with a nice GUI builder, look here: http://java.sun.com/developer/technicalArticles/tools/nb_guibuilder/
Netbeans is the best tool till date!
The Netbeans builder can be quite nice, but it does build a lot of code for some simple tasks. So over time I have gone back to coding by hand, it can save you a lot of time in the long run!
Look at these:
http://www.instantiations.com/windowbuilder/
I have written a Qt-style wrapper around GridBagLayout and I handcode my GUIs using it.
Visual GUI builders certainly provide more flexibility but that comes at the cost of reduced readability of the code. However I do use NetBeans Matisse when I have some quick and dirty job at hand. ;)
Anyway...
If you are interested in handcoding GUIs at all, then you might also like to have a look at MigLayout. I have never tried it though.
I suggest you using JBuilder ....
JFormDesigner is a nice visual designer. It supports lots of open source and built-in swing Layout, it has a plugin support for Eclipse,IntelliJ and also can be used external designer.I have used it as an IntelliJ plugin in a multi-year big swing project with no problem.
I prefer coding by hand with GridBagLayout, but if I had to use a GUI-Builder I would use NetBeans.
After using NetBeans and the Eclipse plugin, I'd go with NetBeans.
Abeille Forms is pretty good. It's based on JGoodies FormLayout. With Abeille you can layout your components visuals and access and/or replace the component with a richer component at runtime.
https://abeille.dev.java.net/

Do beautiful, user-friendly Java applets exist? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
When I use Java applets, they tend to be slow, don't integrate very well with the browser environment and often require a few click throughs ("No, I don't want to give this unsigned application free reign of my hard disk").
So, I'm curious.
Are these problems insurmountable? Are there Java applets out there which integrate well with the browser experience (in, for example, the way a well-designed Flash application does?) Can you point out any examples of really "nice" Java applets?
I'm asking this because I want to know if I should be taking a more serious look at Java-in-the-browser, or if Flash will remain dominant for the foreseeable future.
Edit: Unintentional flame bait has been removed. Sorry for any offence caused.
The Facebook asynchronous image uploader is a Java applet.
Update: Apparently not developed in house at Facebook. This seems to be the product.
Amendment:
Now that the question has been updated to be a bit more concise, I thought I'd add more to this answer.
This kind of problem, a mass image uploader (in this case), is the kind perfectly solved by a Java applet. Why?
It uses native UI elements, so users are not confused, or have to learn a new interface.
It can save massive amounts of bandwidth and overhead, because image transformations, such as resizing and cropping, can take place on the client side, rather than the server.
Write once, deploy everywhere (almost, sorta).
Visual Thesaurus is the coolest / best applet I know of.
Check out PulpCore. A really awesome Java applet framework:
http://www.interactivepulp.com/
Performance for it seems pretty amazing too if you check it out on bubblemark.com
Some of Ken Perlin's applets are beautiful.
see http://mrl.nyu.edu/~perlin/
eg:
http://mrl.nyu.edu/~perlin/experiments/unicycle/
http://mrl.nyu.edu/~perlin/homepage2006/simplex_noise/index.html
http://mrl.nyu.edu/~perlin/experiments/orange/
(...)
Simple floor plan designing with java applet here. Works much faster than dragonfly.autodesk.com or floorplanner.com (both are flash applications).
A few things...
Some game sites, like popcap.com, use Java applets for their games, and they look pretty good and are very usable.
As far as "why is that button cropped?" - that's probably a layout manager issue. See my article on layout managers, in particular:
http://java.sun.com/developer/onlineTraining/GUI/AWTLayoutMgr/shortcourse.html#whyNeed
There are many nice looking applets created with Processing (which is basically Java with some fancy graphics libraries included).
Just take a look at this visualization.
(source: zumkuckuck.com)
In high school I used to play a ton of Yahoo Games and I'm pretty sure those are all java applets. It looks like Yahoo have updated their site since I went there last but you can still find all of the old games here.
The MMORPG Runescape uses a Java applet as a client, and works very nicely, although the graphics aren't nearly as good as other games of the type I've seen. Jagex, the publishers, also have a game site called Funorb.
Another game which is in Java (though not an applet) is Puzzle Pirates. It's not exactly beautiful but it's cute and it's very addictive. Also, it's very speedy and smooth (which has been a knock against Java applets).
Java applets are like flash scripts - They can be used for good, but are often used for evil (e.g., annoying banners). IMHO the main reason that they didn't catch on is that they require tended to require too much skill and used AWT/Swing which produces worse UIs than what a designer with little programming skills could achieve with flash.
I would say that yes, they still exist, but more for business goals that don't require pretty UIs. For example, A lot of web-based statistics calculation tools are based on nice applets.
It's certainly possible. Java2D (the standard graphics component in Java) is capable of rendering beautiful stuff. A big problem is that the default Swing Look and Feel is ugly. I believe Java 7 will have a better one, but there are also very beautiful third party ones such as Substance. I've personally developed a small Java applet game which, apart from the jagged text in the intro screen (which is a bitmap, not rendered text) is visually indistinguishable from a Flash game.
My mom is addicted to the casual gaming at pogo.com, and I've gotta say, they've done an amazing job at fun, easy to learn, nontraditional games that look perfect. I'd love to see their code, honestly.

Categories

Resources