Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
jfilechooser
- Page 1
Re: JFileChooser
Programming
Software Development
14 Years Ago
by JamesCherrill
JFileChooser
gives you a file. Serialization writes to a file. You really don't need anything else. Just start with the file chooser and use its file in the serialization. One just goes right after the other. Try it.
JFileChooser Help
Programming
Software Development
14 Years Ago
by Progr4mmer
…quot;save".equals(e.getActionCommand())){ final
JFileChooser
fy = new
JFileChooser
(); fy.setApproveButtonText("Save"); fy.… returnVal = fy.showOpenDialog(JB.this); if (returnVal ==
JFileChooser
.APPROVE_OPTION) { File sfile = fy.getSelectedFile(); try { …
Re: JFileChooser
Programming
Software Development
14 Years Ago
by ceyesuma
… kind of user interaction - eg clicking a menu item. The
JFileChooser
returns you a File object, so you then open some… then. However,I have been able to collect info on
JFileChooser
and Serializable but not a single example that shows them…
JFileChooser
Programming
Software Development
14 Years Ago
by ceyesuma
… to have the JMenuItem on the JInternalFrame to open a
JFileChooser
to save the file in a Location and call a…
Re: JFileChooser
Programming
Software Development
14 Years Ago
by JamesCherrill
In a word - yes. You need to call JFileChoser in response to some kind of user interaction - eg clicking a menu item. The
JFileChooser
returns you a File object, so you then open some kind of output Stream (eg new ObjectOutputStream) to that File, and write your data to the Stream
JFileChooser exception
Programming
Software Development
15 Years Ago
by Web_Sailor
… public void actionPerformed(ActionEvent e) {
JFileChooser
fileChooser = new
JFileChooser
("."); int status = fileChooser.…//System.out.println(mypathfile); } else if (status ==
JFileChooser
.CANCEL_OPTION) { System.out.println("canceled"); }…
jFilechooser - I need some help.
Programming
Software Development
15 Years Ago
by P00dle
I need help with
jFilechooser
. I've already made the
jFilechooser
. The problem is that I want to change …function, on different occasions. Changing the code where the
jFilechooser
is instantiated is not an option, since the whole …'s GUI editor, so the code for the
jFilechooser
is not editable. Any assistance would be greatly appreciated.
Re: jFilechooser - I need some help.
Programming
Software Development
15 Years Ago
by P00dle
Thanks guys. I found the solution. Lets assume the name of the
JFilechooser
is fc. [CODE]fc.setDialogType(javax.swing.
JFileChooser
.SAVE_DIALOG);[/CODE] ^ will make it a save dialog [CODE]fileChooser.setDialogType(javax.swing.
JFileChooser
.OPEN_DIALOG);[/CODE] ^ will make it an open dialog. Thanks for the advice. +++REP!
Re: JFileChooser appears along with the main form
Programming
Software Development
12 Years Ago
by skiabox
…io.File; import java.io.IOException; import javax.swing.
JFileChooser
; /** * * @author skiabox */ public class MainForm…returnVal = fileChooser.showOpenDialog(this); if (returnVal ==
JFileChooser
.APPROVE_OPTION) { File file = fileChooser.getSelectedFile(); //…
Re: jFilechooser - I need some help.
Programming
Software Development
15 Years Ago
by javaAddict
Have you looked the API for
JFileChooser
?
Re: jFilechooser - I need some help.
Programming
Software Development
15 Years Ago
by musthafa.aj
at default you can get OPEN dialog... if you want SAVE button then you call code below... [CODE]
JFileChooser
.showSaveDialog(this);[/CODE] put if else condition then call corresponding dialogue.... add reputation point if it is helpful to you
JFileChooser Replaces Existing Files
Programming
Software Development
14 Years Ago
by naxysch
Hello, ok I have a problem with
JFileChooser
.When I save a file with a name that exists … I am using both open and save dialog boxes from
JFileChooser
to open and save ONLY '.xls' i.e excel files…
Re: JFileChooser Replaces Existing Files
Programming
Software Development
14 Years Ago
by naxysch
… UI.fc.showSaveDialog(null); if ( actionDialog ==
JFileChooser
.APPROVE_OPTION ) { File fileName = new File( …actionDialog=UI.fc.showSaveDialog(null); if (actionDialog ==
JFileChooser
.APPROVE_OPTION) { fileName = new File( UI.fc…
JFileChooser appears along with the main form
Programming
Software Development
12 Years Ago
by skiabox
I have created a form and I added a
JFileChooser
on it. When I start the form , the
JFileChooser
appears when the form loads. I gave used netbeans fileChooser tutorial.(http://netbeans.org/kb/docs/java/gui-filechooser.html) Any ideas? Thank you.
Re: JFileChooser Replaces Existing Files
Programming
Software Development
14 Years Ago
by naxysch
Sory forgot to mention 'UI.fc' is my file chooser. UI is the class where i hav created the
JFileChooser
and fc is its name.
Re: JFileChooser appears along with the main form
Programming
Software Development
12 Years Ago
by skiabox
Netbeans generates much of this code when you add a
JFileChooser
in a JFrame
JFileChooser timeout / thread problems
Programming
Software Development
17 Years Ago
by craigmckeeman
… languages. What I am trying to do is use the
JFileChooser
class in a Windows 2000 environment, the user can type…
Re: JFileChooser timeout / thread problems
Programming
Software Development
17 Years Ago
by craigmckeeman
… knowledge is limited made me think that by using the
JFileChooser
class would be a quick way to get my application…
Re: JFileChooser timeout / thread problems
Programming
Software Development
17 Years Ago
by Ezzaral
… and platform-independent UI delegation under the hood of the
JFileChooser
, changing that behavior requires a deeper understanding of the Swing…
JFileChooser editing file names
Programming
Software Development
15 Years Ago
by sridarravi
I have a small question. I am using a
JFileChooser
in one of my projects and I want to make it so that I cannot edit the file name. Is there any way to do this?
Re: JFileChooser editing file names
Programming
Software Development
15 Years Ago
by peter_budo
I cannot find such option in API. If I'm correct you will achieve this only with your custom build
JFileChooser
. Is it worth to do it?
Re: JFileChooser Help
Programming
Software Development
14 Years Ago
by Phaelax
You added the same listener to the save button twice.
Re: JFileChooser Help
Programming
Software Development
14 Years Ago
by Progr4mmer
yeah i realized this a little after thanks! [QUOTE=Phaelax;1483866]You added the same listener to the save button twice.[/QUOTE]
Re: JFileChooser
Programming
Software Development
14 Years Ago
by JamesCherrill
Here, stripped of all the error handling etc, is the essential sequence of steps: [CODE]JFileChoser jfc = new JFileChoser(... jfc.showSaveDialog(... File f = jfc.getSelectedFile(); ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(f)); oos.writeObject(myObject); oos.close();[/CODE] You can get all the error and …
How to make Enter key to open a directory when using with JFileChooser?
Programming
Software Development
13 Years Ago
by htp367
… my simple GUI, I have a part where I use
JFileChooser
to let user browse for a file. The problem is… folder. Here is the code for the
JFileChooser
part: [CODE]
JFileChooser
chooser = new
JFileChooser
(); chooser.setFileSelectionMode(
JFileChooser
.FILES_AND_DIRECTORIES); chooser.setFileFilter(new javax.swing.filechooser…
Re: How to make Enter key to open a directory when using with JFileChooser?
Programming
Software Development
13 Years Ago
by mKorbel
… JButton openButton, saveButton, runButton; private JTextArea log; private
JFileChooser
fc; public GUI() { super(new BorderLayout()); log =… = new JScrollPane(log); fc = new
JFileChooser
(); fc.setFileSelectionMode(
JFileChooser
.FILES_AND_DIRECTORIES); openButton = new JButton("Open a…
source code for Jfilechooser
Programming
Software Development
16 Years Ago
by mabros86
…String args[] ) throws Exception {
JFileChooser
fc= new
JFileChooser
(); if(fc.showOpenDialog(null)==
JFileChooser
.APPROVE_OPTION) { File file= fc.getSelectedFile…(); Scanner input = new Scanner(file); //
JFileChooser
fc2= new
JFileChooser
(); fc.showSaveDialog(null); File outfile=fc.getSelectedFile(); …
Save button in JFileChooser
Programming
Software Development
12 Years Ago
by mateusz.baran1
…Open" to "save" when iam using
JFileChooser
public void actionPerformed(ActionEvent e) { Object zrodlo =e.… "txt"); fc.setFileFilter(filter); if (fc.showOpenDialog(null)==
JFileChooser
.APPROVE_OPTION) { File plik = fc.getSelectedFile(); fileName = plik.getName…
JList & JFileChooser
Programming
Software Development
15 Years Ago
by Perveance
….gf = gf; } public void actionPerformed(ActionEvent arg0) {
JFileChooser
fileChooser = new
JFileChooser
(new File("C:/Program Files/")); int ret… fileChooser.showDialog(null, "Open file"); if (ret ==
JFileChooser
.APPROVE_OPTION) { File file = fileChooser.getSelectedFile(); gf.vf.add(file);…
Rename file/directory using JFileChooser() and JButton()
Programming
Software Development
10 Years Ago
by andruluchko
….JTextField; import javax.swing.JButton; import javax.swing.
JFileChooser
; public class App { private JFrame frame; private …button.addActionListener(null); frame.getContentPane().add(button); fileChooser = new
JFileChooser
(); fileChooser.setBounds(10, 51, 505, 289); frame.getContentPane…
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
Backlink Auditor
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC