Exemple #1
0
 public void connect() {
   try {
     channel.connect("TOTAL_TOKEN_DEMO_GROUP");
   } catch (ChannelException e) {
     e.printStackTrace();
   }
   receiverThread = new ReceiverThread();
   receiverThread.start();
   Address a = channel.getAddress();
   if (a != null) setTitle(a.toString());
   else setTitle("Not connected");
   control.connected();
 }
Exemple #2
0
  public TotalTokenDemo(String props) {
    super();
    tabbedPane = new JTabbedPane();
    control = new ControlPanel();
    channelProperties = props;

    try {
      channel = new JChannel(channelProperties);
    } catch (ChannelException e) {
      System.err.println("Could not create channel, exiting ....");
      e.printStackTrace(System.err);
    }

    addPanel("Control", control);
    getContentPane().add(tabbedPane);
    connect();
  }