JFileChooser problem - A bug ???

Hi all,
i am facing a unique problem with the JFileChooser. when i go to the "Look in" drop down list and select "Network Neighborhood", what i expect is to get a list of all computers on my LAN. i do get it, but the filechooser does seem to recognise the system names. the names that r displayed seem to be kind of substrings of "Network".
E.g: etwork, ft Network, soft Network etc..., instead of proper system names.
but when i double click on a folder, then it displays the shared folder names correctly, and also identifies the system name. it says something like:
"folderName" on "systemName"
if the filechooser is able to recognise the system name here, then why does it not display the system names properly in the aforesaid place (ie, when i select Network Neighborhood) initially.
am running jdk ver 1.4, on a windows 98 system. is it somekind of a bug or am i missing something that i need to do ? could not find any help from the API.
any idea anyone ???
thanks
- satyen

1.4.2 has a fix for JFileChooser, although I am not
sure its this problem, or hopefully the one I see
often, when I click the drop down box to navigate to a
network drive, it sometimes takes a VERY long time, on
the order of hours, for the drop down to show up. On
of our clients is seeing this now, so I am not sure
why this is.The problem here is that Windows98 Network communication is appalling slow a lot of the time and some bits of it is broken.
Getting the members list from a network can take an age simply because you sometimes have to broadcast a query on that network to find all the machines on it. This is not a Java related problem (although I suspect that VM support for Windows98 has slipped in priority ).

Similar Messages

  • Copy and paste adjustment  problem/ possible bug.

    Hi all
    I have just encountered a very strange problem/ possible bug.
    I have been working on a file in photoshop cs5 that had come from lightroom 5.3. This was then saved (automaticaly becomes tiff file in Lightroom). I then wanted to make some more adjustments to it in lightroom (using local adjustment clarity). I then tried to copy the settings of the adjustment brush  from the tiff to the original raw file. This is where it gets very strange. The adjustments are copied but they are rotated ccw by 90 degrees!  I can replicate this every time.
    Could someone else try to see if this problem exists on their catalogs or if its a corrpution problem my end.

    Noted on the bug, thanks.
    1762hd wrote:
    Hi Geoff
    Heres the summary for bug report - please note this bug also affects radial filter/healing brush and crop
    Scenario
    1 open a portrait raw image in photoshop using render using lightroom (I am using cs5)
    2 back in lightroom make a change using the - adjustment brush/ radial filter/healing brush or crop - to the newly created tiff image.
    3 copy and paste this adjustment to the original raw file.
    problem
    all effects are rotated.

  • JFileChooser has a bug in 1.6?

    Hi,
    With JRE 1.5/1.4, I believed when you bring up the JFileChooser dialog and select the "Detail" view, you will get 4 columns: Name, Size, Type, and Modified.
    With 1.5/1.4, there seems to be 2 problems:
    1. You cannot sort the list by clicking on the column header
    2. The timestamp doesn't reflect the timezone.
    With 1.6, you get only 3 columns: Name, Size, Modified. However, the values in the Modified column should by "Type" instead. Is this a bug with the JFileChooser in 1.6? Have others seen the same thing?
    --Chung                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    In java 1.6.0_06 it works fine...

  • JFilechooser Problem

    Hi,
    i have 2 problems with filechooser(jdk1.4.2)
    How can i deduct the change of Filetype in the Filechooser Combobox ,since
    i am entering some filename in the textfield of FC , if i change the File type the text inside the textfield is deleted .. i dont want to delete the text if i choose "all files " ..Can anyone suggest me how to do..?
    2.If i do some file/dir search for some letter ,the Scrolbar in List is not moving ,
    but the character is selected ..
    Regards
    Ganesan S

    You can add a PropertyChangeListener to JFileChooser and listen for JFileChooser.FILE_FILTER_CHANGED_PROPERTY events. The problem you describe is covered by the following bug report:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4678049

  • JFileChooser crashes JVM - bug basically ignored. What can I do?

    See:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7160713
    The bug has been marked as incomplete,needs more info, and "Low Prioroty" - Yet there is no mechanism to provide any more information. There is no way to add comments, or vote. The bug brings down the entire JVM with a native crash and it is trivial to reproduce.
    I would provide any information that is asked of me - but I need a way to do it. I think I got an email request for info (It's been a while now), but replies to the email bounced, and as noted above the bug page has no way to give feedback.
    Use any JFileChooser, click on the "Details" view. Then start clicking on column headings... after a few clicks the JVM crashes. Tested again with 7u6 - still crashes.

    This reproduces the problem more reliably for me.
    * JFileChooser Windows Crash
    package filechoosercrash;
    import java.awt.AWTEvent;
    import java.awt.BorderLayout;
    import java.awt.Robot;
    import java.awt.Toolkit;
    import java.awt.Window;
    import java.awt.event.AWTEventListener;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.InputEvent;
    import java.util.concurrent.CountDownLatch;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.JButton;
    import javax.swing.JDialog;
    import javax.swing.JFileChooser;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.LookAndFeel;
    import javax.swing.SwingUtilities;
    import javax.swing.UIManager;
    import javax.swing.UIManager.LookAndFeelInfo;
    import javax.swing.UnsupportedLookAndFeelException;
    * @author scott
    public class FileChooserCrash {
         static CountDownLatch latch = new CountDownLatch(1);
         static JFrame frame;
         static JButton button;
         static JFileChooser chooser;
         static Robot robot;
         private static AWTEventListener terminator = new AWTEventListener() {
              @Override
              public void eventDispatched(AWTEvent event) {
                   System.exit(10);
          * @param args the command line arguments
         public static void main(final String[] args) throws Exception {
              SwingUtilities.invokeLater(new Runnable() {
                   @Override
                   public void run() {
                        try {
                             swingMain(args);
                        } catch (Exception ex) {
                             Logger.getLogger(FileChooserCrash.class.getName()).log(Level.SEVERE, null, ex);
              latch.await();
              // do the clicks
              sleep(3000);
              Toolkit.getDefaultToolkit().addAWTEventListener(terminator, AWTEvent.KEY_EVENT_MASK);
              long now = System.currentTimeMillis();
              for (int c = 0; c < 10; c++) {
                   Window w = JDialog.getWindows()[1]; // better be there!
                   System.out.println("w=" + w);
                   int detailsX = w.getX() + w.getWidth() - 36;
                   int detailY = w.getY() + 50;
                   int headingY = w.getY() + 100;
                   System.out.println("details at " + detailsX + ", " + detailY);
                   // Click details
                   robot.mouseMove(detailsX, detailY);
                   clickMouse();
                   sleep(100);
                   // Click column headings
                   while (System.currentTimeMillis() - now < 2 * 1000) {
                        int headingX = w.getX() + (w.getWidth()/2) + (int) (Math.random() * (w.getWidth()/2));
                        robot.mouseMove(headingX, headingY);
                        clickMouse();
                        sleep(300);
                   // Cancel
                   robot.mouseMove(w.getX() + w.getWidth() - 36, w.getY() + w.getHeight() - 36);
                   clickMouse();
                   sleep(300);
                   // re-open
                   robot.mouseMove(frame.getX() + 36, frame.getY() + 36);
                   clickMouse();
                   sleep(1000);
                   now = System.currentTimeMillis();
         private static void sleep(int millis) {
              try {
                   Thread.sleep(millis);
              } catch (InterruptedException ex) {
         private static void clickMouse() {
              robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
              sleep(100);
              robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
         private static void swingMain(String[] args) throws Exception {
              //switchToNimbus();
              robot = new Robot();
              frame = new JFrame("JFileChooser Crash Test");
              button = new JButton("Start...");
              button.addActionListener(new ActionListener() {
                   @Override
                   public void actionPerformed(ActionEvent e) {
                        showFileChooser(frame);
              frame.getContentPane().add(button, BorderLayout.CENTER);
              frame.getContentPane().add(new JLabel("Press \"Start...\" and let go of the mouse.  Robot will be used to change FileChooser to details view and then quickly click column headings until the crash."), BorderLayout.SOUTH);
              frame.pack();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setVisible(true);
         static void showFileChooser(JFrame parent) {
              chooser = new JFileChooser("C:\\");
              latch.countDown();
              chooser.showOpenDialog(parent);
         private static void switchToNimbus() throws UnsupportedLookAndFeelException, IllegalAccessException, InstantiationException, ClassNotFoundException {
              for (LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels()) {
                   if (laf.getName().startsWith("Nimbus")) {
                        System.out.println("Using " + laf.getName());
                        UIManager.setLookAndFeel(laf.getClassName());
                        break;
    }

  • Resizng JFileChooser problem!!

    Hi,
    i have really wierd problem with JFileChooser.FileChooser is displayed very wide.It fills my screen.I use j2sdk1.4 and Windows XP.I used
    fileChooser.setPreferredSize(new Dimension(450,280));
    it is resized.But now ComboBox that allows me to choose where to save file is shown too long.Also buttons for "up one level","list","details" are not displayed.Please help me.
    greetings

    This is because there is a long string in the drop-down list at the top (possibly you have a meapped drive with a long path). For some reason (a bug?) JFileChooser seems to resize the dor-down list (and hence itself) to fit the longest path - at least on XP

  • Problems with bugs in Adobe Creative Cloud for Mavericks users.

    Ever since I downloaded Adobe Creative Cloud to my newly purchased macbook pro, there have been issues. I have the mavericks update and this seems to be the main problem. There is alot of small bugs that is really annoying when you come from Adobe CS5 where everything is working fine! Everything in between shortcuts like cmd + C, cmd+ z, v for black arrow and etc. Everytime I open any of the programs, I get the license agreement that i have to agree the terms of use on. Both InDesign, Illustrator, Photoshop and After Effects seems to have these. And when I contact Adobe support, they say that this is NOT a common problem. But on first try, googling it, I find that many have the same problems. So this isn't gonna be solved by reinstalling everything because there is something wrong with my mac. So when is adobe going to fix this? When After Effects wouldn't launch after the mavericks update, you guys came up with a solution pretty fast. Do this again please?

    I don't have Flash installed. When I encounter video that is Flash only (getting rarer and rarer) I open Google Chrome on my Mac and watch it there.
    That's the only reason I have Chrome on my Mac.

  • Problems and bugs with ios 8.0.2 on iphone 4s

    After updating my 3 year old iphone 4s to ios 8.0.2, the UI became choppy (Same with ios 8 and ios 8.0.1). Few bugs i noticed even after updating to ios 8.0.2 (all done after restoring phone as factory new and loading few music/photos/videos loaded and few apps like manual cam, facebook and Google maps installed leaving 7.4 GB free memory.)
    1. The "Notes" app keyboard responds slow while typing.
    2. Free ram stays in between 60- 20mb which i checked with iMonitor which later drops down to 5-12mb when i open an app. So em just wondering where did the 450mb remaining ram went? Because of this i cant multitask like opening and running FB app and simultaneously opening Google maps or any other app using a bit more ram. In ios 7.1.2 i used to running three apps simultaneously without the app being reset.
    3. Ram stays at 200mb+ when i exit some heavy apps like "manual cam" thou it never comes at 200mb when i exit in built apps which a very little ram. So in real world the ram is always being used at 80% even i restart the phone.
    4. The incoming call screen is lagging. First i hear the ringtone for about .5 secs and then the call screen loads! ***?
    From all this happenings i suspect that ios 8 and its further updates will use 80-90% of the iphone 4s ram leaving only 10-20% unusable for users! I dont know why 80-90% is still used even if i restart or even i have closed all the running apps! Usage comes down to 40-50% when i exit heavy apps like "manual cam" or "real racing 3" and the free amount of ram stays stable at 200+ mb for few hours until the cache or background processes resume after the phone refreshes after exiting the heavy apps. At 40-50% ram usage (soon i exit a heavy app) the phone works fluid and animations are smooth. Still my one question "where is my missing 400+ mb Apple"?

    digis wrote:
    If your device was not functioning, you might rant a little too!!
    No, I wouldn't.  At worst, I might sigh, then start troubleshooting the issue.
    This is a technical support forum, not an emotional support forum.
    What troubleshooting steps have you tried?
    Here are some:
    Basic Troubleshooting Steps when all else fails
    - Quit the App by opening multi-tasking bar, and swiping the App upward to make it disappear.  (For iOS 6, holding down the icon for the App for about 3-5 seconds, and then tap the red circle with the white minus sign.)
    - Relaunch the App and try again.
    - Restart the device. http://support.apple.com/kb/ht1430
    - Reset the device. (Same article as above.)
    - Reset All Settings (Settings > General > Reset > Reset All Settings)
    - Restore from backup. http://support.apple.com/kb/ht1766 (If you don't have a backup, make one now, then skip to the next step.)
    - Restore as new device. http://support.apple.com/kb/HT4137  For this step, do not re-download ANYTHING, and do not sign into your Apple ID.
    - Test the issue after each step.  If the last one does not resolve the issue, it is likely a hardware problem.

  • JFileChooser problem with Windows Vista

    Hi,
    I running into the following problem.
    I am using JFileChooser in some of the JInternalFrames in my application. When I using Windows XP everthing works perfectly.
    Now Here is the issues, I have a new user using the application. His computer is Windows Vista and the error comes when I am using JFileChooser.
    I need to know I need to put another file or update ANYTHING ON WINDOWS VISTA FOR THIS JFileChooser to work.
    I appreacite your help and time.
    Wilfer
    CDC

    That's not an error from Java, as far as I know. Something else is producing it. Look over these search results for a case that matches what you see:
    http://www.google.com/search?q=error+31849

  • Query of queries problem or bug

    Hello Everyone,
    I have used cfdirectory to get a list of files. As the result
    I receive query with the files.
    Then I want to search it using query of queries. I' ve found
    a problem and I wonder if it is a bug of Coldfusion or perhaps
    wrong usage of QoQ. The thing is that the files that I have are
    using '_' and then are followed by number of week. It seems that
    searching something like this '%_6' returns results *_*6. See
    attached code.
    Thanks for all answers in advance.

    > I think you'll find "_" is a single-char wildcard when
    used with the LIKE
    > operator.
    Found out how to escape it:
    WHERE Name LIKE '%[_]6%'
    I'm glad you brought this up... I didn't know about this
    until I looked @
    your issue. That's my new thing learned for the day: I can go
    to the pub
    now ;-)
    Adam

  • Blackberry HUB "Show Read Filed Emails" ON AND OFF button SERIOUS Gmail PROBLEM NEED BUG FIX ASAP!

    Its been for years (starting from 10OS Version 10.2 ) I couldn't see filed/labeled emails in my Z30/Z10 Blackberry HUB of my Gmail account, but I just downloaded Blackberry Blend and it started to show all my filed/labeled emails, but I still cant see them in my Blackberry HUB! Maybe you can tell me how to make Read Filed Emails visible in Blackberry HUB too?
    Blackberry HUB >> Settings >> Display and Actions:
    Show Read Filed Emails is ON
    Show Sent Emails is ON
    Both are turned on, but I still cant see them like on Blackberry Blend.. On search field then I type specific email from filed/label from my Gmail account I immediately finds it, but then I go back to Blackberry HUB all I can see just emails from inbox and single sent emails and YES "SYNC ALL EMAIL FOLDERS" IS SET TO ON AND "SYNC TIMEFRAME" IS SET TO FOREVER (''Sync All Email Folders'' is set ON and ''Sync Timeframe'' is set FOREVER).
    Here is picture of email settings:
    http://forums.crackberry.com/attachments/blackberry-10-os-f269/338662d1425451994-read-filed-messages...
    I want to see all emails in devices Blackberry HUB like in Blackberry Blend desktop! What should I do to make it happen?
    I find out that then I click on the Blackberry HUB > Settings > Display and Actions: "Show Read Filed Emails" to ON or OFF again and again, view in Blackberry Blend immediately changes in order I did ON or OFF, that's pretty amazing, but Blackberry HUB DOESN'T RESPOND AT ALL! View is the same doesn't matter if I change it ON or OFF.
    View in Blackberry Blend starts to look the same like in phones Blackberry HUB then I click "Show Read Filed Emails" OFF, it looks like Blackberry HUB doesn't respond to ''Show Read Filed Emails'' ON and OFF button at all, ITS ALWAYS OFF! What should I do next??
    I'm using Blackberry Z30, but I have Z10 too and it also doesn't work and it looks like this "Show Read Filed Emails" not working button bug is on all 10 OS devices except Blackberry Blend desktop version which works perfectly confirms it.
    I'm using Gmail and I have latest Blackberry 10 OS version OFFICIAL 10.3.1.1565
    Here is a picture how it looks then ''Show Read Filed Emails'' ON and OFF:
    (first is OFF, second is ON)
    http://forums.crackberry.com/attachments/blackberry-10-os-f269/338513d1425416890-read-filed-messages...
    As you can see then ''Show Read Filed Emails'' is ON, Blackberry Blend changes and I can see all my emails (and there are a lot of unread ones! (sorry I blurred some of my emails for privacy)), but in my devices Blackberry HUB there is no changes and its displaying the same thing like ''Show Read Filed Emails'' was OFF. I miss a lot of emails and its really annoying and I think you understand why.. Blackberry Blend desktop version is a savior today, but THIS IS NOT A SOLUTION!
    Any FIX suggestions ASAP?
    UPDATE:
    I tried a lot of times to delete and sign in again and again, but it looks like only Blackberry Blend respond to every setting changes! Blackberry HUB doesn't respond AT ALL! Devices Blackberry HUB only show INBOX and SENT MESSAGES all the time, but if "Display Style" in Blackberry HUB is set to "Conversation" SENT MESSAGES disappear from devices Blackberry HUB too (in Blackberry Blend is everything FINE!) if they are part of CONVERSATION FILED/LABELS EMAILS!!
    All issues I been searching all this years and everyone was blaming Gmail, but it looks like ALL THIS YEARS THIS WAS Blackberry HUB "Show Read Filed Emails" ON and OFF button BUG/PROBLEM which doesn't work on devices Blackberry HUB and today Blackberry Blend desktop version CONFIRMS IT!!
    Yes Yahoo accounts FILED/LABELS EMAILS with devices Blackberry HUB works FINE, but Gmail - NOT and NEED FIX ASAP!

    Newest edits in here:
    http://forums.crackberry.com/general-blackberry-discussion-f2/please-send-very-important-10os-device...
    100% FIX SOLUTION GUARANTEE for Gmail archived/labeled Emails not showing problem!
    How to fix it? FIX "Show Read Filed Emails" button to respond to ON and OFF devices Blackberry HUB for Gmail accounts - NOW IT IS ALWAYS OFF if you press ON or OFF!
     "Show Read Filed Emails" button ON and OFF for Gmail account works on Blackberry Blend desktop version!
    Error/Bug: Blackberry HUB do not show Gmail labeled emails
    Main problem: Blackberry HUB "Show Read Filed Emails" button doesn't respond to ON AND OFF and is always OFF fo Gmail account.
    Main problem: ALL Blackberry 10OS devices Blackberry HUB"Show Read Filed Emails" button ON AND OFF doesnt respond with Gmail accounts!
    Works with: Blackberry Blend desktop version responds to "Show Read Filed Emails" button ON AND OFF with Gmail accounts! (pressing "Show Read Filed Emails" button ON and OFF again and again, view in Blackberry Blend immediately changes in order you press ON or OFF, but Blackberry HUB is always on OFF)
    "Show Read Filed Emails" button doesn't work with: Gmail accounts
    Status: NOT FIXED!
    OS version: Blackberry 10 OS version OFFICIAL 10.3.1.1565
    PROBLEM FOUND!
    I created new Gmail account send 5 test emails and made first 2 test emails labeled and made step by step set up on my Blackberry 10OS device to confirm this ''Show Read Filed Emails'' button BUG/PROBLEM/ERROR:
    1. I signed in with my Blackberry 10OS device like this:
    http://forums.crackberry.com/attachments/blackberry-10-os-f269/338846d1425503380t-gmail-archived-lab...
    2. When I set on Gmail account settings "Sync Timeframe" is set to FOREVER and "Sync All Emails Folders" is set to ON
    http://forums.crackberry.com/attachments/blackberry-10-os-f269/338847d1425503392t-gmail-archived-lab...
    3. And at last I go to devices Blackberry HUB and see this:
    http://forums.crackberry.com/attachments/blackberry-10-os-f269/338856d1425505143t-gmail-archived-lab...
    As you can see it doesn't matter if "Show Read Filed Emails" button is set to ON or OFF, Blackberry HUB doesnt respond at all, but Blackberry Blend view changes at same second then I press.
    CONCLUSION: "Show Read Filed Emails" button ON and OFF BUG/PROBLEM/ERROR for Gmail accounts is confirmed and it STILL NOT FIXED!
    Please spread the word to people who have all the power to influence and accelerate processes to FIX this VERY SERIOUS ISSUE or please tell me there could I send this FIX SOLUTION to to get fastest respond and get it FIXED ASAP. THANK YOU!
    STILL NO FIX!

  • Acrobat X Scanning Cancelled Problem / WORKAROUND / BUG REPORT

    As you have read in other threads, Acrobat X on Windows has a serious scanning problem with HP and possibly other scanners.
    Whereas in Acrobat 9 scanning worked reasonably well, Acrobat X seems to be unable to cope with scanning documents from the flat bed of a multifunction scanner.
    So, if you are scanning from the feeder, scanning works, but if you are scanning from the flatbed, you will get a brief pause and the phrase SCANNING CANCELLED.
    This is, of course, not acceptable.
    The problem is that Acrobat X does not play nicely with the scanner drivers.  Previously, Acrobat 9 would "auto-detect" the source of a document, using the feeder if loaded, and "falling back" to the flatbed otherwise.  However, Acrobat X does not fall back.  If there is nothing loaded in the document feeder, the scan will be cancelled by Acrobat X.
    The workaround - and I would NOT call this a "solution" - is to use only the "Custom Scan" command from Acrobat X.  When the window pops up, choose the "Options" button and select "Native Mode" and "Show Scanner's Native Interface" from the two menus.  (Acrobat X does seem to remember these settings at least within a session, so if you're scanning multiple documents you only need to do this once.)  Then scan.
    You will see a new window pop up - the scanner's "native interface."  On my computer, this window shows up BEHIND the Acrobat X screen (annoyingly) so you have to watch for it and click forward.  Be sure to select "flat bed" from the "document source" menu.  On my computer, this setting is NOT remembered between scans, so you have to do this for EVERY SCAN.  Then, the document will scan, and you can do what you want with it in Acrobat X.
    Needless to say, this is a long, painful, slow process, especially if you're scanning lots of flatbed items, as I do.  Hence it's a "workaround" and NOT a "solution".
    The SOLUTION will be for Adobe to FIX this.  ADOBE:  THIS IS A BUG REPORT.  PLEASE LOG THIS IN AND FIX IT.  Acrobat 9 with CS5 worked perfectly, as did Acrobat 8 before it.  Moving to CS5.5 with Acrobat X broke this.  Sloppy.  Please fix!  Thank you!
    Glen Barney

    I used your workaround (thank you!) but it was very annoying. Although I set up the options for a single multi-page document, Adobe gave me separate files and I had to consolidate them. I also had to fill out the options (color, flatbed vs feeder) for each page. This function was working for me at some point, so I don't know what happened to make my HP Multifunction and Adobe part ways. I hope Adobe comes up with a successful patch for this problem.

  • JFileChooser problem - it will not display

    I have read the tutorial on JFileChoosers and understand the basics, however, my application will simply not display a File Chooser. I select the menu option "open file" and the command prompt window just spews out dozens of garbage. The code is below if there are any FileChooser "Pros" out there. The FileChooser is selected for loading in the actioPerformed method. Thanks for any assistance.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.JFileChooser;
    import javax.swing.filechooser.*;
    public class DissertationInterface extends JFrame implements ActionListener
         private JPanel onePanel, twoPanel, bottomPanel;
           private JButton quit,search;
           private JMenuBar TheMenu;
           private JMenu menu1, submenu;
         private JMenuItem menuItem1;
         private JFileChooser fc;          //FILE CHOOSER
           private BorderLayout layout;
           //Canvas that images should be drew on
           //drawTheImages Dti;
           //Instances of other classes
         //DatabaseComms2 db2 = new DatabaseComms2();
         //Configuration cF = new Configuration();
           public DissertationInterface()
                setTitle("Find My Pics - University Application") ;
                layout = new BorderLayout();          
                Container container = getContentPane();
                container.setLayout(layout);
                //Dti = new drawTheImages();
              //container.add(Dti);
                quit = new JButton("Quit");
                search = new JButton("Search");
                TheMenu = new JMenuBar();
                setJMenuBar(TheMenu);
                //FILE CHOOSER
                JFileChooser fc = new JFileChooser();     
                fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
                //First menu option = "File";
                menu1 = new JMenu("File");
              TheMenu.add(menu1);
                //Add an option to the Menu Item
                menuItem1 = new JMenuItem("OPEN FILE",KeyEvent.VK_T);
            menuItem1.setAccelerator(KeyStroke.getKeyStroke(
            KeyEvent.VK_1, ActionEvent.ALT_MASK));
              menu1.add(menuItem1);
              menuItem1.addActionListener(this);          //action listener for Open file option
                //CREATE 3 PANELS
                onePanel = new JPanel();
                onePanel.setBackground(Color.blue);
                onePanel.setLayout(new FlowLayout(FlowLayout.CENTER, 200, 400)) ;
                twoPanel = new JPanel();
                twoPanel.setBackground(Color.red);
                twoPanel.setLayout(new GridLayout(5,2,5,5));
                bottomPanel = new JPanel();
                bottomPanel.setBackground(Color.yellow);
                bottomPanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,10));
              //ADD COMPONENTS TO THE PANELS
                //Add the menu bar and it's items to twoPanel
              twoPanel.add(TheMenu, BorderLayout.NORTH);
              twoPanel.setAlignmentY(LEFT_ALIGNMENT);
                bottomPanel.add(quit);
                quit.addActionListener(this);          //action listener for button
                bottomPanel.add(search);
                search.addActionListener(this);          //action listener for button
                //ADD PANELS TO THE WINDOWS
                container.add(onePanel, BorderLayout.CENTER);
                container.add(twoPanel,BorderLayout.NORTH);            
                container.add(bottomPanel, BorderLayout.SOUTH);
                //setSize(350,350);
                setVisible(true);
              }//END OF CONSTRUCTOR
            public void leaveWindow()
                 this.dispose() ;
            public static void main(String args[])
            DissertationInterface DI = new DissertationInterface();
            DI.setVisible(true);
            //Display the window.
            DI.setSize(450, 260);
            DI.setVisible(true);
            DI.pack();
         }//End of main method
         protected void processWindowEvent(WindowEvent e)
                super.processWindowEvent(e);
                if(e.getID()== WindowEvent.WINDOW_CLOSING)
                      System.exit(0);
              }//End of processWindowEvent
    //method to resolve button clicks etc
    public void actionPerformed(ActionEvent e)
              //PROBLEM IS HERE !!!!!!! - why won't the file dialogue box open
              if(e.getActionCommand().equals("OPEN"))
                   int returnVal = fc.showOpenDialog(DissertationInterface.this);
                 else if(e.getActionCommand().equals("Quit"))
                      //closeDialog();
                      System.out.println("User interface exited");
                      System.exit(1);
                      leaveWindow();
              else if(e.getActionCommand().equals("Search"))
                      //pass params to database                                 
                 }//end of else if
    } //end of method ActionPerformed
    }//End of class DissertationInterface

    I have done as stated, code compiles/executes but when I select the open file option on my GUI, the command prompt window freezes and no dialogue box is displayed!!!!

  • DIV STYLE Region layout problem. Bug?

    Hi guys, I believe this is a bug but need clarification.
    I have created some regions based on the html code:
    div style="border: 1px solid rgb(153, 153, 153); height:300px; width:970px; overflow:auto;">#BODY# /div
    Now, this works fine, in the region I have a standard report. The propblem is when I open a NEW browser window, any website. Then go back to the page, a huge gap appears between the region this code is in, and the previous region.
    I am using IE7 and Apex 3.0.1
    Any help?
    Thanks
    Sam
    Message was edited by:
    Spam
    Message was edited by:
    Spam
    Message was edited by:
    Spam

    I wouldn't see that as a problem, as this is the use case described in the overflow spec: "...This avoids any problem with scrollbars appearing and disappearing in a dynamic environment."
    If it is that important, can you control sending "overflow: hidden" or "overflow: scroll" depending on the number of rows, using ApEx mechanisms and conditional comments?

  • Jfilechooser - problem with windows mapped dirs

    My Documents, Desktop and other windows mapped directories
    or network drives cause performance problems for the java file
    chooser class.
    I think because the file chooser has to resolve
    ambiguous paths for each file.
    i.e.
    1. Desktop\My Documents\myfile.doc
    2. c:\documents and settings\me\My Documents\myfile.doc
    3. Desktop\My Computer\c:\documents and settings\me\desktop
    4. Desktop\My Computer\c:\documents and settings\me\my
    documents\myfile.doc
    Most of our users are using xp and save most of their
    files to the My Documents directory.
    I need to find some work around. If this is not possible
    I could do with some tips on writing a directory service
    that will perform better on windows architecture.
    regards,
    Paul Cunningham

    It's still a serious problem. I am using WinXP with java 1.4.1_01. A folder on a mapped network drive with about 450 files in it takes an enormous amount of time to open & display. Once the file icons appear in the JFileChooser, scrolling and selecting in the JFileChooser is horrendously unresponsive.
    This problem (or related ones) seems to have been around for a long time. I wonder why it doesn't get fixed?
    - Dave P. -

Maybe you are looking for