展开全部
我就直接这里写。
JFrame frame=new JFrame("title");
frame.getContentPane().setLayout(new BorderLayout());
JScrollPane scroll1=new JScrollPane();
JScrollPane scroll2=new JScrollPane();
JSplitPane spilt=new JSplitPane(JSplitPane.VERTICAL_SPLIT, scroll1, scroll2);
frame.getContentPane().add(spilt, BorderLayout.CENTER);
//then add your panel to scroll1 and 2
scroll1.setViewport(....your panel);
scroll2.setViewport(....your panel);
JFrame frame=new JFrame("title");
frame.getContentPane().setLayout(new BorderLayout());
JScrollPane scroll1=new JScrollPane();
JScrollPane scroll2=new JScrollPane();
JSplitPane spilt=new JSplitPane(JSplitPane.VERTICAL_SPLIT, scroll1, scroll2);
frame.getContentPane().add(spilt, BorderLayout.CENTER);
//then add your panel to scroll1 and 2
scroll1.setViewport(....your panel);
scroll2.setViewport(....your panel);
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询