[Advanced-java] fileDialog question

Joe Sam Shirah jshirah at attglobal.net
Wed Aug 27 19:42:46 2003


    JFileChooser is a JComponent not a Panel, although that also makes it a
Container, but David is on the right track.  See

            JFileChooser.setControlButtonsAreShown( boolean b ).


                                                         Joe Sam

Joe Sam Shirah -        http://www.conceptgo.com
conceptGO         -        Consulting/Development/Outsourcing
Java Filter Forum:       http://www.ibm.com/developerworks/java/
Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
Going International?    http://www.jguru.com/faq/I18N
Que Java400?             http://www.jguru.com/faq/Java400



----- Original Message -----
From: "David Rosenstrauch" <david.rosenstrauch@aleri.com>
To: <advanced-java@lists.xcf.berkeley.edu>
Sent: Wednesday, August 27, 2003 9:36 AM
Subject: Re: [Advanced-java] fileDialog question


> Well, if you're using Swing, you could try using the JFileChooser.  It's a
> panel, first of all, not a Dialog, which sounds more along the lines of
what
> you want.  And also, it's much more customizable.  I don't know if you can
> remove the ok/cancel buttons from it or not (although I suspect you can,
but
> it might take some doing), but you can rename them.  That might be a
> sufficient solution - rename those buttons and get rid of the button
> elsewhere in your frame.  But like I said, it may even be possible to get
rid
> of them altogether.
>
> HTH.
>
> DR
>
> On Tuesday 26 August 2003 01:49 pm, Mark Yang wrote:
> > Hi,
> >      Anyone knows How I could make the "OK" and "cancel" button not
> > shown up on the fileDialog?
> >      I did something like this:
> >       fileDialog fd = new FileDialog();
> >     then I have this fd added to my frame to have a file window that I
> > can choose file from but I don't need those 2 buttons, I have a
> > "transfer"  button somewhere else in my frame which will do the stuff I
> > want to do with the file I selected.
> >     I am really stuck here, any suggestions will be appreciated!!
> > Mark
> >