Friends i am trying to develope a desktop application it's requirement is
1.It should have 2 browse button after clicking on that file open box should appear like
jfilechooser in swing
2 Then i have to select that file and require it's url for future use.
3.My application contains just 2 buttons and on clicking on that i want to call a function that compare that file(logic for that i already written)
4.I am using eclipse for that
so overall i can say my application is simple so what should i use javafx or swing for gui?
if any other conveniant option is present please tell me.please give me option which are open source
You could implement it using Swing.
If you want it to be on a variety of devices (desktops, mobile or browsers) then choose JavaFX.
If u require rich look and feel in your application,use JavaFx.Otherwise Swing is also good.
Related
I'm using the latest version of JavaFX and I'm trying to open a user dialog to select multiple folders at once. I know you can do it in Swing but I'm trying to do it in JavaFX. I tried using DirectoryChooser but as far as I can see there is no method that allows you to choose multiple directories. Does anyone know how I can go about this or should I just use Swing?
I have a situation where I need to push text to 3 text boxes of a small one-form Swing application and then press a button (in other words, automation). The application is not written by me and is available only as a jar file.
The situation is similar to that of test frameworks that do UI test automation. (If it were a Windows / .NET / SWT application, something like Project White framework would be useful. )
Is such a thing is possible? Thanks in advance.
You can fix the swing application on the desktop, and get the absolute positions of text boxes and the button. Then, use the quick macro to send the right events of keyboard and mouse to the swing application.
does anyone know a free windows explorer type of project written in java?
Basically i just want to implement a simple windows explorer but dont want to start from scratch with all the drag and drops, icon arrangements and so on.
Thanks
See File Browser GUI.
You can explore common navigator framework for eclipse, it would use swt, jface, draw2d. It provides with drag and drop options.
I want to automate an external application, but I have several problems:
How can I recognize a button or other field of an external application in Java?
I use the Robot class in Java for making notepad automation where I open notepad, select file menu, and save or exit, etc.
The problem is, it needs X,Y coordinates for the mouse pointer to go to the proper location.
I want to make it more dynamic, i.e. it should recognize the file menu of a running notepad anywhere on the desktop.
How can this be done in Java? Is there any class in Java I can use to do this?
Thanks everyone to give me response, I want to be more specific i want to know how can i make ui automation by using any tool if it is not possible in java or using any api of java.automation tool must be freeware.....i am searching net for that i found AutoIt is like that.But if any one do this type of things please share his/her experiance means is it possible to do that in AutoIt or not possible if not then which tool do that kind of things.
It is easy to integrate Sikuli into a Java-application since it is written in Java. Sikuli uses image recognition to find elements visible on the screen like buttons and such. It is very easy to use and provides an alternative for tasks that are difficult to handle with static positioning, like finding moving windows and such.
Take a look at this: http://sikuli.org/docx/faq/030-java-dev.html
Hope this helps!
You should have a look at Sikuli. It takes as inputs images of the ui elements to select an area in the targeted app. It's a UI Automation Application
That's a bit difficult to install (at least on Debian/Ubuntu, where I tested it), as you'll need a recent version of OpenCV, a particular version of JXGrabKey but the quality of the program worth the trip. Good Luck
Java doesn't have an API to examine the UI of another application; that would be a very big security risk.
Which is why the Robot class can only record events (key presses, mouse movements and clicks) but not which UI element was involved in most cases.
It would be possible to do more if the external application was written in Java because then, you could analyze the objects in memory but for obvious reasons, this isn't possible for C++ or .NET applications.
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)