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 javaapplication2;
- import javax.swing.JComboBox;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JPanel;
- import javax.swing.JSplitPane;
- /**
- *
- * @author msi
- */
- public class SplitPane {
- JPanel jp1 = new JPanel();
- JPanel jp2 = new JPanel();
- JLabel jl = new JLabel();
- String s[] = {"edit","copy"};
- SplitPane(){
- JFrame jf = new JFrame();
- jf.setDefaultCloseOperation(jf.EXIT_ON_CLOSE);
- JComboBox jc = new JComboBox(s);
- jp1.add(jc);
- JSplitPane js = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,jp1,jp2);
- jf.getContentPane().add(js);
- jf.setSize(350,350);
- jf.setVisible(true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement