Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1134

Re: JFileChooser

From "tar" <tar@THRWHITE.remove-dii-this>
Subject Re: JFileChooser
Message-ID <ymilkia5ker.fsf@sevak.isi.edu> (permalink)
Newsgroups comp.lang.java.gui
References <1172847936.009276.223590@n33g2000cwc.googlegroups.com>
Date 2011-04-27 15:31 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
"Andrew Thompson" <andrewthommo@gmail.com> 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

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

JFileChooser "urpriya" <urpriya@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
  Re: JFileChooser "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
    Re: JFileChooser "tar" <tar@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
  Re: JFileChooser "Hulker69" <hulker69@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
    Re: JFileChooser "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
      Re: JFileChooser "Dan Andrews" <dan.andrews@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
  Re: JFileChooser a24900@googlemail.com.remove-dii-this - 2011-04-27 15:31 +0000

csiph-web