Is 开发者_如何学Goit possible to draw EKG (electrocardiogram) graph and flashing light without using any container, if not what is the alternative?
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.
精彩评论