2 Replies - 161 Views - Last Post: 02 October 2011 - 06:45 PM Rate Topic: -----

#1 cornetto456  Icon User is offline

  • D.I.C Regular

Reputation: 21
  • View blog
  • Posts: 438
  • Joined: 03-January 11

JFileChooser: Not getting the file.

Posted 02 October 2011 - 05:10 AM

Hi,

Im having a problem with my JFileChooser :(.


Im making a sort of syntax reader.

That suports complex and simple things (atm simple :P)

But now,

it seems it doesn't come tho that function?

So,

here is the file chooser :
@Override
	public void actionPerformed(ActionEvent ae) {
		// TODO Auto-generated method stub
		if (ae.getSource() == menuclient.Load ){
			
			if (returnVal == JFileChooser.APPROVE_OPTION){
				 SFile = fc.getSelectedFile();
				 String line = null;
				 try {
					in =  new BufferedReader(new FileReader(SFile));
					filechooserlog.info("Were getting here!");
				
				 
			
				 
		
					
						while ((line = in.readLine()) != null){
							  if (line.startsWith("Name:")){
								  filechooserlog.info("Name is readed TODO: Pass value :D/>");
								  
							  }
						 }
					} catch (IOException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}
			}
		}
	}



im using a logger for debug ends.

And it seems it doesn't come there.

:(.

Anybody some idea's?

Thanks,

Arno(Cornetto456)

Is This A Good Question/Topic? 0
  • +

Replies To: JFileChooser: Not getting the file.

#2 g00se  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2652
  • View blog
  • Posts: 11,189
  • Joined: 20-September 08

Re: JFileChooser: Not getting the file.

Posted 02 October 2011 - 06:41 AM

Quote

im using a logger for debug ends.


Where? I only see .info calls ...

Learn to place debugging statements into your code. Some of these will use the logger, others won't. You will then find out where execution HAS reached.
Was This Post Helpful? 0
  • +
  • -

#3 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8324
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: JFileChooser: Not getting the file.

Posted 02 October 2011 - 06:45 PM

Please avoid duplicated posts
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1