Курсовая работа: Объектно-ориентированное программирование
wer.add(redButton);
wer.add(ExitButton);
wer.add(greenButton);
//contantPane.add(wer,BorderLayout.SOUTH);
contantPane.add(menuBar,BorderLayout.NORTH);
ColorAction yellowAction = new ColorAction(2);
ColorAction blueAction = new ColorAction(3);
ColorAction redAction = new ColorAction(4);
ColorAction ExitAction = new ColorAction(5);
ColorAction greenAction = new ColorAction(6);
yellowButton.addActionListener(yellowAction);
blueButton.addActionListener(blueAction);
redButton.addActionListener(redAction);
ExitButton.addActionListener(ExitAction);
greenButton.addActionListener(greenAction);
WorkSpace.addActionListener(yellowAction);
JMenuItem Check = new JMenuItem("Проверитьзнания",new ImageIcon("icon_security.gif"));
stMenu.add(Check);
Check.addActionListener(redAction);
JMenuItem Exit = new JMenuItem("Выход",new ImageIcon("action_stop.gif"));
stMenu.add(Exit);
Exit.addActionListener(ExitAction);
JMenu prMenu = new JMenu("Преподаватель");
JMenuItem teacher = new JMenuItem("Изменить",new ImageIcon("page_down.gif"));
prMenu.add(teacher);
teacher.addActionListener(blueAction);
JMenuItem teacher1 = new JMenuItem("Посмотреть",new ImageIcon("icon_world_dynamic.gif"));
prMenu.add(teacher1);
teacher1.addActionListener(greenAction);