aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JFileChooser customizing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFileChooser customizing" Watch "JFileChooser customizing" New topic
Author

JFileChooser customizing

Yahya Elyasse
Ranch Hand

Joined: Jul 07, 2005
Posts: 510

Hi guys,

I'm Having a save as JFileChooser dialog that i want to customize:

is it possible in the file chooser to hide the Save As (File Name) Label and the text box for File name entering ?

what is the simplest way to do that ?
thanking you much
Yahya Elyasse
Ranch Hand

Joined: Jul 07, 2005
Posts: 510

the following method works correctly on linux & windows:


However when i test on MAC the label Save As: is still displayed and the Save button is disabled. why this ?
can someone help me ?
Kirill Grouchnikov
Greenhorn

Joined: Aug 03, 2006
Posts: 10
Because you are accessing internal components that differ between look-and-feel implementations.
Yahya Elyasse
Ranch Hand

Joined: Jul 07, 2005
Posts: 510

I managed to hide save as label on mac. how ever i discovered another weired problem:

the showSaveDialog dialog functions flawlessly on both Windows and Mac OS X systems except Mac OS X 10.3.9. In this version of OS X only, the save button is visible but disabled and does not change state whether I highlight a directory or double-click it and enter it. However, once I enter text into the Save As text field, the Save button is enabled and files are saved to that directory if I have entered a valid path.

Has anyone else encountered similar problems? Does anyone know a workaround for this? I've tried Google for ideas, but haven't found any mention of this problem elsewhere. Thanks for reading.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JFileChooser customizing