Results 1 to 6 of 6
- 11-23-2007, 10:09 PM #1
Member
- Join Date
- Nov 2007
- Posts
- 13
- Rep Power
- 0
- 11-23-2007, 10:22 PM #2
If you are using a gui a JFileChooser is an easy way to get a reference to a user–selected file. If using a console application you can use a JOptionPane to receive user input and pass the file path off to your BufferedReader.
- 11-23-2007, 11:25 PM #3
Senior Member
- Join Date
- Nov 2007
- Location
- Newport, WA
- Posts
- 141
- Rep Power
- 0
The reader is null. A NullPointerException is thrown when you attempt to access something that is null.Java Code:BufferedReader br = null;
Java Code:BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
- 11-23-2007, 11:47 PM #4
Member
- Join Date
- Nov 2007
- Posts
- 13
- Rep Power
- 0
i had to initialize it thats why I typed null.
i want to use the JOptionPane.
anyway thanx for your reply. ;)
- 11-24-2007, 02:49 PM #5
Member
- Join Date
- Nov 2007
- Posts
- 1
- Rep Power
- 0
hallo
Hi guy, I'm new in java. I hope this forum will make every body know java.:D :rolleyes:
- 11-24-2007, 04:31 PM #6
Member
- Join Date
- Nov 2007
- Posts
- 13
- Rep Power
- 0
This forum is for introductions http://www.java-forums.org/introductions/
Similar Threads
-
JFileChooser example (selecting a directory)
By Java Tip in forum Java TipReplies: 1Last Post: 02-03-2009, 01:25 PM -
Localize JFileChooser
By Java Tip in forum Java TipReplies: 0Last Post: 03-14-2008, 11:54 AM -
JFileChooser remember the location
By Mr tuition in forum AWT / SwingReplies: 3Last Post: 12-08-2007, 05:17 PM -
how to use JFileChooser
By tommy in forum New To JavaReplies: 1Last Post: 08-06-2007, 08:49 PM -
help with IP scanner
By tommy in forum New To JavaReplies: 1Last Post: 08-06-2007, 08:00 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks