Originally posted by Rayner:
I have one more doubt.My requiremt is to design a applet which should draw the lines (the line is a packet transmission).When i click particular line i have to show some information on tooltip.The range of line get displayed could be 100 to 90000.I am using applet beacause it has to be viewable in both the browser and the application.My question is whether i have yo use jpane or canvas.Which one suits the above requirement in a better way.
I think that Swing (JPanel, JApplet, JFrame) is much more robust than AWT (Canvas, Applet, Frame), and thus Swing is the way to go. I recommend that you do everything in a JPanel and that the JApplet class be nothing more than a driver class that places the main JPanel in JApplet's contentPane. Your JScrollPane will hold a JPanel, and you may wish that this inner JPanel use GridLayout(0, 1) (1 column, many rows) to hold many rows of a JComponent (this could be JLabel, or JPanel , or JWhatever), each with it's tooltip set properly.