|
|
|
@ -37,21 +37,14 @@ public class ShowMoviesForStarFrame extends JFrame { |
|
|
|
JLabel lblNewLabel = new JLabel("Enter Star Name:"); |
|
|
|
lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 14)); |
|
|
|
lblNewLabel.setForeground(new Color(255, 255, 255)); |
|
|
|
lblNewLabel.setBounds(66, 91, 162, 24); |
|
|
|
lblNewLabel.setBounds(10, 20, 120, 24); |
|
|
|
contentPane.add(lblNewLabel); |
|
|
|
|
|
|
|
tf_starName = new JTextField(); |
|
|
|
tf_starName.setBounds(66, 129, 210, 24); |
|
|
|
tf_starName.setBounds(135, 20, 210, 24); |
|
|
|
contentPane.add(tf_starName); |
|
|
|
tf_starName.setColumns(10); |
|
|
|
|
|
|
|
lMovies = new JList(); |
|
|
|
lMovies.setFont(new Font("Tahoma", Font.PLAIN, 14)); |
|
|
|
lMovies.setForeground(new Color(255, 255, 255)); |
|
|
|
lMovies.setBounds(66, 160, 210, 100); |
|
|
|
contentPane.add(lMovies); |
|
|
|
|
|
|
|
|
|
|
|
JButton btnOkSM = new JButton("ok"); |
|
|
|
btnOkSM.addActionListener(new ActionListener() { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
@ -59,9 +52,16 @@ public class ShowMoviesForStarFrame extends JFrame { |
|
|
|
if (movies.size()>0) |
|
|
|
{ |
|
|
|
JOptionPane.showMessageDialog(null, "Movies Found for Star!"); |
|
|
|
int i = 1; |
|
|
|
for(Movie m: movies) |
|
|
|
{ |
|
|
|
lMovies.add(new JLabel(m.getTitle())); |
|
|
|
System.out.println("Adding movie: " + m.getTitle()); |
|
|
|
JLabel nextMovie = new JLabel(m.getTitle()); |
|
|
|
nextMovie.setFont(new Font("Tahoma", Font.PLAIN, 14)); |
|
|
|
nextMovie.setForeground(new Color(255,255,255)); |
|
|
|
nextMovie.setBounds(66,160+(i*25),200,24); |
|
|
|
contentPane.add(nextMovie); |
|
|
|
i++; |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
|