|
@@ -200,7 +200,7 @@ public class CreateTemplatePopUp extends JDialog {
|
|
|
listModel = new DefaultListModel<String>();
|
|
|
list = new JList<String>(listModel);
|
|
|
list.setBounds(12, 118, 221, 166);
|
|
|
- contentPanel.add(list);
|
|
|
+
|
|
|
|
|
|
* Add Elements to List
|
|
|
*/
|
|
@@ -219,7 +219,7 @@ public class CreateTemplatePopUp extends JDialog {
|
|
|
* Delete Element Button
|
|
|
*/
|
|
|
JButton btnDeleteElement = new JButton("Delete Element");
|
|
|
- btnDeleteElement.setBounds(245, 199, 140, 25);
|
|
|
+ btnDeleteElement.setBounds(268, 199, 140, 25);
|
|
|
contentPanel.add(btnDeleteElement);
|
|
|
btnDeleteElement.addActionListener(e->removeElement());
|
|
|
|
|
@@ -227,7 +227,7 @@ public class CreateTemplatePopUp extends JDialog {
|
|
|
* Edit Element Button
|
|
|
*/
|
|
|
JButton btnEditElement = new JButton("Edit Element");
|
|
|
- btnEditElement.setBounds(245, 161, 140, 25);
|
|
|
+ btnEditElement.setBounds(268, 161, 140, 25);
|
|
|
contentPanel.add(btnEditElement);
|
|
|
btnEditElement.addActionListener(e->editElement());
|
|
|
|
|
@@ -235,7 +235,7 @@ public class CreateTemplatePopUp extends JDialog {
|
|
|
* Add Element Button
|
|
|
*/
|
|
|
JButton btnAddElement = new JButton("Add Element");
|
|
|
- btnAddElement.setBounds(245, 123, 140, 25);
|
|
|
+ btnAddElement.setBounds(268, 123, 140, 25);
|
|
|
contentPanel.add(btnAddElement);
|
|
|
btnAddElement.addActionListener(e->addElement());
|
|
|
|
|
@@ -243,7 +243,7 @@ public class CreateTemplatePopUp extends JDialog {
|
|
|
* Cancel Button
|
|
|
*/
|
|
|
JButton btnCancel = new JButton("Cancel");
|
|
|
- btnCancel.setBounds(349, 257, 97, 25);
|
|
|
+ btnCancel.setBounds(372, 257, 74, 25);
|
|
|
contentPanel.add(btnCancel);
|
|
|
btnCancel.addActionListener(e -> dispose());
|
|
|
|
|
@@ -251,7 +251,7 @@ public class CreateTemplatePopUp extends JDialog {
|
|
|
* Add Template Button
|
|
|
*/
|
|
|
JButton btnAddTemplate = new JButton("Add Template");
|
|
|
- btnAddTemplate.setBounds(235, 257, 113, 25);
|
|
|
+ btnAddTemplate.setBounds(257, 257, 113, 25);
|
|
|
contentPanel.add(btnAddTemplate);
|
|
|
btnAddTemplate.addActionListener(e->createTemplate());
|
|
|
|
|
@@ -289,7 +289,7 @@ public class CreateTemplatePopUp extends JDialog {
|
|
|
try {
|
|
|
template.setName(textField_name.getText());
|
|
|
template.setImage(textField_imagePath.getText());
|
|
|
- template.getElements().forEach(ele -> ele.setSaving(new Pair(choice.getSelectedItem(), template.getName())));
|
|
|
+ template.getElements().forEach(ele -> ele.setSaving(new Pair<String, String>(choice.getSelectedItem(), template.getName())));
|
|
|
controller.addObject(controller.searchCategory(choice.getItem(choice.getSelectedIndex())), template.getName(), template.getElements(), template.getImage());
|
|
|
this.dispose();
|
|
|
} catch (IOException e) {
|