import java.awt.color;import javax.swing.imageicon;import javax.swing.jframe;import Javax.swing.jlabel;import Javax.swing.jlist;import Javax.swing.JSplitPane; Public classFenye1 extends jframe{JLabel JL; JList JS; JSplitPane JP; Public Static voidMain (string[] args) {//TODO auto-generated Method StubFenye1 f1=Newfenye1 (); } Publicfenye1 () {String [] a={"Software Development","Software Testing","Data Mining"}; JL=NewJLabel (NewImageIcon ("image/23.jpg")); Jl.setbackground (Color.pink); Jl.setopaque (true); JS=NewJList (a); JP=NewJSplitPane (JSPLITPANE.HORIZONTAL_SPLIT,JS,JL); Jp.setonetouchexpandable (true); This. Add (JP); This. Settitle ("worried about SS"); This. SetSize ( -, the); This. setlocation ( -, the); This. setresizable (true); This. Setdefaultcloseoperation (Jframe.exit_on_close); This. setvisible (true); } }
Simple implementation of JSplitPane