Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
/*
* Created on 09.01.2005@16:18:08
*
* TODO Licence info
*/
package de.tutorials;
import java.awt.BorderLayout;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import javax.swing.DefaultListModel;
import javax.swing.JFrame;
import javax.swing.JList;
import javax.swing.ListModel;
/**
* @author Administrator
*
* TODO Explain me...
*/
public class HashMapListExample extends JFrame {
private Map map = new HashMap();
private JList list;
public HashMapListExample() {
super("HashMapListExample");
setDefaultCloseOperation(EXIT_ON_CLOSE);
map.put("a", "AAAAA");
map.put("b", "BBBBB");
map.put("c", "CCCCC");
DefaultListModel model = new DefaultListModel();
for (Iterator iter = map.keySet().iterator(); iter.hasNext();) {
model.addElement(map.get(iter.next()));
}
list = new JList(model);
getContentPane().add(list, BorderLayout.CENTER);
pack();
setVisible(true);
} public static void main(String[] args) {
new HashMapListExample();
}
}