|
|
|
@ -36,28 +36,33 @@ public class ShowPosterImageFrame extends JFrame { |
|
|
|
setContentPane(contentPane); |
|
|
|
contentPane.setLayout(null); |
|
|
|
|
|
|
|
JPanel panel = new JPanel(); |
|
|
|
panel.setBackground(new Color(0, 0, 51)); |
|
|
|
panel.setBounds(10, 11, 528, 339); |
|
|
|
contentPane.add(panel); |
|
|
|
panel.setLayout(null); |
|
|
|
JPanel panel1 = new JPanel(); |
|
|
|
panel1.setBackground(new Color(0, 0, 51)); |
|
|
|
panel1.setBounds(10, 11, 528, 100); |
|
|
|
contentPane.add(panel1); |
|
|
|
panel1.setLayout(null); |
|
|
|
|
|
|
|
JLabel lblPoster = new JLabel("poster"); |
|
|
|
/*JLabel lblPoster = new JLabel("poster"); |
|
|
|
lblPoster.setBounds(89, 160, 303, 150); |
|
|
|
lblPoster.setBackground(SystemColor.menu); |
|
|
|
panel.add(lblPoster); |
|
|
|
|
|
|
|
panel1.add(lblPoster); |
|
|
|
*/ |
|
|
|
JPanel panel2 = new JPanel(); |
|
|
|
panel2.setBackground(new Color(0, 0, 51)); |
|
|
|
panel2.setBounds(10, 111, 528, 300); |
|
|
|
contentPane.add(panel2); |
|
|
|
JButton btnOkSpi = new JButton("ok"); |
|
|
|
btnOkSpi.addActionListener(new ActionListener() { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
JLabel lblPoster = new JLabel(new ImageIcon("c:\\tmp\\FavoriteMovies\\movies_poster\\poster1.jpg")); |
|
|
|
panel2.removeAll(); |
|
|
|
JLabel lblPoster = new JLabel(new ImageIcon("c:\\tmp\\FavoriteMovies\\movies_poster\\poster" + tf_mid_spi.getText() + ".jpg")); |
|
|
|
lblPoster.setBounds(89, 160, 303, 150); |
|
|
|
panel.add(lblPoster); |
|
|
|
panel.validate(); |
|
|
|
panel.repaint(); |
|
|
|
panel2.add(lblPoster); |
|
|
|
panel2.validate(); |
|
|
|
panel2.repaint(); |
|
|
|
|
|
|
|
} catch (Exception e1) { |
|
|
|
// TODO Auto-generated catch block |
|
|
|
@ -67,7 +72,7 @@ public class ShowPosterImageFrame extends JFrame { |
|
|
|
} |
|
|
|
}); |
|
|
|
btnOkSpi.setBounds(343, 11, 89, 23); |
|
|
|
panel.add(btnOkSpi); |
|
|
|
panel1.add(btnOkSpi); |
|
|
|
|
|
|
|
JButton btnHomeM = new JButton("Home"); |
|
|
|
btnHomeM.addActionListener(new ActionListener() { |
|
|
|
@ -77,17 +82,17 @@ public class ShowPosterImageFrame extends JFrame { |
|
|
|
//use to display only one screen |
|
|
|
ShowPosterImageFrame.this.dispose(); } } }); |
|
|
|
btnHomeM.setBounds(443, 11, 89, 23); |
|
|
|
panel.add(btnHomeM); |
|
|
|
panel1.add(btnHomeM); |
|
|
|
|
|
|
|
tf_mid_spi = new JTextField(); |
|
|
|
tf_mid_spi.setBounds(177, 12, 129, 20); |
|
|
|
panel.add(tf_mid_spi); |
|
|
|
panel1.add(tf_mid_spi); |
|
|
|
tf_mid_spi.setColumns(10); |
|
|
|
|
|
|
|
JLabel lblNewLabel = new JLabel("Enter Movie ID:"); |
|
|
|
lblNewLabel.setForeground(new Color(255, 255, 255)); |
|
|
|
lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 16)); |
|
|
|
lblNewLabel.setBounds(27, 15, 129, 14); |
|
|
|
panel.add(lblNewLabel); |
|
|
|
panel1.add(lblNewLabel); |
|
|
|
} |
|
|
|
} |