Note that there are some explanatory texts on larger screens.

plurals
  1. POJFilechooser "Look In" Drop down Does Not Appear on Frame GlassPane
    primarykey
    data
    text
    <p>So I have been having some problems with the JFilechooser in my swing app, and my troubleshooting hasn't been getting me anywhere.</p> <p>I have be able to embed the file chooser into a panel inside my application.</p> <p>the problem is the drop-down button to select other directories and locations on Windows is not enabled, and so is the "File Type" drop down.</p> <p><img src="https://i.stack.imgur.com/Igcq4.png" alt="Clicking on either of the drop down buttons does nothing"></p> <p>Thanks for your time guys!</p> <p>EDIT 1: So i've done additional testing and it seems that putting a filechooser on the JFrame GlassPane causes the Drop down to not appear, possibly because it is "behind" the glassPane or the Filebrowser... not sure how to fix this still, hopefully this helps narrow down the solution.</p> <p>Edit2: Here is some UI code to reproduce the bug:</p> <pre><code> public void gui(){ JFrame frame = new JFrame("Test"); frame.setSize(800, 800); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setLocationRelativeTo(null); //Containment Panel RightBottomCenter = new JPanel(); //Setup Glass Pane JPanel glass = (JPanel) frame.getGlassPane(); glass.setVisible(true); //Config Filechooser fc = new JFileChooser(); fc.setDragEnabled(false); fc.setDialogType(JFileChooser.OPEN_DIALOG); fc.setMultiSelectionEnabled(false); fc.setAcceptAllFileFilterUsed(false); fc.setApproveButtonText("Select"); fc.setPreferredSize(new Dimension(frame.getWidth(), frame.getHeight() - 100)); RightBottomCenter.add(fc); glass.add(RightBottomCenter); frame.setVisible(true); } </code></pre> <p>Still tinkering around, but haven't found an good solution yet. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload