Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.12 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package logika;
  7.  
  8. import forme.GlavnaKlijentskaForma;
  9. import javax.swing.JOptionPane;
  10. import transfer.ServerskiOdgovor;
  11.  
  12. /**
  13.  *
  14.  * @author tijan
  15.  */
  16. public class Kontroler {
  17.    
  18.     GlavnaKlijentskaForma gkf;
  19.     private static Kontroler instanca;
  20.    
  21.     private Kontroler() {
  22.     }
  23.    
  24.     public static Kontroler getInstanca() {
  25.         if (instanca == null) {
  26.             instanca = new Kontroler();
  27.         }
  28.         return instanca;
  29.     }
  30.    
  31.     public void setGkf(GlavnaKlijentskaForma gkf) {
  32.         this.gkf = gkf;
  33.     }
  34.    
  35.    
  36.     public void unijetJunak(ServerskiOdgovor so) {
  37.        
  38.         JOptionPane.showMessageDialog(gkf, so.getPoruka());
  39.     }
  40.    
  41.     public void vratiJunakaOdgovor(ServerskiOdgovor so) {
  42.         JOptionPane.showMessageDialog(gkf, so.getPoruka());
  43.     }
  44.    
  45.     public void vratiSve(ServerskiOdgovor so) {
  46.       gkf.popuniOnoSranje(so.getPoruka());
  47.     }
  48.    
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement