Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  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 javaapplication6;
  7.  
  8. import static java.lang.Thread.State.NEW;
  9. import javax.swing.JComboBox;
  10. import javax.swing.JFrame;
  11. import javax.swing.JLabel;
  12. import javax.swing.JPanel;
  13. import javax.swing.JSplitPane;
  14.  
  15. /**
  16. *
  17. * @author msi
  18. */
  19. public class SplitPane {
  20.  
  21.  
  22. JPanel jp1=new JPanel();
  23. JPanel jp2=new JPanel();
  24. JLabel j1=new JLabel();
  25. String s[]={"edit","copy"};
  26. SplitPane(){
  27. JFrame jf=new JFrame();
  28. jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  29. JComboBox jc= new JComboBox(s);
  30. jp1.add(jc);
  31. JSplitPane js=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,jp1,jp2);
  32. jf.getContentPane().add(js);
  33. jf.setSize(350,350);
  34. jf.setVisible(true);
  35.  
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement