|
@@ -21,7 +21,6 @@ public class Gallery extends JPanel implements Observer, Serializable
|
|
|
// Hook up this observer so that it will be notified when the model
|
|
|
// changes.
|
|
|
this.model = model;
|
|
|
- this.setBackground(Color.cyan);
|
|
|
this.setMinimumSize(new Dimension(400, 400));
|
|
|
this.items = new ArrayList();
|
|
|
reList();
|
|
@@ -81,7 +80,6 @@ public class Gallery extends JPanel implements Observer, Serializable
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- this.setBackground(Color.cyan);
|
|
|
this.setLayout(new GridLayout(0, 1));
|
|
|
}
|
|
|
|
|
@@ -91,8 +89,6 @@ public class Gallery extends JPanel implements Observer, Serializable
|
|
|
{
|
|
|
if (i.getData().getRating() >= model.getFilter()) this.add(i);
|
|
|
}
|
|
|
-
|
|
|
- this.setBackground(Color.cyan);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -320,7 +316,8 @@ class Item extends JPanel implements Serializable
|
|
|
star4.setSelected(false);
|
|
|
star5.setSelected(false);
|
|
|
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
|
|
|
- this.setPreferredSize(new Dimension(200, 300));
|
|
|
+ this.setPreferredSize(new Dimension(200, 282));
|
|
|
+ this.setMaximumSize(new Dimension(200, 282));
|
|
|
this.picture = new ImageIcon(data.getPic());
|
|
|
this.pic = new JLabel(picture, JLabel.CENTER);
|
|
|
this.pic.addMouseListener(clicklistener);
|