source: src/main/java/negotiator/onetomany/GUITest.java@ 214

Last change on this file since 214 was 214, checked in by Faria Nassiri Mofakham, 6 years ago

Fixed errors after deleting Square

File size: 1.8 KB
RevLine 
[211]1package negotiator.onetomany;
2
3import java.awt.Color;
[212]4import java.awt.Graphics;
[211]5import java.awt.Point;
6//import java.util.Iterator;
7
8//import javax.swing.*;
9//import java.awt.*;
10
11
12import javax.swing.JButton;
13import javax.swing.JCheckBox;
14import javax.swing.JFrame;
15import javax.swing.JLabel;
16import javax.swing.JPasswordField;
17
18import negotiator.onetomany.etc.Circle;
19import net.miginfocom.swing.MigLayout;
20
21/**
22 * @author Faria Nassiri-Mofakham
23 *
24 */
25public class GUITest extends JFrame
26{
27 Main main;
28
29 public GUITest(Main m)
30 {
31 super("MigLayout Basic");
32 main = m;
33
34 int squareDimension = 100;
35 int circleRadius = 5;
[212]36
[211]37 // Point n = new Point(100,200);
[212]38 int[] spans = {0, 50, 100, 150, 200, 250, 300};
[211]39
40 // Show the GUI
41 setLayout(new MigLayout("", "[grow]", "[grow]"));
42
[212]43
[214]44// showPortfolioBorder(squareDimension);
[212]45
46// showPortfolio(circleRadius);
[211]47
[212]48
[211]49 // add(new JLabel("Portfolio:"), "right, wrap");
50 //
51 // //draw square border for product portfolio
52 // Square s = new Square(null,squareDimension, Color.BLACK);
53 // super.paint(s);
54 //
55 // //draw colored dots
56 // for (int i=0; i<p.size(); i++)
57 // {
58 // Portfolio p = main.getPortfolio();
59 // Circle c = new Circle(null,circleRadius, p.getProduct(i));
60 // super.paint(c);
61 // }
62
63
64 setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
65 pack();
66 setLocationRelativeTo(null);
67 setVisible(true);
68 }
69
70
71
[212]72// public void showPortfolio(int circleRadius)
73// {
74// for (int i=0; i<p.size(); i++)
75// {
76// Portfolio p = main.getPortfolio();
77// Circle c = new Circle(null,circleRadius, p.getProduct(i).getColor());
78// super.paint(c); // <--- here
79// }
80// }
81
[211]82 public static void main(String[] args)
83 {
84 Main main = new Main();
85 GUITest gui = new GUITest(main);
86
87 }
88
89}
[212]90
Note: See TracBrowser for help on using the repository browser.