001 package org.springframework.richclient.samples.showcase.dialog;
002
003 import javax.swing.JComponent;
004 import javax.swing.JDialog;
005 import javax.swing.JLabel;
006 import javax.swing.JPanel;
007
008 import org.springframework.richclient.dialog.ApplicationDialog;
009
010 /**
011 * <p>
012 * Very simple dialog showing only the basics. We are using all default settings
013 * so the {@link JDialog} internally used should be disposed on closing.
014 * </p>
015 *
016 * <p>
017 * Note that we create a {@link JPanel} in the
018 * {@link #createDialogContentPane()} without saving a reference in the class.
019 * If we would have a reference field pointing at the panel, we should implement
020 * the {@link #disposeDialogContentPane()} method.
021 * </p>
022 *
023 * @author Jan Hoskens
024 *
025 */
026 public class BasicApplicationDialog extends ApplicationDialog {
027
028 protected JComponent createDialogContentPane() {
029 JPanel contentPane = new JPanel();
030 JLabel label = new JLabel(getMessage("basicApplicationDialog.content.label"));
031 contentPane.add(label);
032 return contentPane;
033 }
034
035 protected boolean onFinish() {
036 return true;
037 }
038
039 }