2 changed files with 68 additions and 211 deletions
Split View
Diff Options
@ -1,110 +1,44 @@ |
|||
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 javax.swing.JTextField; |
|||
import javax.swing.JButton; |
|||
import java.awt.Font; |
|||
import javax.swing.SwingConstants; |
|||
import java.awt.event.ActionListener; |
|||
import java.awt.event.ActionEvent; |
|||
|
|||
public class Ratings extends JFrame { |
|||
public class Ratings { |
|||
|
|||
private JPanel contentPane; |
|||
private JTextField textField; |
|||
private JTextField textField_1; |
|||
private JTextField textField_2; |
|||
private JTextField textField_3; |
|||
private int MovieId; |
|||
private String Relation; |
|||
private int Rating; |
|||
private String NameSurname; |
|||
|
|||
|
|||
/** |
|||
* Create the frame. |
|||
*/ |
|||
public Ratings() { |
|||
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|||
setBounds(100, 100, 589, 488); |
|||
contentPane = new JPanel(); |
|||
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); |
|||
contentPane.setLayout(new BorderLayout(0, 0)); |
|||
setContentPane(contentPane); |
|||
|
|||
JPanel panel = new JPanel(); |
|||
panel.setBackground(new Color(0, 0, 51)); |
|||
contentPane.add(panel, BorderLayout.CENTER); |
|||
panel.setLayout(null); |
|||
|
|||
JLabel lblNewLabel = new JLabel("Ratings Details"); |
|||
lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 24)); |
|||
lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER); |
|||
lblNewLabel.setForeground(new Color(255, 255, 255)); |
|||
lblNewLabel.setBounds(148, 22, 247, 36); |
|||
panel.add(lblNewLabel); |
|||
|
|||
JLabel lblNewLabel_1 = new JLabel("Movie ID:"); |
|||
lblNewLabel_1.setFont(new Font("Tahoma", Font.PLAIN, 16)); |
|||
lblNewLabel_1.setForeground(new Color(255, 255, 255)); |
|||
lblNewLabel_1.setBounds(41, 87, 76, 14); |
|||
panel.add(lblNewLabel_1); |
|||
|
|||
JLabel lblNewLabel_2 = new JLabel("Name Surname:"); |
|||
lblNewLabel_2.setFont(new Font("Tahoma", Font.PLAIN, 16)); |
|||
lblNewLabel_2.setForeground(new Color(255, 255, 255)); |
|||
lblNewLabel_2.setBounds(41, 129, 127, 36); |
|||
panel.add(lblNewLabel_2); |
|||
|
|||
JLabel lblNewLabel_3 = new JLabel("Relation:"); |
|||
lblNewLabel_3.setFont(new Font("Tahoma", Font.PLAIN, 16)); |
|||
lblNewLabel_3.setForeground(new Color(255, 255, 255)); |
|||
lblNewLabel_3.setBounds(41, 183, 76, 36); |
|||
panel.add(lblNewLabel_3); |
|||
|
|||
JLabel lblNewLabel_4 = new JLabel("Ratings :"); |
|||
lblNewLabel_4.setFont(new Font("Tahoma", Font.PLAIN, 16)); |
|||
lblNewLabel_4.setForeground(new Color(255, 255, 255)); |
|||
lblNewLabel_4.setBounds(41, 245, 76, 17); |
|||
panel.add(lblNewLabel_4); |
|||
|
|||
textField = new JTextField(); |
|||
textField.setBounds(194, 86, 183, 20); |
|||
panel.add(textField); |
|||
textField.setColumns(10); |
|||
|
|||
textField_1 = new JTextField(); |
|||
textField_1.setColumns(10); |
|||
textField_1.setBounds(194, 139, 179, 20); |
|||
panel.add(textField_1); |
|||
|
|||
textField_2 = new JTextField(); |
|||
textField_2.setColumns(10); |
|||
textField_2.setBounds(194, 193, 179, 20); |
|||
panel.add(textField_2); |
|||
|
|||
textField_3 = new JTextField(); |
|||
textField_3.setColumns(10); |
|||
textField_3.setBounds(194, 245, 183, 20); |
|||
panel.add(textField_3); |
|||
|
|||
JButton btnNewButton = new JButton("OK"); |
|||
btnNewButton.setBounds(195, 320, 89, 23); |
|||
panel.add(btnNewButton); |
|||
|
|||
JButton btnHomeR = new JButton("Home"); |
|||
btnHomeR.addActionListener(new ActionListener() { |
|||
public void actionPerformed(ActionEvent e) { |
|||
Main_HomePage mhp=new Main_HomePage(); |
|||
mhp.setVisible(true); |
|||
if(mhp.isVisible()) { |
|||
//use to display only one screen |
|||
Ratings.this.dispose(); |
|||
} |
|||
} |
|||
}); |
|||
btnHomeR.setBounds(304, 320, 89, 23); |
|||
panel.add(btnHomeR); |
|||
|
|||
|
|||
public int getMovieId() { |
|||
return MovieId; |
|||
} |
|||
public void setMovieId(int movieId) { |
|||
MovieId = movieId; |
|||
} |
|||
public String getRelation() { |
|||
return Relation; |
|||
} |
|||
public void setMovieTitle(String Relation) { |
|||
Relation = Relation; |
|||
} |
|||
public int getRating() { |
|||
return Rating; |
|||
} |
|||
public void setYear(int Rating) { |
|||
Rating = Rating; |
|||
} |
|||
public String getNameSurname() { |
|||
return NameSurname; |
|||
} |
|||
} |
|||
public void setNameSurname(String nameSurname) { |
|||
NameSurname = nameSurname; |
|||
} |
|||
|
|||
public void showHighRatedMovie() { |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
@ -1,111 +1,34 @@ |
|||
import java.awt.BorderLayout; |
|||
import java.awt.EventQueue; |
|||
public class Star{ |
|||
|
|||
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.SwingConstants; |
|||
import javax.swing.JTextField; |
|||
import javax.swing.JButton; |
|||
import java.awt.event.ActionListener; |
|||
import java.awt.event.ActionEvent; |
|||
private int MovieId; |
|||
private String MovieTitle; |
|||
private int Year; |
|||
private String NameSurname; |
|||
|
|||
|
|||
public class Star extends JFrame { |
|||
|
|||
private JPanel contentPane; |
|||
private JTextField textField; |
|||
private JTextField textField_1; |
|||
private JTextField textField_2; |
|||
private JTextField textField_3; |
|||
|
|||
|
|||
/** |
|||
* Create the frame. |
|||
*/ |
|||
public Star() { |
|||
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|||
setBounds(100, 100, 580, 413); |
|||
contentPane = new JPanel(); |
|||
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); |
|||
contentPane.setLayout(new BorderLayout(0, 0)); |
|||
setContentPane(contentPane); |
|||
|
|||
JPanel panel = new JPanel(); |
|||
panel.setBackground(new Color(0, 0, 51)); |
|||
contentPane.add(panel, BorderLayout.CENTER); |
|||
panel.setLayout(null); |
|||
|
|||
JLabel lblStardetails = new JLabel("Star Details"); |
|||
lblStardetails.setBounds(148, 22, 247, 36); |
|||
lblStardetails.setHorizontalAlignment(SwingConstants.CENTER); |
|||
lblStardetails.setForeground(Color.WHITE); |
|||
lblStardetails.setFont(new Font("Tahoma", Font.BOLD, 24)); |
|||
panel.add(lblStardetails); |
|||
|
|||
JLabel lblNewLabel_1 = new JLabel("Movie ID:"); |
|||
lblNewLabel_1.setBounds(41, 87, 76, 14); |
|||
lblNewLabel_1.setForeground(Color.WHITE); |
|||
lblNewLabel_1.setFont(new Font("Tahoma", Font.PLAIN, 16)); |
|||
panel.add(lblNewLabel_1); |
|||
|
|||
JLabel lblNewLabel_2 = new JLabel("Name Surname:"); |
|||
lblNewLabel_2.setBounds(41, 129, 127, 36); |
|||
lblNewLabel_2.setForeground(Color.WHITE); |
|||
lblNewLabel_2.setFont(new Font("Tahoma", Font.PLAIN, 16)); |
|||
panel.add(lblNewLabel_2); |
|||
|
|||
JLabel lblNewLabel_3 = new JLabel("Movie Title:"); |
|||
lblNewLabel_3.setBounds(41, 183, 103, 36); |
|||
lblNewLabel_3.setForeground(Color.WHITE); |
|||
lblNewLabel_3.setFont(new Font("Tahoma", Font.PLAIN, 16)); |
|||
panel.add(lblNewLabel_3); |
|||
|
|||
JLabel lblNewLabel_4 = new JLabel("Movie Year:"); |
|||
lblNewLabel_4.setBounds(41, 245, 103, 17); |
|||
lblNewLabel_4.setForeground(Color.WHITE); |
|||
lblNewLabel_4.setFont(new Font("Tahoma", Font.PLAIN, 16)); |
|||
panel.add(lblNewLabel_4); |
|||
|
|||
textField = new JTextField(); |
|||
textField.setBounds(194, 86, 183, 20); |
|||
textField.setColumns(10); |
|||
panel.add(textField); |
|||
|
|||
textField_1 = new JTextField(); |
|||
textField_1.setBounds(194, 139, 179, 20); |
|||
textField_1.setColumns(10); |
|||
panel.add(textField_1); |
|||
|
|||
textField_2 = new JTextField(); |
|||
textField_2.setBounds(194, 193, 179, 20); |
|||
textField_2.setColumns(10); |
|||
panel.add(textField_2); |
|||
|
|||
textField_3 = new JTextField(); |
|||
textField_3.setBounds(194, 245, 183, 20); |
|||
textField_3.setColumns(10); |
|||
panel.add(textField_3); |
|||
|
|||
JButton btnStar = new JButton("OK"); |
|||
btnStar.setBounds(195, 320, 89, 23); |
|||
panel.add(btnStar); |
|||
|
|||
JButton btnHome = new JButton("Home"); |
|||
btnHome.addActionListener(new ActionListener() { |
|||
public void actionPerformed(ActionEvent e) { |
|||
Main_HomePage mhp=new Main_HomePage(); |
|||
mhp.setVisible(true); |
|||
if(mhp.isVisible()) { |
|||
//use to display only one screen |
|||
Star.this.dispose(); |
|||
} |
|||
} |
|||
}); |
|||
btnHome.setBounds(306, 320, 89, 23); |
|||
panel.add(btnHome); |
|||
public int getMovieId() { |
|||
return MovieId; |
|||
} |
|||
public void setMovieId(int movieId) { |
|||
MovieId = movieId; |
|||
} |
|||
public String getMovieTitle() { |
|||
return MovieTitle; |
|||
} |
|||
public void setMovieTitle(String movieTitle) { |
|||
MovieTitle = movieTitle; |
|||
} |
|||
public int getYear() { |
|||
return Year; |
|||
} |
|||
public void setYear(int year) { |
|||
Year = year; |
|||
} |
|||
public String getNameSurname() { |
|||
return NameSurname; |
|||
} |
|||
public void setNameSurname(String nameSurname) { |
|||
NameSurname = nameSurname; |
|||
} |
|||
|
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue