Reputation: 5657
Does Swing
support native dialog like below:
Or maybe exists some third party's JNI
library?
Upvotes: 1
Views: 1633
Reputation: 528
I am the author of a Swing look and feel called VAqua, which supports displaying windows as native sheets using an associated client library.
For example:
JFrame owner = ...;
JWindow w = new JWindow(owner);
try {
VSheet.displayAsSheet(w, null);
} catch (UnsupportedOperationException ex) {
...
}
Details here.
Upvotes: 2
Reputation: 205785
I haven't tried it, but Java on OS X v10.5 Update 1 says, "Document Modal Sheets can be created by setting the the apple.awt.documentModalSheet
client property to Boolean.TRUE
on the JRootPane
of JDialog
." I'm guessing something like this:
rootPanel.putClientProperty("apple.awt.documentModalSheet", Boolean.TRUE);
You might also see if Mac Widgets for Java has added anything recently.
Upvotes: 2