How can open a file using Jbutton ... means that when i click a certain buttion a library will pop up and let you select your files ..
7 replies to this topic
#1
Posted 12 March 2011 - 01:55 AM
|
|
|
#2
Posted 12 March 2011 - 02:40 AM
You need the JFileChooser
JFileChooser fc = new JFileChooser(); fc.showOpenDialog(null); File file= chooser.getSelectedFile();
#3
Posted 12 March 2011 - 02:53 AM
wim DC said:
You need the JFileChooser
JFileChooser fc = new JFileChooser(); fc.showOpenDialog(null); File file= chooser.getSelectedFile();
Ok thx .. the library open up :) but when i select the file to open there's an error ..
#4
Posted 12 March 2011 - 04:21 AM
which error?
#5
Posted 12 March 2011 - 04:25 AM
wim DC said:
which error?
sorry I mean i cant open the file i want .. Sorry I'm new to java .. :(
here's a screenshot of the error :
#6
Posted 12 March 2011 - 04:36 AM
Actually the first 2-3 lines of the error are usually the most important, and those just didn't make the screenshot :)
#7
Posted 12 March 2011 - 04:44 AM
does that mean that if i solve the 1st 3 line of the error the problem will be solve ?
#8
Posted 12 March 2011 - 04:58 AM
This problem, yes. All those lines are only 1 error.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









