daily pastebin goal
52%
SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 68 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 javaapplication2;
  7.  
  8. import javax.swing.JComboBox;
  9. import javax.swing.JFrame;
  10. import javax.swing.JLabel;
  11. import javax.swing.JPanel;
  12. import javax.swing.JSplitPane;
  13.  
  14. /**
  15.  *
  16.  * @author msi
  17.  */
  18. public class SplitPane {
  19.    
  20.     JPanel jp1 = new JPanel();
  21.      JPanel jp2 = new JPanel();
  22.      JLabel jl = new JLabel();
  23.      
  24.      String s[] = {"edit","copy"};
  25.      
  26.      SplitPane(){
  27.          JFrame jf = new JFrame();
  28.          jf.setDefaultCloseOperation(jf.EXIT_ON_CLOSE);
  29.          
  30.          JComboBox jc = new JComboBox(s);
  31.          jp1.add(jc);
  32.          
  33.          JSplitPane js = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,jp1,jp2);
  34.          jf.getContentPane().add(js);
  35.          jf.setSize(350,350);
  36.          jf.setVisible(true);
  37.      }
  38.    
  39. }
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