[Advanced-java] fileDialog question

Lorin Davis ldavis at pangaeainc.com
Wed Aug 27 20:59:08 2003


      javax.swing.JFileChooser chooser = new javax.swing.JFileChooser ();
      chooser.setControlButtonsAreShown(false);

-----Original Message-----
From: Jeffrey Morse [mailto:jmorse@m4cc.com]
Sent: Wednesday, August 27, 2003 12:51 PM
Cc: advanced-java@lists.xcf.berkeley.edu
Subject: Re: [Advanced-java] fileDialog question


I am almost certain you cannot get rid of the dialog buttons since the 
dialog is being created by native library calls. You would have to 
modify the (C)libraries that produce the dialog. JFileChooser is your 
best option.


David Rosenstrauch wrote:

> 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
>>
>>_______________________________________________
>>Advanced-java mailing list
>>Advanced-java@lists.xcf.berkeley.edu
>>http://lists.xcf.berkeley.edu/mailman/listinfo/advanced-java
> 
> 
> _______________________________________________
> Advanced-java mailing list
> Advanced-java@lists.xcf.berkeley.edu
> http://lists.xcf.berkeley.edu/mailman/listinfo/advanced-java
> 

_______________________________________________
Advanced-java mailing list
Advanced-java@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/advanced-java