Oprogramowany przycisk usuń - usuwanie ostatniego pasażera
This commit is contained in:
parent
bf8b82ad9a
commit
3de82aa1ba
2 changed files with 6 additions and 1 deletions
|
@ -819,7 +819,7 @@ public class WindaView extends FrameView{
|
||||||
}//GEN-LAST:event_jSpinner6StateChanged
|
}//GEN-LAST:event_jSpinner6StateChanged
|
||||||
|
|
||||||
private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
|
private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
|
||||||
// TODO add your handling code here:
|
w.UsunOstatniegoPasazera();
|
||||||
}//GEN-LAST:event_jButton6ActionPerformed
|
}//GEN-LAST:event_jButton6ActionPerformed
|
||||||
|
|
||||||
private void jSpinner7StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jSpinner7StateChanged
|
private void jSpinner7StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jSpinner7StateChanged
|
||||||
|
|
|
@ -102,6 +102,11 @@ public class Winda {
|
||||||
log = new Logger(this.Trasa);
|
log = new Logger(this.Trasa);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void UsunOstatniegoPasazera(){
|
||||||
|
this.pasazerowieCollection.remove(this.pasazerowieCollection.size()-1);
|
||||||
|
this.IloscPasazerow --;
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
Winda w = new Winda();
|
Winda w = new Winda();
|
||||||
|
|
Loading…
Reference in a new issue