From f4bc812f23e56ea41f8f61c7532de906207b8548 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Fri, 18 Dec 2020 21:38:23 +0300 Subject: [PATCH] After Sub fixes --- .idea/artifacts/Hajj_simulation_jar.xml | 3 --- src/GUI_ViewBuses.java | 4 +++- src/GUI_ViewStreet.java | 8 +++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.idea/artifacts/Hajj_simulation_jar.xml b/.idea/artifacts/Hajj_simulation_jar.xml index 07239a2..8037ecd 100644 --- a/.idea/artifacts/Hajj_simulation_jar.xml +++ b/.idea/artifacts/Hajj_simulation_jar.xml @@ -2,9 +2,6 @@ $PROJECT_DIR$/out/artifacts/Hajj_simulation_jar - - - diff --git a/src/GUI_ViewBuses.java b/src/GUI_ViewBuses.java index 1528522..e98234f 100644 --- a/src/GUI_ViewBuses.java +++ b/src/GUI_ViewBuses.java @@ -154,7 +154,9 @@ public class GUI_ViewBuses { lblDestination.setFont(new Font("Rockwell", Font.PLAIN, 16)); lblDestination.setBounds(235, 317, 184, 18); frame.getContentPane().add(lblDestination); - if (currenttimeManager.getMonth() == 9) + Calendar cal = new GregorianCalendar(); + cal.setTime(currenttimeManager); + if (cal.get(Calendar.DAY_OF_MONTH) == 9) lblDestination.setText("Heading to Arafat"); else lblDestination.setText("Heading to Hotels"); diff --git a/src/GUI_ViewStreet.java b/src/GUI_ViewStreet.java index 2106cbe..685e1ff 100644 --- a/src/GUI_ViewStreet.java +++ b/src/GUI_ViewStreet.java @@ -1,7 +1,9 @@ import java.awt.Color; import java.awt.Font; +import java.util.Calendar; import java.util.Date; import java.util.ArrayList; +import java.util.GregorianCalendar; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable; @@ -47,8 +49,6 @@ public class GUI_ViewStreet { frame.getContentPane().setLayout(null); frame.setLocationRelativeTo(null); - - vehicleData = new Object[vehicles.size()][6]; for (int i = 0; i < vehicles.size(); i++) { vehicleData[i][0] = vehicles.get(i).getUID(); @@ -157,7 +157,9 @@ public class GUI_ViewStreet { lblDestination.setForeground(Color.WHITE); lblDestination.setFont(new Font("Rockwell", Font.PLAIN, 16)); lblDestination.setBounds(568, 11, 184, 20); - if (currenttimeManager.getMonth() == 9) + Calendar cal = new GregorianCalendar(); + cal.setTime(currenttimeManager); + if (cal.get(Calendar.DAY_OF_MONTH) == 9) lblDestination.setText("Heading to Arafat"); else lblDestination.setText("Heading to Hotels"); frame.getContentPane().add(lblDestination);