summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tesseract/newmenu/MenuItem.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/tesseract/newmenu/MenuItem.java b/src/tesseract/newmenu/MenuItem.java
index c47aa2c..6507b52 100644
--- a/src/tesseract/newmenu/MenuItem.java
+++ b/src/tesseract/newmenu/MenuItem.java
@@ -49,7 +49,7 @@ public abstract class MenuItem extends JMenuItem implements ActionListener {
/**
* Jframe to hold panel.
*/
- private JFrame myFrame;
+ //private JFrame myFrame;
/**
* Jpanel for variable text boxes.
*/
@@ -103,7 +103,7 @@ public abstract class MenuItem extends JMenuItem implements ActionListener {
public MenuItem(final World theWorld, final String theLabel) {
super(theLabel);
useColorButton = true;
- myFrame = new JFrame();
+ //myFrame = new JFrame();
myParameters = new HashMap<String, Object>();
myPanel = new JPanel();
myReadData = new HashMap <String, JTextField>();
@@ -261,4 +261,12 @@ public abstract class MenuItem extends JMenuItem implements ActionListener {
protected float getMass() {
return ((Float) myParameters.get("Mass")).floatValue();
}
+
+ /**
+ * Set Parent
+ * @param theParent frame.
+ */
+ public void setParent (final JFrame theParent) {
+ myParamFrame.setLocationRelativeTo(theParent);
+ }
}