aboutsummaryrefslogtreecommitdiff
path: root/PunchingBag/src
diff options
context:
space:
mode:
authorChristopher Baines <cbaines8@gmail.com>2011-09-08 11:14:50 +0100
committerChristopher Baines <cbaines8@gmail.com>2011-09-08 11:14:50 +0100
commitd379f8e548b3d0ee5d0f6db291415c96cd993351 (patch)
tree870fd19a0c1353a50315152320809bccbbcd2cbd /PunchingBag/src
parent0c6f8cff73bc5f57989091a03fba1331aa5bd2ff (diff)
downloadpunchingbag-d379f8e548b3d0ee5d0f6db291415c96cd993351.tar
punchingbag-d379f8e548b3d0ee5d0f6db291415c96cd993351.tar.gz
Modified PunchingBagGUI to fix the sim bag on smaller screens (my laptop), this needs to be fix properly so that the bag expands, but keeps its aspect ratio.
Diffstat (limited to 'PunchingBag/src')
-rw-r--r--PunchingBag/src/PunchingBagGUI.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/PunchingBag/src/PunchingBagGUI.java b/PunchingBag/src/PunchingBagGUI.java
index 91d223a..19385f5 100644
--- a/PunchingBag/src/PunchingBagGUI.java
+++ b/PunchingBag/src/PunchingBagGUI.java
@@ -53,7 +53,7 @@ public class PunchingBagGUI implements MouseListener, MouseMotionListener, Butto
}
PunchingBagGUI() throws InterruptedException {
- bag.buttonArduino.listPorts();
+ //bag.buttonArduino.listPorts();
frame = new JFrame("Punching Bag GUI");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
@@ -81,6 +81,8 @@ public class PunchingBagGUI implements MouseListener, MouseMotionListener, Butto
bottomTopSplitPane.setBottomComponent(new SerialPanel());
frame.add(bottomTopSplitPane, BorderLayout.CENTER);
+
+ //frame.pack();
}
class SerialPanel extends JPanel implements ActionListener {
@@ -339,7 +341,7 @@ public class PunchingBagGUI implements MouseListener, MouseMotionListener, Butto
}
public Dimension getPreferredSize() {
- return new Dimension(10, 10);
+ return new Dimension(5, 5);
}
public void paintComponent(Graphics g) {
@@ -375,7 +377,7 @@ public class PunchingBagGUI implements MouseListener, MouseMotionListener, Butto
}
public Dimension getPreferredSize() {
- return new Dimension(30, 30);
+ return new Dimension(20, 20);
}
public void paintComponent(Graphics g) {