Free XML based java gui language with builder - java

Is there a free decent java GUI descriptor language (probably XML based), which has a Glade-like (WYSIWYG) GUI builder?

Netbeans IDE. Whenever you use its GUI editor, it stores the GUI in XML, in a *.form file.
For example if your create a class com.some.package.MyForm which extends some Swing component or window, look for this file $SRCDIR/com/some/package/MyForm.java and $SRCDIR/com/some/package/MyForm.form.
The former is the actual Java class that gets compiled. The latter is a file that Netbeans uses to store the GUI in XML format. This is what netbeans uses to generate the auto-gen'd code that goes in the code fold to initiliase the GUI.
HTH
Edit:
I do acknowledge that the Netbeans IDE probably isn't the best one out there, and I personally use it only because it's already built into the IDE that I use anyway. For me it gets the job done, and I may sometimes have to manually apply tweaks in the code to get what I want. It's a no-frills, XML-based, Java GUI, WYSIWYG editor.

Sorry this is prob not the answer you were looking for but have you looked into using flex? The markup in Flex is all XML based and the builder is very good.
Blaze DS can then be used to communicate between flex and Java.
Dont know any pure xml layout frameworks off the top of my head. Whats your reason for wanting an XML based UI?

Simple googling yields me many like http://swingml.sourceforge.net/, http://jfcml.sourceforge.net/,http://cookxml.yuanheng.org/cookswing/etc.
You can try JavaFX, it is too a cool DSL way of representing the Swing components and it provides more of its own for API for animation and graphics usage.
Netbeans and eclipse have plugins/extensions to do DnD development for it.

Related

Pure java alternative to GIMP with *live* plugin development?

Basically, I want to combine the Eclipse compiler+Java source editor with a nice Java GUI for image editing/processing in order to allow code-based image processing plugin development directly inside the image processing app.
What's the easiest solution for doing that? Start off with Eclipse and build an image processing tool out of it? Or just use parts of Eclipse (editor+compiler)? Are there any example projects doing something similar?
Marvin Framework provides feature extensibility through plug-in interface. Basically, it allow you to implement an image processing algorithm as a Java class that can be loaded dynamically on your application.
Regarding your idea, consider a Java application combining an image editing software and a source code editor. After writing the image processing algorithm, the user clicks on "Execute". The application:
saves the source code as .java file.
call the Java compiter to generate the .class
Load the new class dynamically into the application through Java Reflection
It is basically what MarvinEditor does to let developers to add new plug-ins to the application. Take a look at Marvin Prototyping Environment. It's similar to your idea.

Web UI for existing Java application

I am trying to build a search engine using java and the lucene API as part of a project. For the last step, we plan to build a web UI (a local host would do) for the same. Are there UI softwares/plugins for eclipse which will allow me to call the functions present in the java classes?
Essentially I would want to have a search box and a search key, pressing which will throw up the search results(which is computed from the java program). javascript cannot call java code I understand. So using that is eliminated?
Any suggestions on what to use will be greatly appreciated. I have pretty poor knowledge in front end design!
Cheers!
AB
If all you have is a simple screen with a entry field and a button and you simply want to return an html table. I would go with a servlet and two jsps. Your servlet can call your search engine and then have the jsp format the data into the table. If you do not know web apis this is probably the easiest entry.
I think, If your using JAVA, that you should look into JSF.
It's a rather easy to maintain and work with library for just the uses you describe.
I recommend these tutorials to get you started: http://www.coreservlets.com/JSF-Tutorial/jsf2/#Tutorial-Intro
There are lots of options to achieve this.
you can create web-ui using jsp.
I have also created same type of project using Lucene, here i have used spring mvc.i have provided all the back-end process as REST api which any web-ui can use.
Please do not look into JSF; it is an overengineered pile for your task.
Sure you can call your java code from javascript, you can make it really simple with something like DWR.
However, for your project I would suggest GWT as then you only deal with Java and it will generate javascript, html and css for you.
For your project you dont really need an "enterprise" level framework like spring or a fullstack JavaEE, you could keep it real oldschool with only JSPs and html/javascript. However thats a bit too flaky for my taste, so go with GWT.
With GWT you basically set it up, define your module, entrance point (look at the hello world), and then you add a layout to your page like something to place the searchbox into and the resultbox to. Then you call your other Java code and classes from there like you normally would.
I would suggest you to use GWT in your application because GWT enables you to call java methods and it will also convert Javascript and css for your Java modules after GWT compile.
GWT reference :- http://code.google.com/webtoolkit/gettingstarted.html
If you're going to use GWT, you could aslo check Vaadin.
Creating a search UI is really simple, and the tutorial show a criteria /result table application taht could be adapted.

Converting Swing app to web

I have Java code of the algorithm that has numeric values as its input and output. The GUI is implemented as Swing in Eclipse. Now I would like to tranfer to the web environment and create the web-tool using JavaScript or sth like this. Is there any way to use the Java code of my algorithm without rewriting it?
if your logic and goi all together at the same class you need to remove all the GUI part and stay with all the logic. after you have logic class you can use what ever goi you want(swing, html, jsf....)
Another alternative is to skip the HTML part by hand and just create your HTML app in Java. No need for separate servlets serving Java validation to your HTML inputs. The open source framework Vaadin that we've been working on since 2001 and it has an almost 100% similar API to Swing could be an alternative for this for you. And it would hopefully save you a lot of time.
As a swing developer the most relevant starting point for you would be: https://vaadin.com/swing
You can look up in to servlets and if you do it in netbeans then will be much easier for you.

Best way of printing simple reports in java

I have developed a Java application and now i want to give some simple printing support. Something like printing invoices , some reports etc.
Right now I'm creating that stuff in html, showing it on JEditorPane. but html support is quite poor and I'm really fade up of that thing. Is there any better way of doing such thing?
Any better browser component, or better tool to create such simple reports? (JDK 1.6)
I love JasperReports for that. In combination with iReport (a GUI for creating the reports) is the best I could find for free in Java to do reporting.
You can also generate PDFs files with iText for printing. Although I think it will be easier to use iReports.
JasperReports is a pretty nice reporting tool for Java. It could be a bit heavy weight for what you want.
Another solution is BIRT which is very simple to use : it is an Eclipse project with a visual editor for your reports. The report is built in 3 steps :
create a DataSource
create a DataSet on this DataSource
create your report, based on the DataSet
DynamicReports is an open source reporting tool. You can create reports quickly without needing to use a visual designer. See the examples.
When printing invoices and reports, no doubt you want them to look more than basic - hence your problem. If your swing application has a server-side component, then look at libraries like Jasper and Docmosis to produce decent reports from the server (since heavy-weight server side is typically aok). If you really need a library just for a client app, there's an old library called JViewPro which is pretty yuk to code with, but can let you layout reports in code for displaying and printing and is a single jar (just be careful about memory usage).

Java Swing: Generating dynamic GUI forms from XML

I am writing this application in Java, where I have a JTree on the left of the JFrame, and the item selected in the JTree determines what appears on the right. This is similar to Edit --> Preferences in Thunderbird, and several other applications' preferences.
Anyhow the main difference is that in my app the stuff on the right is dynamic, and needs to be generated at run time using input from a file.
What I am after is various ways in which this can be accomplished, code snippets or existing frameworks / libraries if they exist.
The input file needs to be something higher level than the sort of XML generated during Serialization. No output capability is required.
Thanks
The JEasy Framework looks to do exactly what you're asking for.
But here's a whole list of similar projects: http://java-source.net/open-source/xml-user-interface-toolkits
There's a short description for each one and a link to their project page. You'll want to look at a handful of the ones that sound good to you, and then try one or two for yourself.
As of now i think one of the most actively used is Swixml. better support compared to JEasy.
have been using it for some while now, and is very easy to learn too
Perhaps it - http://www.soyatec.com/eface/ - XAML/WPF for Java.

Categories

Resources