Advertisement
Gangesgod

Untitled

Feb 21st, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. RTG = new JFrame();
  2. RTG.setTitle("Revision Timetable Generator 1.0");
  3. RTG.setBounds(100, 100, 450, 300);
  4. RTG.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  5. RTG.getContentPane().setLayout(null);
  6. Dimension size = RTG.getSize();
  7. JOptionPane.showMessageDialog(null, size);
  8.  
  9. // RTG.setSize(550, 300);
  10.  
  11. exit.setVisible(true);
  12. Submit.setVisible(false);
  13.  
  14. timeLabel = new JLabel("Clock");
  15. timeLabel.setBounds(363, 0, 71, 19);
  16. RTG.getContentPane().add(timeLabel);
  17.  
  18. exit.setVisible(true);
  19.  
  20. Submit.setVisible(false);
  21.  
  22. Title = new JLabel("Welcome to the Revision Timetable Generator");
  23. Title.setFont(new Font("MS UI Gothic", Font.BOLD, 15));
  24. Title.setBounds(32, 3, 325, 13);
  25. RTG.getContentPane().add(Title);
  26.  
  27. create = new JButton("Create New Timetable");
  28.  
  29. create.addActionListener(new ActionListener() {
  30.  
  31.  
  32. public void actionPerformed(ActionEvent e) {
  33. int reply = JOptionPane.showConfirmDialog(null, "Do you wish to create a new timetable ?");
  34. if (reply==JOptionPane.YES_OPTION) {
  35.  
  36. CREATE();
  37. }
  38.  
  39.  
  40. }
  41. });
  42. create.setBounds(12, 41, 198, 133);
  43. RTG.getContentPane().add(create);
  44.  
  45. load = new JButton("Load timetable");
  46. load.setVisible(true);
  47. load.addActionListener(new ActionListener() {
  48. public void actionPerformed(ActionEvent e) {
  49. int reply = JOptionPane.showConfirmDialog(null, "Do you wish to load a timetable?");
  50. if (reply==JOptionPane.YES_OPTION) {
  51. LOAD();
  52. }
  53. }
  54. });
  55. load.setBounds(222, 41, 198, 133);
  56. RTG.getContentPane().add(load);
  57.  
  58. exit = new JButton("Exit");
  59. exit.addActionListener(new ActionListener() {
  60. public void actionPerformed(ActionEvent arg0) {
  61. int reply = JOptionPane.showConfirmDialog(null, "Do you really wish to exit ?");
  62. if (reply==JOptionPane.YES_OPTION) {
  63. System.exit(0);
  64. }
  65.  
  66. }
  67. });
  68. exit.setBounds(166, 179, 99, 65);
  69. RTG.getContentPane().add(exit);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement