SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package javaclass;
  7.  
  8. import java.awt.FlowLayout;
  9. import javax.swing.JFrame;
  10. import javax.swing.JList;
  11. import javax.swing.JPanel;
  12. import javax.swing.JTree;
  13.  
  14. /**
  15.  *
  16.  * @author msi
  17.  */
  18. public class List {
  19.   List(){
  20.     JFrame jf = new JFrame();
  21.             jf.setSize(350,350);
  22.             jf.setLayout(new FlowLayout());
  23.             jf.setDefaultCloseOperation(jf.EXIT_ON_CLOSE);
  24.             JPanel jp = new JPanel();
  25.             String []s = {"a","b","c","d","e"};
  26.             JList j = new JList(s);
  27.              jf.add(j);
  28.              jf.setVisible(true);
  29.            
  30. }
  31.    public static void main(String[] args) {
  32.         List t = new List();.
  33.      
  34.     }  
  35. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top