tags:

views:

92

answers:

1

Is it possible to draw EKG (electrocardiogram) graph and flashing light without using any container, if not what is the alternative?

A: 

If the goal is to model a traditional oscilloscope display, I would extend JPanel rather than Container. An instance of Timer is probably adequate for the required frame rate. The trace itself may be modeled with a FIFO Queue of co-ordinates that is shifted with each frame. It would be tempting to use a palette of varying brightness to simulate the trace, but I think using an AlphaComposite offers greater fidelity.

trashgod