« Return to Thread: Building GUI based application

Re: Building GUI based application

by DanglingChap :: Rate this Message:

Reply to Author | View in Thread

sean,

again i am really thankful to you for your detail reply.

well I have been in conversation with senior members of our team and i was already trying to say 'em to build things from scratch but they are not willing. so i am still looking around for some other solutions. your text really helped me for my discussion but i'll still look for some NB/SWT or some other framework solution.

On Thu, May 8, 2008 at 6:47 PM, Sean Carrick <seansitsolutions@...> wrote:
Muhammad,

See the answers inline, below...


alee amin wrote:
sean,

Thanks a lot for such a help full reply .. :)..

1: now a days i am going through some evaluation period for some platform. Earlier solution was to build a GUI based solution using SWT, but it has lesser VISUAL support in NB. So i was thinking to use NB Platform for which i am unable to find proper resources. What you suggest. What kind of platform we use for Desktop Based application in Java.
Quick answer:  that depends on you.  Steps for building a GUI desktop application come down to personal preferences.  Personally, I simply create a vanilla Java Application Project, with nothing more than a Main class, and build my entire application from scratch.  But, that's my personal preference, as it gives me more control over the final application.


2: thanks for explaining the binding of events with JFileChooser. But i was trying to bind a bean property to JFileChooser text field. so that what ever string that property (a field of class) contains it is displayed in JFileChooser textfield and on "Browse" button it should select that file by default. We can do it manually but isn't there any way that we *bind* it with JFileChooser properties?
The only way that I know how to "bind" the property is to use the JFileChooser.setSelectedFile() method.  This method takes a File object as a parameter, so you could do the following:

JFileChooser getFile = new JFileChooser(bean.getTextProperty.toString());  // "binds" the property using the constructor.

getFile.setSelectedFile(new File(bean.getTextProperty.toString()));  // "binds" the property at a later point after the JFileChooser has already been created.

These two methods are the only way that *I* know to "bind" the property to the text field on the JFileChooser object.  I don't know if this is what you were looking for, but this is how I do it.  As I said in my answer to question 1, I like to have total control over my application, so I take care of most things via code...I think it comes from my background in other languages.  ;-)


--

Cheers,

Sean Carrick
PekinSOFT Systems
sean@...
http://www.pekinsoft.net

----------------------------------
Proud to be 100% Microsoft free...
----------------------------------




--
Muhammad Ali
http://techboard.wordpress.com
Software Engineer - E2ESP
muhammadaliamin(at)gmail(dot)com

 « Return to Thread: Building GUI based application