Re: File browser
Peter Duniho wrote:
On Tue, 05 Feb 2008 10:56:22 -0800, Daniel Pitts
<newsgroup.spamfilter@virtualinfinity.net> wrote:
Did you set the system look-and-feel before initializing your Swing
code? That should make it act more like a Mac GUI.
I haven't done anything explicitly, no. That said, wouldn't the default
configuration already be set to be the look-and-feel for the OS?
Assuming the user hasn't changed it, of course.
Usually it defaults to the metal look and feel in my experience, not the
"System" look and feel.
I included the code you posted as part of my initialization, and it
doesn't change how the JFileDialog looks or operates.
Does it look anything like the Mac OS file dialog? What happens when
you run your program on Windows?
I usually call this in the EDT first thing:
"EDT"?
Pete
EDT = Event Dispatch Thread (eg, using EventQueue.invokeLater())
Everything that interacts with swing components should do so from that
thread.
--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>