Closed klana001 closed 5 years ago
Hi @klana001,
If can you give me a simple example runnable it will is fantastic, also yesterday I have released a new version beta in this branch, with this version work or have same problems?
@vincenzopalazzo It is readily repeatable... just call JFileChooser.showSaveDialog().
e.g.
class test extends JFrame { public static void main (String[] args) { new test(); }
public test() { JFileChooser.showSaveDialog() } }
Your beta branch seems to have corrected the issue. Cheers
@klana001 thanks, it isn't only my version beta but is the version beta for this project.
When the version1.0 is stable the branch will join on this project, for the moment I suggest you used the branch beta it introduced the new style of the component, an example to JComboBox and JDialog.
If you want to try the JDialog beta you can add this code
JDialog.setDefaultLookAndFeelDecorated(true);
Thanks for your help
@atarw can you close this issue, please? because of this PR fix it
I have noticed that using:
The expected behaviour when pressing "Enter" in the text field, which is to effectively click the default button (i.e. save/open button), is not performed.
I have made a work around by extending JFileChooser and iterating over the components to find the text field component and then adding a keylistener to it:
public class JFileChooserEnterAware extends JFileChooser { static private Component findTextField(Component comp) { if (comp instanceof JTextField) return comp; if (comp instanceof Container) { Component[] components = ((Container)comp).getComponents(); for(int i = 0; i < components.length; i++) { Component child = findTextField(components[i]); if (child != null) return child; } } return null; }
}