diff --git a/Winda/src/winda/gui/WindaView.java b/Winda/src/winda/gui/WindaView.java index 7367021..d79b28a 100644 --- a/Winda/src/winda/gui/WindaView.java +++ b/Winda/src/winda/gui/WindaView.java @@ -819,7 +819,7 @@ public class WindaView extends FrameView{ }//GEN-LAST:event_jSpinner6StateChanged private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed - // TODO add your handling code here: + w.UsunOstatniegoPasazera(); }//GEN-LAST:event_jButton6ActionPerformed private void jSpinner7StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jSpinner7StateChanged diff --git a/Winda/src/winda/logic/Winda.java b/Winda/src/winda/logic/Winda.java index b750e69..ef1437a 100644 --- a/Winda/src/winda/logic/Winda.java +++ b/Winda/src/winda/logic/Winda.java @@ -102,6 +102,11 @@ public class Winda { log = new Logger(this.Trasa); } + public void UsunOstatniegoPasazera(){ + this.pasazerowieCollection.remove(this.pasazerowieCollection.size()-1); + this.IloscPasazerow --; + } + public static void main(String[] args) { Winda w = new Winda();