public EventTracerFrame() {
    // add a slider and a button
    add(new JSlider(), BorderLayout.NORTH);
    add(new JButton("Test"), BorderLayout.SOUTH);

    // trap all events of components inside the frame
    EventTracer tracer = new EventTracer();
    tracer.add(this);
    pack();
  }
  public EventTracerFrame() {
    setTitle("EventTracerFrame");
    setSize(width, height);

    // adaugarea regulatorului si butonului
    add(new JSlider(), BorderLayout.NORTH);
    add(new Button("Test"), BorderLayout.SOUTH);

    // Prinderea tuturor eventurilor legate de componentele ferestrei
    EventTracer tracer = new EventTracer();
    tracer.add(this);
  }