示例#1
0
 public CipherChatClient() {
   super("Cipher Chat Client");
   // Establish keys for RSA cipher
   makeKeys();
   // Lay out the components and display the frame
   setLayout(new GridLayout(2, 1));
   top.setLayout(new GridLayout(3, 1));
   add(top);
   bottom.setLayout(new GridLayout(1, 1));
   add(bottom);
   connectButton.addActionListener(this);
   enterField.setEnabled(false);
   enterField.addActionListener(this);
   top.add(serverField);
   top.add(connectButton);
   top.add(enterField);
   bottom.add(displayArea);
   setSize(400, 300);
   show();
 }
示例#2
0
 @Override
 public void setBounds(int x, int y, int width, int height) {
   super.setBounds(x, y, width, height);
   currentAppletSize.width = width;
   currentAppletSize.height = height;
 }