overallPanel = new JPanel(new GridLayout((x/y+1),y));
overallPanel.setBackground(Color.DARK_GRAY);
if(!model.getFilmData().isEmpty())
load = new Loader(model.getFilmData(), is_Start);
this.btns.removeAllElements();
this.checks.removeAllElements();
for(int i=0;i<x;i++)
{
btns.add(new JButton());
checks.add(new JCheckBox());
}
for(int i=model.getFilmData().size()-1;i>=0;i--){
if(!model.getFilmData().isEmpty())
load.setBar((model.getFilmData().size()-i));
JPanel name = new JPanel(new BorderLayout());
name.setBackground(Color.DARK_GRAY);
name.setPreferredSize(new Dimension(110,200));
String str = model.getFilmData().elementAt(i).getName();
JTextArea nameL = new JTextArea(str);
nameL.setLineWrap(true);
nameL.setWrapStyleWord(true);
nameL.setForeground(Color.white);
nameL.setBackground(Color.DARK_GRAY);
nameL.setFont(new Font("Arial",0,10));
nameL.setEditable(false);
btns.elementAt(i).setActionCommand(i+"");
btns.elementAt(i).setBackground(Color.DARK_GRAY);
btns.elementAt(i).setMaximumSize(new Dimension(100,150));
checks.elementAt(i).setBackground(Color.DARK_GRAY);
name.add(btns.elementAt(i), BorderLayout.NORTH);
name.add(nameL, BorderLayout.CENTER);
name.add(checks.elementAt(i),BorderLayout.SOUTH);
overallPanel.add(name);checks.elementAt(i).repaint();
}
scroll = new JScrollPane(overallPanel);
scroll.setPreferredSize(new Dimension((frame.getWidth()-220), (frame.getHeight()-200)));
listPane.add(scroll);
scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);