|
@@ -0,0 +1,94 @@
|
|
|
|
+package ui.view;
|
|
|
|
+
|
|
|
|
+import java.awt.BorderLayout;
|
|
|
|
+import java.awt.FlowLayout;
|
|
|
|
+
|
|
|
|
+import javax.swing.JButton;
|
|
|
|
+import javax.swing.JDialog;
|
|
|
|
+import javax.swing.JPanel;
|
|
|
|
+import javax.swing.border.EmptyBorder;
|
|
|
|
+import javax.swing.JLabel;
|
|
|
|
+import javax.swing.JTextField;
|
|
|
|
+import javax.swing.JList;
|
|
|
|
+import javax.swing.SwingConstants;
|
|
|
|
+
|
|
|
|
+public class RealPopUp extends JDialog {
|
|
|
|
+
|
|
|
|
+ private final JPanel contentPanel = new JPanel();
|
|
|
|
+ private JTextField textField;
|
|
|
|
+ private JTextField textField_1;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Launch the application.
|
|
|
|
+ */
|
|
|
|
+ public static void main(String[] args) {
|
|
|
|
+ try {
|
|
|
|
+ RealPopUp dialog = new RealPopUp();
|
|
|
|
+ dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
|
|
|
|
+ dialog.setVisible(true);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Create the dialog.
|
|
|
|
+ */
|
|
|
|
+ public RealPopUp() {
|
|
|
|
+ setBounds(100, 100, 450, 300);
|
|
|
|
+ getContentPane().setLayout(new BorderLayout());
|
|
|
|
+ contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
|
|
|
|
+ getContentPane().add(contentPanel, BorderLayout.CENTER);
|
|
|
|
+ contentPanel.setLayout(null);
|
|
|
|
+ {
|
|
|
|
+ JLabel lblName = new JLabel("Name:");
|
|
|
|
+ lblName.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
|
+ lblName.setBounds(28, 11, 76, 14);
|
|
|
|
+ contentPanel.add(lblName);
|
|
|
|
+ }
|
|
|
|
+ {
|
|
|
|
+ textField = new JTextField();
|
|
|
|
+ textField.setBounds(135, 8, 86, 20);
|
|
|
|
+ contentPanel.add(textField);
|
|
|
|
+ textField.setColumns(10);
|
|
|
|
+ }
|
|
|
|
+ {
|
|
|
|
+ JButton btnBrowseImage = new JButton("Browse Image");
|
|
|
|
+ btnBrowseImage.setBounds(10, 50, 112, 23);
|
|
|
|
+ contentPanel.add(btnBrowseImage);
|
|
|
|
+ }
|
|
|
|
+ {
|
|
|
|
+ textField_1 = new JTextField();
|
|
|
|
+ textField_1.setBounds(135, 51, 271, 20);
|
|
|
|
+ contentPanel.add(textField_1);
|
|
|
|
+ textField_1.setColumns(10);
|
|
|
|
+ }
|
|
|
|
+ {
|
|
|
|
+ JList list = new JList();
|
|
|
|
+ list.setBounds(10, 98, 242, 130);
|
|
|
|
+ contentPanel.add(list);
|
|
|
|
+ }
|
|
|
|
+ {
|
|
|
|
+ JButton btnAddDefaultElement = new JButton("Add Default Element");
|
|
|
|
+ btnAddDefaultElement.setBounds(262, 95, 144, 23);
|
|
|
|
+ contentPanel.add(btnAddDefaultElement);
|
|
|
|
+ }
|
|
|
|
+ {
|
|
|
|
+ JPanel buttonPane = new JPanel();
|
|
|
|
+ buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
|
|
|
|
+ getContentPane().add(buttonPane, BorderLayout.SOUTH);
|
|
|
|
+ {
|
|
|
|
+ JButton okButton = new JButton("OK");
|
|
|
|
+ okButton.setActionCommand("OK");
|
|
|
|
+ buttonPane.add(okButton);
|
|
|
|
+ getRootPane().setDefaultButton(okButton);
|
|
|
|
+ }
|
|
|
|
+ {
|
|
|
|
+ JButton cancelButton = new JButton("Cancel");
|
|
|
|
+ cancelButton.setActionCommand("Cancel");
|
|
|
|
+ buttonPane.add(cancelButton);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|