How to create the look of an OS X modal dialog using Swing or AWT

I tried using JOptionPane.showMessageDialog and AWT Dialog, but both just show a dialog box. I want the dialog box to look like the one shown in the cocoa application that came out from the top of the window.

+4
source share
2 answers

Take a look Look and feel

+3
source

Install Look-And-Feel in SystemDefault, for OSX it will look like a native.

UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() ); 

There is also a beautiful LookAndFeel that looks like OSX for other platforms: Quaqua Look and Feel

see JOptionPane

+2
source

All Articles