Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class GuiMap extends JFrame implements ActionListener
- {
- private Dimension mySize;
- private final Timer timer = new Timer(40, this);
- public GuiMap(Map map, Dimension mySize, ArrayList<DeliveryMan> deliveryMans,
- ArrayList<Client> clients)
- {
- this.mySize = mySize;
- mySize.setSize(mySize);
- setSize(mySize);
- timer.start();
- add(new PaintedMap(map, mySize, deliveryMans, clients));
- }
- public Dimension getMySize()
- {
- return mySize;
- }
- @Override
- public void actionPerformed(ActionEvent e)
- {
- if(e.getSource()==timer)
- {
- repaint();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement