We are trying to display the input audio signals already recorded form an electric guitar, using a variety of amplifiers. We are looking for an algorithm to display with Java.
We are currently looking at AWT and Swing libraries and are wondering: which would be better suited to graphic or visually displaying this?
Use Swing rather than AWT for this. Either is capable of doing it, but Swing is more modern and supports components (
JTree,JTable..) and functionality (double-buffering built-in, key bindings, PLAFs, support for rich text) that is missing from the AWT APIs.Another advantage of using Swing is that it seems you are at a stage where you need to ask further questions. Most people who program GUIs using Java SE have never used AWT components, and the rest of us have mostly forgotten how! (There are also many more people who can help with Swing than JavaFX, at this point.)
In AWT you might use a
Canvasfor drawing the waveform, but in Swing you would use either of the following:JPanel(or sometimes aJComponent) where to paint we overridepaintComponent(Graphics)BufferedImagedisplay in aJLabel.You can see examples of the first technique at DrewTubeish – here is Leftover Wine.