How can i get this kind of window? - java

In eclipse you can detach tabs and they will displayed in a special kind of window.
Win7 with aero displays it as follows
http://www.oliholz.de/data/1.jpg
How can i produce this frame? i have tried many styles of JFrame,JWindow,JDialog, ...

As other people mentioned eclipse uses it's own library for UI. That library is based on SWT which is better integrated with the native window system.
See this article for explanation on how SWT, AWT, and Swing relate to each other.
Eclipse Rich Client Platform which is also mentioned here can be observed as a layer above SWT that can make your life much easier if you intend to develop a complex, feature rich application (for example an IDE for the new programming language you made).

Take a look at the Eclipse Rich Client Platform. If you want to emulate their look and feel, you might consider building your user interface upon their free (and rather good) open source framework.

Related

Front End for Java App - Not Swing then JQuery or Jerry?

I'm new to Java frond end technologies. If we want to develop a cross platform java app and the look and feel should be like somewhat JQuery UI. If we don't want to use swing or Nimbus for front end, then what is the best option to achieve the JQuery UI look? I guess we can't use JQuery, as the app is a cross platform one. (must be running on linux, Solaris and Mobile) what you suggest?
Is Jerry can be a good option? (I never tried this thing. Find it here.
Thanks in advance.
If you want to create a cross-platform client side application there are basically three good (mature, proven, well-supported) options in Java:
Use Swing with pluggable look & feels to get the exact look you want. Nimbus is an example of a Swing look and feel, but there are many more. You can also create your own custom look and feels - this is quite a lot of work but does give you the flexibility to define exactly the look that you want. Swing is part of the standard Java distribution and behaves pretty much the same on all platforms, so if portability is your biggest concern, the Swing is a solid choice.
Use SWT which is the GUI toolkit from Eclipse. It's a great toolkit, though does have some native dependencies so you might have issues on mobile. SWT provides more of a "native" look and feel to each platform that you run it on.
Use JavaFX 2.0 which is the relatively new rich client framework from Oracle. Probably more suitable for graphical / rich media apps. Supports CSS-like styling which could be useful.
I'm not really familiar with Jerry, but it looks more like a DOM manipulation library rather than a GUI toolkit so I don't think it will help you much (unless you decide to move away from a client GUI and instead build a web-based front end).

Rich client platforms versus JavaFX 2 versus Swing

Pretty soon now, we're gonna need to develop a GUI for creating configurations (more like scripts, to be honest) for our EAI solution at work. Think of a typical workflow editor. The visualization of the actual flows will most likely be a completely custom job, either in Swing, SWT or JavaFX 2. What I have trouble with choosing is whether to do everything else by ourselves or using a rich client platform.
In particular, I've noticed that JavaFX 2 is getting a lot of attention and seems to be really pushed by Oracle as the next big thing in the Java GUI landscape. The demonstrations look interesting and perhaps this newer API is more closely focused on productivity as opposed to the tons of boilerplate code that Swing tends to impose. Using a newer technology that gets a lot of support seems like a safe bet for future maintenance.
Using an RCP would have definite benefits for this project. Whether we go for Eclipse or NetBeans as the platform, having existing plugins/modules for viewing the underlying (XML) config, version control etc. would offer powerful functionality with minimal work. I also like the idea of having project types of our software next to Java projects in the same GUI. Even simple stuff like window management and customly arranging panels is much better handled by RCPs that what we could whip up.
So the question now is, what technology or combination thereof is viable? My options, as far as I can see, are thus:
Eclipse. I'm not too eager for using SWT, though, since I'm more familiar with Swing. NetBeans is also my primary IDE and I'm most familiar with it. It always felt more intuitive too.
NetBeans. This'd allow development of custom components in Swing. A lower learning curve for me.
NetBeans + JavaFX 2. This idea appeals to me... Use NetBeans for the RCP goodness and using JavaFX 2 for custom components. JavaFX 2 apparently integrates with Swing, but how well can this be done within NetBeans?
Swing or JavaFX 2. Do all the GUI work ourselves or use some existing framework(s) to get most of what an RCP offers. This seems like a lot of work but also offers superb control. I'm a bit loathe to try this in Swing. How well would JavaFX 2 suit itself to this?
Basically my only GUI experience is in Swing on small apps. This is the first time I'll be going for something that would warrant a RCP. But JavaFX 2 seems the way forward and I don't want to miss the boat on that one. If Swing might be on the way out, I'd prefer hopping onboard the newer technology.
If there are people who can share their experiences, have tried something like NetBeans + JavaFX 2 or are closer to the forefront of JavaFX and can recommend/discourage its use for this sort of thing I'd be most interested.
I realize it's a somewhat open question, but I can't really think of a more appropriate place. I'm not looking for a "what's the best RCP / is JavaFX better than Swing" debate. I'm looking for valid points for/against their use in this context.
My opinion in few lines,
JavaFX2 can be integrated into Swing and SWT applications into a panel/container.
Swing doesn't provide a structured architecture to deal with multi components applications, Eclipse RCP does but it's heavier and sometimes too complex (WindowWorkbench etc..) and hard to customize.
If you have a good UI Designer in your team (Developer or Graphic Designer) you should begin to work on an application Full JavaFX2 with a simple but powerful framework (like JRebirth or a custom one you can build on your own way).
JavaFX will be the Java UI Standard for years to come, It could'nt be a bad choice, thus its architecure is pretty good and powerful
Moreover javaFX2 could be used into a browser and/or deployed online with help of JNLP.
Don't bother you to learn complex undocumented framework (like EclipseRCP), create Yours !! and be free to make the application your client need :D
I worked 3 years on Swing Appz, 2 years on Eclipse RCP, and 2 years on Flex/Silverlight/JavafX apps
Here some points and (personal) opinions for helping you determining a proper solution for your current situation:
Eclipse vs. Netbeans
Personally, I dont't like big discussions about pros/cons of IDEs. Just use the one you feel most comfortable with. If you work in a team, make a voting. Considering Swing both IDEs are fine (IMHO Netbeans has the better GUI builder). Considering JavaFX 2.0 both IDEs are also fine but both share the absence of a GUI builder. I wouldn't recommend a mixture of IDEs.
JavaFX 2.0 vs. Swing vs. SWT vs. Eclipse RCP
Well, I don't - I even can't - want to tell you which of the above listed UI technologies is best since I don't know enough about your project's environment - experience, human resources, budget, timeline etc. Having a lean timeline and a team(?) of experienced Swing developers should lead the decision to Swing. Same for SWT and Eclipse RCP. Cutting edge developers might tend to try JavaFX. I agree, JavaFX gets a lot attention and you get great looking demonstrations, but keep in mind, that using JavaFX requires - additionally to the JRE - the JavaFX runtime on each client.
Hope this helps.
We switched to javaFx due to FXML usage,you can use MVC pattern ,you can add javascript and css init,but it seems slow when changing page

Document designer interface design

Im working on coding a WYSIWYG document designer. The basic intent of this designer is to be capable of both reading(loading) and creating multiple documents written in a variety of templating languages (ZPL, XSL-FO etc).
Now for the sake of building a WYSIWYG designer, i plan to have an elegant UI which the user can play around with to create/edit the document.
The compulsory needs of the UI is that --
The UI should be such that the user must be able to pick or
choose elements and be able to drop them off on the UI. Once
dropped, the position of the elements should be capable of allowing
repositioning.
The UI must associate the spatial postioning of elements to the
element's metadata (say, x coordinate,y coordinate, height ,width
etc).
The UI must be capable of seamlessly passing on the elements and
their spatial positions to a backend module,written in Java, that
would wither edit or create the document in the specified templating
language.
Im having trouble in deciding what to implement the UI in. I tried Swing and found it to be not great(was pretty rigid for my needs). Any suggestions with regard to what can be used to build the UI described above would be of immense help.
Your underpinnings options are pretty much Swing or SWT.
Not sure what you mean by "rigid"; Swing is a pretty good GUI framework architecturally, although some prefer SWT. Not sure how JavaFX will end up, but it has some nice features.
XUI layers on top. Or take the Griffon approach, although I'm not sure it's a great fit for the type of application you're working on. Or use Groovy/JRuby/etc. to make many aspects of working with Swing/etc. less painful.
IIRC there are Java bindings for QT as well, if the QT licensing works for you.
Perhaps you'll be better served by some rich client platform (RCP) like Eclipse or NetBeans. Both are probably best known as IDEs, but the IDEs are actually built on top of the respective platforms. Using an RCP will take a lot of responsibility out of your hands. Existing plugins/modules can be made to interoperate with your code and facilities such as perspectives (Eclipse) or rearranging panels are accounted for.
Like Dave Newton hinted at, JavaFX could also be a candidate. JavaFX 2.0 is now out and no longer requires the scripting language used in 1.0, instead opting for a Java API that'll feel more natural to experienced Java developers. And it can be used within Swing.

Cross-platform desktop development

I need an advice for cross-platform engine/framework for desktop PC application development (Windows, MAC, Linux). I see 3 possibilities, Qt, Java and Adobe AIR.
It must be easy to install (run-time is a drawback, but C++ wrapper and/or installer can solve the issue I think).
It must be fast and have a rich GUI (not 3D game, but definitely some 2D graphics).
The development environment must be easy to establish and the UI development tool must have drag&drop functionality to define application layout.
Target application must have native look and feel. The professional paid support should be available.
All of these criteria are met by Qt, with the exception of "native look and feel". There is no such thing as a cross-platform framework with native feel, especially on OS X, where users are very demanding about the "feel" of applications. If you really want native look and feel, you are best served by writing a shared framework in C++ or C# and then providing native GUI on each platform (you can use MonoMac to provide a native Cocoa UI using C# instead of the native Objective-C, if that's your cup of tea).
That said, we've been very happy with Qt (and the Commercial support) for cross-platform development. Particularly the new OpenGL accelerated 2D Scene API makes animated UIs quite easy. QtCreator is a decent IDE with visual designer support.
Contrary to others, probably due to the fact that I worked on a real-time trading Swing application, I consider Java to be the best answer to your requirements (however, i consider this question as subjective, as previous answers already shows). Let me develop.
It must be easy to install (run-time is a drawback, but C++ wrapper and/or installer can solve the issue I think).
Using Java, you can rely upon Java Web Start, which is, as far as i know, the best solution for easy to use applications : you click a link on the browser, and the application is installed in start menu/desktop and started as soon as it is downloaded. Seems like Adobe AIR offers an equivalent feature, but to my mind Java Web Start integrates, due to the deepness of its ecosystem, far more powerfull distribution solutions (like, as an example, the easy ability to generate the .jnlp file on demand).
It must be fast and have a rich GUI (not 3D game, but definitely some 2D graphics).
Contrary to most popular belief, generating good graphics in Java is possible. Take as an example a look at excellent filthy rich clients companion site of the excellent book.
The development environment must be easy to establish and the UI development tool must have drag&drop functionality to define application layout.
Eclipse is a defacto industry standard for IDEs, and it integrate multiple DnD IDE builders. I would simply take as example the recently liberated Windows Builder Pro.
Target application must have native look and feel. The professional paid support should be available.
Well, Swing default look'n'feel is indeed a little different from system one. however, there are excellent third-party ones, listed here, as an example.
Finally, some examples :
the excellent Palantir Technologies blog list some outstanding Swing applications
Gephi is a rather complete and efficient high-volume graph viewer
My previous work (don't consider it as a masked ad, it's only a way to show some rather solid Swing).
I would not recommend Java for desktop development. I do not care what other say, Java is still slow compared to native languages like C++. I would go with Qt. The IDE has a GUI builder and can be integrated into Eclipse or Visual Studio.
Here's a helpful resource:
http://qt.nokia.com/products/
Have a look at Appcelerator Titanium: it basically wraps a web app in a browser. You can have anything you want in a GUI using wen tech, but it looks like an ap[p.
Strangely, nobody mentioned Real Studio (now Xojo) which does meet all your requirements:
It is easy to install and does not require a separate run-time
It compiles to native code so is reasonably fast
It has a good UI library that is native for each platform
The IDE is very nice with drag and drop UI designers
Target applications are fully native and use native controls
First of have to mention http://wxwidgets.org/ , one of the most popular X-platoform frameoworks. Depending on the complexity of your application and the requirements to the "nativeness", a cross-platform framework may work for you. The x-platform applications built with framework usually feel a bit "alien", especially on the Mac, but workable. A good example is http://taskcoach.org/.
If your users are tolerant to hearty download sizes, hefty memory requirements and a bit of non-native look-and-feel then plain Java, eclipse RCP or NetBeans platform can work for you. You may save quite a bit of development time going this route.
However I am not aware of cross-platform framework that satisfies all your requirements.
If you need to get to a production-level application, the strategy that I have seen worked best was to stay native but split the UI-dependent code into cross-platform (e.g. C++ business logic) and UI. This way, you will use native interface building tools (each platform has something good there). Depending on the complexity and "finish" requirements of your application you may actually save time going this route.
A great overview of the "Native X-Platform" process can be found in this answer by Chris Hanson.

Build Java UI to run on all platforms

I am really confused over what to use. Options I see are awt, Swing and swt.
My question is which should be best for Desktop Java app on all platforms( Mac,Windows and Linux )with minimum platform dependent code ?
AWT is obsolete, though some of its classes and design form the underpinnings of the Swing API.
Here is my take on the differentiators between creating applications in Swing and SWT:
Swing
+ Forms part of the standard Java-SE platform, so fewer distribution headaches
+ You can create a consistent look and feel across platforms
+ Controls are lightweight, so creating your own is relatively easy
- If you need Swing applications to look like native applications, there may be a lot of work in it; Swing can be styled with a platform look'n'feel, but the results aren't always close enough for everyone's satisfaction
SWT
+ Easy to create simple applications which use native widgets
- Manual resource management
- You need to distribute platform-specific libraries
- You face the lowest-common-denominator problem - not all widgets are available on all platforms, so some will be custom to SWT anyway
Although I've put a lot more minuses against SWT, I wouldn't discount it. Which technology you pick will depend on your project requirements. Picking the library is only the beginning when it comes to UI development.
Swing is the easy, low-maintenance option and I'd agree with the other posters that this is probably the best fit for what you want.
Swing.
AWT is old and too low-level, SWT has native components, and doesn't ship with the JRE (it's a third-party library). Swing is high-level (-ish), and pure-java.
I would go with Swing as the best choice using what's packaged with Java. However, even Swing can make you jump through all the same hoops every time, so I would recommend looking into one of various frameworks that build on top of it and handle most of the boilerplate work of building an app.
There's a JSR for a Swing Application Framework which I have used when it was still in active development, but it's currently frozen. Their project page recommends a fork of that project, and another one called GUTS which uses Google Guice as its dependency injection. Netbeans also has Netbeans Platform.
I know the scope of these frameworks goes outside the realms of "UI", but they handle things like data-binding between your model and your UI which Swing does not do.

Categories

Resources