Article View: borland.public.jbuilder.java.swing
Article #8670Problems with JFileChooser
From: Thomas G�lden
Date: Mon, 31 Jul 2000 00:00
Date: Mon, 31 Jul 2000 00:00
51 lines
2081 bytes
2081 bytes
I have problems with JFileChooser:
As soon an object of JFileChooser is instantiated and if JBuilder 3.5 is in
debug mode, I get the following error message:
Microsoft Visual C++ Runtime Library:
Run Time Error:
Program C:\JBuilder35\jdk 1.2.2\bin\javaw.exe
Abnormal program termination.
In running the code in JBuilder 3.5 normal mode the program just stops after
the JFileChooser showing dialog is dismissed.
To what kind of mistake is the error pointing at ?
The JFileChooser component is contained in a component derived from JPanel.
This panel is placed into a JDialog, which opened when the user performs a
menu action. After the JFileChooser component is dismissed with the APPROVE
_OPTION, i.e. the user pressed "Open", another data entry dialog will be
presented.
Here the code snippet:
public class ImportImageDlg extends JPanel {
BorderLayout borderLayout1 = new BorderLayout();
public JFileChooser fileChooser;
ImageFileView fileView;
JPanel preview;
//BoxLayout2 boxLayout21 = new BoxLayout2();
public ImportImageDlg () {
try {
jbInit();
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* put your documentation comment here
* @exception Exception
*/
private void jbInit () throws Exception {
fileChooser = new JFileChooser(); //******** This line causes
the error
... // more code follows
}
Any hints are greatly appreciated.
Thomas G�lden
Thomas.Guelden@t-online.de
Technical Details
Message-ID:
<8m296g$5ei1@bornews.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 111d45,486221aff5cf56bc,start X-Google-Attributes: gid111d45,public From: "Thomas G�lden" <Thomas.Guelden@t-online.de> Subject: Problems with JFileChooser Date: 2000/07/31 Message-ID: <8m296g$5ei1@bornews.borland.com> X-Deja-AN: 652561748 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Organization: Bayerisches Geologisches Landesamt X-MSMail-Priority: Normal Reply-To: "Thomas G�lden" <Thomas.Guelden@t-online.de> Newsgroups: borland.public.jbuilder.java.swing