This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes JFileChooser problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JFileChooser problems" Watch "JFileChooser problems" New topic
Author

JFileChooser problems

Ben David
Ranch Hand

Joined: Oct 01, 2010
Posts: 67

NOTE: THIS POST IS IN REGARDS TO SCHOOL -- not my job -- SO PLEASE DO NOT RESPOND WITH EXACT CODE -- just point me to what I am doing wrong.


I am trying to use a JFileChooser. But #1 it seems to ignore the file filter I set, and #2 I can't seem to get any return value from it. Actually -- my entire program seems to die when I click "Open" because the following JOptionPane.showMessageDialog never shows at all.

Can someone point me to what I am doing wrong.


Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 4086
    
  18

It works swimmingly for me.


The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
Ben David
Ranch Hand

Joined: Oct 01, 2010
Posts: 67
lovely. This is the second time NetBeans has screwed up a project. I created a new project, pasted in the code, and works great for me now too.

Probably need to start another thread for this, but.... Is there anyway to tell netbeans to just ignore what it thinks it knows about a project, and to reevaluate the code?

Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 4086
    
  18

Clean and build.
Ben David
Ranch Hand

Joined: Oct 01, 2010
Posts: 67
thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JFileChooser problems
 
It's not a secret anymore!