function / methods

Reply

Join Date: May 2008
Posts: 47
Reputation: 4ukh is an unknown quantity at this point 
Solved Threads: 1
4ukh 4ukh is offline Offline
Light Poster

function / methods

 
0
  #1
Aug 17th, 2008
hi guys

how to achieve a goal like this in java programming:
when i click a button it prompt me a browsing window to locate some file(s) or folder(s)...
basically i need a specific function...

any help will be appreciated

best regards
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 410
Reputation: sciwizeh is on a distinguished road 
Solved Threads: 22
sciwizeh's Avatar
sciwizeh sciwizeh is offline Offline
Posting Pro in Training

Re: function / methods

 
1
  #2
Aug 17th, 2008
My site, random PM's from people I haven't hear from before will be DELETED
"If people are good only because they fear punishment, and hope for reward, then we are a sorry lot indeed.",
"If we knew what it was we were doing, it would not be called research, would it? "
-Albert Einstein
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 47
Reputation: 4ukh is an unknown quantity at this point 
Solved Threads: 1
4ukh 4ukh is offline Offline
Light Poster

Re: function / methods

 
1
  #3
Aug 17th, 2008
thanks for the help...

it seem work for me...
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 410
Reputation: sciwizeh is on a distinguished road 
Solved Threads: 22
sciwizeh's Avatar
sciwizeh sciwizeh is offline Offline
Posting Pro in Training

Re: function / methods

 
0
  #4
Aug 17th, 2008
does that mean that your problem is solved?
when a button is presses, i assume you do already know how actionListener works.
My site, random PM's from people I haven't hear from before will be DELETED
"If people are good only because they fear punishment, and hope for reward, then we are a sorry lot indeed.",
"If we knew what it was we were doing, it would not be called research, would it? "
-Albert Einstein
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 47
Reputation: 4ukh is an unknown quantity at this point 
Solved Threads: 1
4ukh 4ukh is offline Offline
Light Poster

Re: function / methods

 
0
  #5
Aug 18th, 2008
no not yet but I'm working on it...

private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {
// here i don't know how to invoke the "JFileChooser".....

}


any help....!


thank you
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 410
Reputation: sciwizeh is on a distinguished road 
Solved Threads: 22
sciwizeh's Avatar
sciwizeh sciwizeh is offline Offline
Posting Pro in Training

Re: function / methods

 
0
  #6
Aug 18th, 2008
did you read the sun tutorial (my first post, the JFileChooser was a link (as is this one)? it explains the usage quite thoroughly...

a quote almost but not quite 1/4 down the page
Originally Posted by Sun Tutorail
  1. int returnVal = fc.showOpenDialog(FileChooserDemo.this);
  2.  
  3. if (returnVal == JFileChooser.APPROVE_OPTION) {
  4. File file = fc.getSelectedFile();
  5. //This is where a real application would open the file.
  6. log.append("Opening: " + file.getName() + "." + newline);
  7. } else {
  8. log.append("Open command cancelled by user." + newline);
  9. }
My site, random PM's from people I haven't hear from before will be DELETED
"If people are good only because they fear punishment, and hope for reward, then we are a sorry lot indeed.",
"If we knew what it was we were doing, it would not be called research, would it? "
-Albert Einstein
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 47
Reputation: 4ukh is an unknown quantity at this point 
Solved Threads: 1
4ukh 4ukh is offline Offline
Light Poster

Re: function / methods

 
0
  #7
Aug 19th, 2008
yes I've red that and it was quite helpful...

well im still far away form the objective which im working on... but sooner or later it will be done... yah...

thanks for the help
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC