Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package javaclass;
- import java.awt.FlowLayout;
- import javax.swing.JFrame;
- import javax.swing.JList;
- import javax.swing.JPanel;
- import javax.swing.JTree;
- /**
- *
- * @author msi
- */
- public class List {
- List(){
- JFrame jf = new JFrame();
- jf.setSize(350,350);
- jf.setLayout(new FlowLayout());
- jf.setDefaultCloseOperation(jf.EXIT_ON_CLOSE);
- JPanel jp = new JPanel();
- String []s = {"a","b","c","d","e"};
- JList j = new JList(s);
- jf.add(j);
- jf.setVisible(true);
- }
- public static void main(String[] args) {
- List t = new List();.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement