*
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 Android Security Essentials Live Lessons this week in the Android 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: 3605
    
  14

It works swimmingly for me.
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: 3605
    
  14

Clean and build.
Ben David
Ranch Hand

Joined: Oct 01, 2010
Posts: 67
thanks!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JFileChooser problems
 
Similar Threads
excluding files using FileFilter
Prompting the user whether to close the JFrame
FileChooser.getSelected() turn into Blob
java exercise help
FileFilter for excluding all files (*.*)