Exemplo n.º 1
0
 @Override
 public void actionPerformed(ActionEvent e) {
   if (e.getSource() == showBut) {
     parentFrame.tellServer("showbutton");
   } else if (e.getSource() == hideBut) {
     parentFrame.tellServer("hidebutton");
   } else if (e.getSource() == killBut) {
     if (checkKillButton() == JOptionPane.OK_OPTION) {
       parentFrame.tellServer("killserver");
     }
   }
 }
Exemplo n.º 2
0
  public AdminPane(MainClientHub mainClientFrame) {
    super();
    parentFrame = mainClientFrame;

    setLayout(new BorderLayout());

    initComponents();
    addHandlers();
    addComponents();

    // Asks for the current state of the button so that the status label is
    // updated correctly.
    parentFrame.tellServer("requestcurrentstate");
  }