File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 3646
    
  16

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: 3646
    
  16

Clean and build.
Ben David
Ranch Hand

Joined: Oct 01, 2010
Posts: 67
thanks!
 
Don't get me started about those stupid light bulbs.
 
subject: JFileChooser problems