There needs to be more sleep hours in the day. I could have used a bit more sleep this morning let’s face it. But that’s not going to happen now. Oh great I have hiccups now. I don’t know where that came from. Let’s see if I can hold my breath. If that helps then the hiccups will be gone and everything will be fine and dandy. Nope that’s not happening either. Dang it. Maybe I’ll get there maybe.
import javax.swing.JFrame;
import javax.swing.JList;
public class ListTest {
public ListTest() {
JFrame frame = new JFrame();
frame.setTitle("JList Test");
frame.setSize(640,480);
frame.setLocationRelativeTo(null);
String[] items = {"One", "Two", "Three"};
JList list = new JList(items);
frame.add(list);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
public static void main(String[] args) {
new ListTest();
}
}
Comments
Post a Comment