%% Call Method on Java Object
% Create a JOptionPane on the EDT.

optPane = javaObjectEDT('javax.swing.JOptionPane');

%
% Call the createDialog method on the EDT.

dlg = optPane.createDialog([],'Sample Dialog');

% Copyright 2012 The MathWorks, Inc.