Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. public class JhomeMain extends JFrame {
  2.  
  3. private JPanel contentPane;
  4. private JTextField txtNameOfCoupon;
  5. private JTextField textField;
  6. private JTextField textField_1;
  7. private JTextField textField_2;
  8. private JTextField textField_3;
  9. private JLabel lblNameOfProduct;
  10. private JLabel lblDiscountRate;
  11. private JLabel lblValidDays;
  12. private JLabel lblValidationStatus;
  13. private JButton btnNewButton;
  14. private JButton btnView;
  15. private JLabel lblNewLabel_1;
  16. private JLabel lblNewLabel_2;
  17. private JTextField textField_4;
  18. private JLabel lblNewLabel_3;
  19. private JLabel lblNewLabel_4;
  20. private JLabel lblNewLabel_5;
  21.  
  22. /**
  23. * Launch the application.
  24. */
  25.  
  26. public static void main(String[] args) {
  27.  
  28. EventQueue.invokeLater(new Runnable() {
  29. @Override
  30. public void run() {
  31. try {
  32. JhomeMain frame = new JhomeMain();
  33. frame.setVisible(true);
  34. } catch (Exception e) {
  35. e.printStackTrace();
  36. }
  37. }
  38. });
  39.  
  40.  
  41. /**
  42. * Create the frame.
  43. */
  44. public JhomeMain() {
  45. setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  46. setBounds(100, 100, 970, 655);
  47. contentPane = new JPanel();
  48. contentPane.setBackground(new Color(135, 206, 250));
  49. contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
  50. setContentPane(contentPane);
  51. contentPane.setLayout(null);
  52.  
  53. lblNewLabel_3 = new JLabel("Coupons Processing System");
  54. lblNewLabel_3.setBounds(324, 10, 266, 22);
  55. lblNewLabel_3.setFont(new Font("Lucida Grande", Font.BOLD, 18));
  56. contentPane.add(lblNewLabel_3);
  57.  
  58. // ...
  59.  
  60. btnView = new JButton("View");
  61. btnView.setBounds(584, 545, 82, 29);
  62. contentPane.add(btnView);
  63. btnNewButton.addActionListener(new ActionListener()
  64. {
  65. public void actionPerformed(ActionEvent e)
  66. {
  67. //closing the current window
  68. //frame.dispose();
  69.  
  70. Jsecond second = new Jsecond();
  71. second.setVisible(true);
  72. }
  73.  
  74. });
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement