Browse Source

moviestarframe

master
pooja 3 years ago
parent
commit
41bb0edc05
1 changed files with 70 additions and 0 deletions
  1. 70
      Favorite_Movies/src/MovieForStarFrame.java

70
Favorite_Movies/src/MovieForStarFrame.java

@ -0,0 +1,70 @@
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.Color;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class MovieForStarFrame extends JFrame {
private JPanel contentPane;
private JTextField tf_nS;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
MovieForStarFrame frame = new MovieForStarFrame();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the frame.
*/
public MovieForStarFrame() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 300);
contentPane = new JPanel();
contentPane.setBackground(new Color(0, 0, 51));
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JLabel lblEnterNameOf = new JLabel("Enter Name of the Star:");
lblEnterNameOf.setForeground(Color.WHITE);
lblEnterNameOf.setFont(new Font("Tahoma", Font.PLAIN, 14));
lblEnterNameOf.setBounds(68, 50, 162, 24);
contentPane.add(lblEnterNameOf);
tf_nS = new JTextField();
tf_nS.setColumns(10);
tf_nS.setBounds(68, 88, 210, 24);
contentPane.add(tf_nS);
JButton btnmfsf = new JButton("ok");
btnmfsf.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String starname=tf_nS.getText();
Database.findMoviesForStar(starname);
}
});
btnmfsf.setBounds(70, 159, 89, 23);
contentPane.add(btnmfsf);
}
}
Loading…
Cancel
Save