JFileChooser

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

JFileChooser

Postby mjdousti » Tue Feb 05, 2008 10:38 pm

Hi all,
Is there any way in Window Builder to add a JFileChooser as an actionPerformed of a component? I.e. without coding.

Thanks in advance.
mjdousti
 
Posts: 2
Joined: Tue Feb 05, 2008 10:34 pm

Re: JFileChooser

Postby Eric Clayberg » Wed Feb 06, 2008 4:05 am

mjdousti wrote:Is there any way in Window Builder to add a JFileChooser as an actionPerformed of a component? I.e. without coding.

Your can use WindowBuilder to add an actionPerformed event handler to a widget like a button. The tool can also optionally create a stub method that is called from the event handler. What you do in that event handler is up to you. Opening a file chooser would be one line of code.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: JFileChooser

Postby mjdousti » Wed Feb 06, 2008 11:38 am

It's obvious that we can easily instantiate a JFileChooser. But I want to know is there any specific and built-in method for this work in Window Builder.
Really, some configuration of JFileChooser (such as filter) is time consuming and I want to do it automatically.

I think, (from your text) , Window Builder hasn't this feature, isn't it correct?
mjdousti
 
Posts: 2
Joined: Tue Feb 05, 2008 10:34 pm

Re: JFileChooser

Postby Eric Clayberg » Thu Feb 07, 2008 6:36 am

Opening a JFileChooser is something you presumably want to do in response to an event. Not only do you need to open it, you also need to gather the response from the user and do something with it. That falls into the category of dynamic behavior rather than static GUI definition. WB is a GUI builder, but it is not a visual programming tool (not yet anyway).
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to Swing Designer

Who is online

Users browsing this forum: No registered users and 1 guest