aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Problem with JFileChooser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Problem with JFileChooser" Watch "Problem with JFileChooser" New topic
Author

Problem with JFileChooser

James Basller
Ranch Hand

Joined: Sep 07, 2008
Posts: 58
Hi All,

I have made a simple Swing Program which consist of following fields.

JTextField,JButton,JFileChooser

Now, when user select file from JFileChooser the whole path will be set into the TextField.

This works perfectly on Windows OS but when I am trying to run application on Mac OS then it's not reflecting selected file means it's not selecting selected file by JFileChooser.

Is this OS level issue or should I need to change anything regarding Mac OS?

Thanks in advance!!!

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42274
    
  64
This doesn't sound like something where there should be any differences between the various OSes.

At which point does it break down - Is the path returned from the JFileChooser correct? Is the code to set the text in the JTextField being called? Seeing a short code excerpt that performs these steps would be helpful.


Ping & DNS - my free Android networking tools app
James Basller
Ranch Hand

Joined: Sep 07, 2008
Posts: 58
Ulf Dittmer wrote:This doesn't sound like something where there should be any differences between the various OSes.

At which point does it break down - Is the path returned from the JFileChooser correct? Is the code to set the text in the JTextField being called? Seeing a short code excerpt that performs these steps would be helpful.



Hi,

Thanks for considerations. Actually when user select file from JFileChooser Dialog it's not reflecting to the textfield. Means I think file selection is not affected. What I am doing is when user selects file from filechooser then I take absolute path of that file and will be displayed in the textfield. But on Mac it's not selecting file in that.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42274
    
  64
Well, that's pretty much what you said in your first post already.
What are the answers to the questions? Without those, it's going to be hard to help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with JFileChooser