• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

JFileChooser customizing

 
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because you are accessing internal components that differ between look-and-feel implementations.
 
Yahya Elyasse
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!