Null Exception why ???? check TODO list in line 1142
This commit is contained in:
parent
36e44ceab6
commit
47e6ffb30f
@ -41,6 +41,7 @@ public class MakkahCity {
|
|||||||
private static JLabel lblDestination;
|
private static JLabel lblDestination;
|
||||||
private static JLabel lblNumOfBuses;
|
private static JLabel lblNumOfBuses;
|
||||||
private static JLabel lblNumOfDonebuses;
|
private static JLabel lblNumOfDonebuses;
|
||||||
|
private static JLabel lblMaximumTripValue;
|
||||||
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
@ -244,6 +245,17 @@ public class MakkahCity {
|
|||||||
lblNumOfDonebuses.setBounds(293, 578, 90, 16);
|
lblNumOfDonebuses.setBounds(293, 578, 90, 16);
|
||||||
makkahFrame.getContentPane().add(lblNumOfDonebuses);
|
makkahFrame.getContentPane().add(lblNumOfDonebuses);
|
||||||
|
|
||||||
|
JLabel lblMaximumTrip = new JLabel("Maximum Trip:");
|
||||||
|
lblMaximumTrip.setFont(new Font("Rockwell", Font.PLAIN, 16));
|
||||||
|
lblMaximumTrip.setForeground(new Color(255, 255, 255));
|
||||||
|
lblMaximumTrip.setBounds(383, 574, 112, 22);
|
||||||
|
makkahFrame.getContentPane().add(lblMaximumTrip);
|
||||||
|
|
||||||
|
JLabel lblMaximumTripValue = new JLabel();
|
||||||
|
lblMaximumTripValue.setForeground(new Color(255, 255, 255));
|
||||||
|
lblMaximumTripValue.setFont(new Font("Rockwell", Font.PLAIN, 16));
|
||||||
|
lblMaximumTripValue.setBounds(506, 578, 46, 14);
|
||||||
|
makkahFrame.getContentPane().add(lblMaximumTripValue);
|
||||||
|
|
||||||
//window
|
//window
|
||||||
makkahFrame.getContentPane().setBackground(new Color(70, 70, 70));
|
makkahFrame.getContentPane().setBackground(new Color(70, 70, 70));
|
||||||
@ -1126,11 +1138,14 @@ public class MakkahCity {
|
|||||||
|
|
||||||
String numOfdoneBuses = String.format("%d",getNumberOfArrivedBusses());
|
String numOfdoneBuses = String.format("%d",getNumberOfArrivedBusses());
|
||||||
lblNumOfDonebuses.setText(numOfdoneBuses);
|
lblNumOfDonebuses.setText(numOfdoneBuses);
|
||||||
|
|
||||||
|
//TODO Exception null why ????
|
||||||
|
// if (Vehicle.getMaxArrived() != null && Vehicle.getMinArrived() != null) {
|
||||||
|
// lblMaximumTripValue.setText(Vehicle.getMaxArrived().toString());
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user