Question: How to display a simple ListView in Java? Could you please give me a simple sample code on how to create ListView?

Answer: 
Do you mean [JList](http://www.google.com.sa/url?sa=t&rct=j&q=JList&source=web&cd=2&ved=0CDMQFjAB&url=http://docs.oracle.com/javase/6/docs/api/javax/swing/JList.html&ei=exAiT8zzAtHQsgaN6OnJDg&usg=AFQjCNHF2QzUAhmLWN7mxTNHeggj4Kx-Lw&sig2=s0W7wJlH-RljBZb58xXKLw)?, see java tutorials: [How to Use Lists](http://docs.oracle.com/javase/tutorial/uiswing/components/list.html)
According tho the JavaDocs it is used when rendering HTML, so using it is is just a matter of loading some HTML that uses an HTML list (`<ul>` or `<ol>`).

![Show HTML List](https://i.stack.imgur.com/WQu0K.png)

```
import java.awt.*;
import javax.swing.*;

class ShowHtmlList {
    public static void main(String[] args) {
        final StringBuilder sb = new StringBuilder();
        // invoke HTML renderring in HTML aware components
        sb.append("<html>");
        // start (the body &) an ordered list
        sb.append("<body><ol>");
        Font[] fonts = GraphicsEnvironment.
            getLocalGraphicsEnvironment().getAllFonts();
        for (Font font : fonts) {
            String name = font.getName();
            // will be rendered using a *** ListView ***
            sb.append("<li style='font-family: " + 
                name + "; font-size: 20px;'>");
            sb.append(name);
        }
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                JScrollPane sp = new JScrollPane(
                    new JLabel(sb.toString()));
                Dimension d = sp.getPreferredSize();
                sp.setPreferredSize(new Dimension(d.width, 150));
                JOptionPane.showMessageDialog(null, sp);
            }
        });
    }
}

```

---

OTOH it might be the data is better presented in a `JList` as suggested in a number of other replies.