Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail From: "tar" Subject: Re: JFileChooser Message-ID: X-Comment-To: comp.lang.java.gui Newsgroups: comp.lang.java.gui In-Reply-To: <1172847936.009276.223590@n33g2000cwc.googlegroups.com> References: <1172847936.009276.223590@n33g2000cwc.googlegroups.com> Content-Type: text/plain; charset=IBM437 Content-Transfer-Encoding: 8bit X-Gateway: time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] Lines: 27 Date: Wed, 27 Apr 2011 15:31:33 GMT NNTP-Posting-Host: 96.60.20.240 X-Complaints-To: news@tds.net X-Trace: newsreading01.news.tds.net 1303918293 96.60.20.240 (Wed, 27 Apr 2011 10:31:33 CDT) NNTP-Posting-Date: Wed, 27 Apr 2011 10:31:33 CDT Organization: TDS.net Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.gui:1134 To: comp.lang.java.gui "Andrew Thompson" writes: > On Mar 3, 1:52 am, urpr...@gmail.com wrote: > > How can i disable the "File Name" TextFeild in JFileChooser? > > The file name present in the textfeild should not be editable. > > If there is only one file that can possibly > be loaded, it is not a 'choice' of file. > Why not simply offer a JCheckBox in a > JOptionPane e.g. "Load Default Settings?", > and dispense with the file chooser > completely? Or else just set the FFileChooser to only accept directories. That would let the user choose a directory in which to read or write the file, but not have control over the filename itself. chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); -- Thomas A. Russ, USC/Information Sciences Institute --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24