Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFileChooser problems

 
Ben David
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Pie
Posts: 6113
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works swimmingly for me.
 
Ben David
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 6113
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Clean and build.
 
Ben David
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic