Implementing a simple UI editor in Java - java

I'm thinking about writing a simple UI designer in Java. I'm just playing with ideas at the moment to see if it is feasible.
It would be good to have something like this as all of our UIs are generated from XML. Just wondering if anyone has tried anything like this before. I know there will be a lot of effort in doing something like this.
Does anyone know of any 3rd party products that already do something like this?
If not then at a simple level, it will have drag and drop support for any component that can be positioned on a panel. Then extra bits will be added. Are there any good samples on the net for this?
Cheers

Dated back to 2005, this has an overview of Java UI Builders:
http://www.fullspan.com/articles/java-gui-builders.html
Here is a page on how to use the Eclipse Visual Editor:
http://www.ibm.com/developerworks/opensource/library/os-ecvisual/
Here is a good page on the different approaches to build UIs in Java:
http://leepoint.net/notes-java/GUI/misc/80gui-generator.html

Which GUI technology are you using? Swing? NetBeans has a very good drag-and-drop Swing GUI editor. For Eclipse there are several plugins.
If you want to see other projects in which a Swing GUI is generated from XML config files, there are different libraries that do this.

Eclipse 4.0 Developer Preview was just released with an xml based toolkit called XWT. It can be styled with CSS and has a GUI builder. This is a developer preview and there will be some changes over the next year as it progresses to release 4.1, but it is useable right now and the community support is really good.

Related

Creating SWT Forms using Eclipse similar to Visual Studio C#/VB, possible?

Please forgive if this question has been asked numerous times. I recently installed Eclipse Classic v3.6.0 which I need to create a little utility using Java. In Visual Studio I can create a new form then from the Toolbar I can drag and drop components (Button, TextBox, ListBox, etc) onto the Form. Is this possible using Eclipse?
I have tried various (see below for a few examples) combination using both Stack Overflow and Google, but nothing that I have seen that discusses this topic. I have read that there are plug-ins for Eclipse and was thinking there might be a plug-in for this type of behavior? I am not sure if this feature is supported out of the box. Any help is greatly appreciated.
"eclipse form drag drop"
"using eclipse drag and drop form creation"
I have also found the following links that show examples for creating Form using SWT, but these are more of snippets. These are great if I want to generate the file myself, but I would like the IDE to most of that work (since I am lazy).
SWT Snippets
http://www.eclipse.org/swt/snippets/
SWT GridLayout
http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/SWTGridLayout.htm
SWT JFace Eclipse
http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/CatalogSWT-JFace-Eclipse.htm
Thanks,
Mark
Instantiations SWT Designer is probably your best bet.

Is it possible to make a visually appealing GUI with JavaFX & Swing?

I would like to do a visually appealing / user-friendly GUI in java. Swing is a limited in terms of "skin" customization. I'm thinking about JavaFX, but I don't get it yet,
what can I achieve with this technology ?
how hard is it ?
do you have examples of real-life examples of Swing/JavaFX integration ?
I would like to do something in this spirit of this, which is built on the .NET framework:
original link: http://www.patrickpayet.com/net/?p=329
edit: is their any getting started overview sample code that I can read to get a general feeling of the work needed to be done to achieve something in the spirit of the screenshot? maybe something like the miglayout's swing demo http://www.migcalendar.com/miglayout/swingdemoapp.jnlp
edit2: I found http://download.java.net/general/openjfx/demos/tutorial.jnlp it's really basic though, linked from http://www.deitel.com/ResourceCenters/Programming/JavaFX/JavaFXTutorialsandDemos/tabid/2187/Default.aspx
Doing such a GUI with JavaFX seems to be rather easy.
For a rapid view on the JavaFX echosystem, I would suggest you to take a look at those sites, showing most of the bleeding edge JavaFX technologies :
Jonathan Giles blog on Swing/JavaFX/Griffon
Dean Iverson blog going more in details about JavaFX components
Amy Fowler blog
And finally, take a look at JavaFX home site samples.
Yes, Swing is very customizable. I recommend reading Filthy Rich Clients.
For an example, have a look at Cezanne L&F.
Swing alone can also create awesome looking UIs. You can explore online for number of plugins and samples to add various features. I'd recommend you go through Romain Guy's Blog & Read his book Filthy Rich Clients. I found this blog really cool.
Swing won't disappoint you.
Swing's L&F can help you in this case.
The traditional way to customize L&F is to write your own UI classes for all components, which is not easy.
The Synth L&F is included in JRE5 and become mature in JRE6. With Synth L&F you can customize your own look and feel with images and painter classes. You can also take a look at this IDE for Synth based L&F.
Also checkout my entry to the JFXStudio challenge last year:
http://jfxstudio.wordpress.com/2009/11/10/challenge-five-winners/
This is a very simple "Video Poker" game written in just less than 3,000 characters (ie 30 lines of code). Note that 90% of the graphical elements are images, which gives you an idea of the scope you have for producing "sexy" UIs.
I'll also add that the main elements of this application were written in one evening. JavaFX is a very powerful tool for UI creation once you get used to it.
Yes, you can do that with JavaFX by writing your own CSS files. Learn more at: JavaFX CSS Documentation
It is actually not that hard if you are familiar with CSS.
you can get colorful original GUI with LookAndFeelMetalizer.
For example phoyo was done with it.

best way to create UI java apps?

I've come across Netbeans but is there any tools out there that lets you build things event driven ?
I'm looking for a feature like being able to drag and drop UI components, and add methods to buttons directly by double clicking it (kinda like visualbasic) and viewing the source.
You can use Eclipse + Jigloo GUI Builder plugin.
In Netbean you have Matisse. See Designing a Swing GUI in NetBeans IDE
There's the Java Visual Editor.
This is nice if you're used to (or are considering using) Eclipse, which in itself is a very popular Java IDE.
IntelliJ IDEA features a nice GUI builder capable of using several layout managers. It's available in the open source community edition. I personally hate GUI builder and prefer more flexible solution like manually coding the layout with the all powerful and easy to use MiG Layout.

Creating a "netbeans property" style dialog box

I've been trying to create a GUI using netbeans, that includes a dialog similar to Netbean's own "property dialog" that appears when designing. ie. a dialog that contains a table that can be expanded by tree nodes. Something like the dialog on this page, http://platform.netbeans.org/tutorials/nbm-property-editors.html
As far as I can understand, the page I linked to describes a custom editor I can set up for use within netbeans while designing - I'm just looking for a way to doing something similar for my actual application I'm writing. Is there an easy way to do this?
I came across this and have tried it but it doesn't quite work in the same way as the standard Netbeans dialog. weblogs.java.net/blog/timboudreau/archive/2008/06/egads_an_actual.html
Any tips greatly appreciated.
This will sound flip... but I am being serious.
The easiest way to do this is to write your app using the NetBeans RCP platform.
You may want to look at the Swing Application Framework, too.
There are a couple SAF samples integrated into NetBeans... You can read about them here: http://netbeans.org/kb/docs/java/gui-saf.html
I could not find a property editor dialog sample, though.
I found a couple other pointers, using this query: http://www.google.com/search?q=how+to+write+a+property+editor+dialog+in+swing
You could take a look into the l2fprod components
(source: l2fprod.com)

How to create a sidebar panel in OpenOffice?

I want to create an OpenOffice.org plug-in that adds a sidebar.
I have successfully installed OpenOffice.org, OpenOffice.org SDK and NetBeans OpenOffice plug-in.
I am familiar with Java, AWT and Swing, so no need to explain these concepts to me.
Now, I want to create a sidebar Panel(or JPanel) in OpenOffice.org Writer application.
How can I do this? It would be in the left and fill all available height(while using a fixed width).
Any idea on how to implement this? I have no OpenOffice.org plug-in past experience.
Thank you in advance.
This is currently not possible through the OpenOffice.org API. You can create menus, toolbars and dialogs. You cannot create dockable windows or panels via UNO. See: GUI Chapter in the Dev Guide.
Exposing this capability through the API is under active development and I suggest you join the api-dev#openoffice.org mailing list to stay on top of things.
The specific feature you asked for was already discussed there and it was suggested that it would be made available with a future update to OpenOffice 3.0. See post in the list archive.
I don't know if there's an easy answer for this. OO.o provides their dev guide here. It appears once you create an UNO component to their spec you can use:
Arbitrary objects written in Java or
C++ [and then] can be called from the user
interface, display their own GUI, and
work with the entire application.
That sounds like what you want to do. Hope this helps!
It's possible since version 4.0.
See https://wiki.openoffice.org/wiki/Sidebar

Categories

Resources