This is a computer graphics related algorithm that draws line using graphics in C language.
Using this algorithm we won’t get the exact required line, there are in-built graphics functions present in graphics.h header that gives a more better line.
This is an example displaying the usage of JList Swing Component Demo
Here we made a list with 3 Strings and added a display button which shows which of the list value is selected. We also made use of new Dialog box i.e. ConfirmDialogBox and also we made use of JApplet this time & not a JFrame. So inorder to initialise all the components we made use of its init() method which is called first when its loaded