• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

JFilechooser event double click problems

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi!!!

don't show message when i click in jfilechoooser

this is code:



where is the problems???
 
Marshal
Posts: 73961
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why are you adding that Listener in the first place?
 
paul beppe
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how to do???

i don't understand my problem

i have add Listener for show message and later add name of file selected in JTextArea....

help me please!!!
 
paul beppe
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i want show message with double click on JFileChooser and i have add Listener in chooser...

 
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree with Campbell: opening a dialog from within a dialog does not seem to be a good UI.

(Personally, I prefer using java.awt.FileDialog over javax.swing.JFileChooser - it gets you a native component that is far more functional than Swing's component. Unless you're using specialized features like accessories, that is.)
 
paul beppe
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in this site web
http://stackoverflow.com/questions/10232281/java-jfilechooser-returns-the-selected-directory-instead-of-browsing-it

there is one example

bat i have problem...

help me please!!!

i want open file in jfilechooser with double click

 
Campbell Ritchie
Marshal
Posts: 73961
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The dialogue from a file chooser has a particular means of operation, and you should use that as a preference.
I never knew about FileDialog.
 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
there are two (non important issues :-), then works in all cases (from two jokes, so funny 1.7_045/_051 too)

- JOptionPane should has a parent (JComponent declared inside current class or JComponent declared and initialized as local variable)

- JOptionPane should be wrapped into invokeLater (delayed to the end of EDT)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic