List of usage examples for javax.swing JSplitPane setDoubleBuffered
public void setDoubleBuffered(boolean aFlag)
From source file:com.codeasylum.stress.ui.Jormungandr.java
private synchronized Jormungandr init() throws IOException, SAXException, ParserConfigurationException { TestPlan testPlan;//ww w . ja v a 2s .co m GhostPanel ghostPanel; GroupLayout groupLayout; ViewPanel viewPanel; JTree testTree; JSplitPane workSplitPane; JScrollPane paletteScrollPane; JScrollPane testScrollPane; setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); exchangeTransport = new ExchangeTransportImpl(exchangeTransportRMIPort); menuHandler = new JormungandrMenuHandler(this, menuDelegateFactory); testExecutor = new TestExecutor(testPlan = new TestPlan(), exchangeTransport); testExecutor.addTestExecutorListener(this); testPlan.getRootTask().setName(palette.getAvatar(RootTask.class).getName()); setGlassPane(ghostPanel = new GhostPanel()); setLayout(groupLayout = new GroupLayout(getContentPane())); testTree = new JTree(); palettePanel = new PalettePanel(this, ghostPanel, palette); testPanel = new TestPanel(this, ghostPanel, palette, viewPanel = new ViewPanel(testTree), testTree); paletteScrollPane = new JScrollPane(palettePanel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); testScrollPane = new JScrollPane(testPanel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); workSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, testScrollPane, viewPanel); workSplitPane.setDoubleBuffered(true); workSplitPane.setContinuousLayout(true); workSplitPane.setResizeWeight(0.3); groupLayout.setAutoCreateContainerGaps(true); groupLayout.setHorizontalGroup(groupLayout.createSequentialGroup() .addComponent(paletteScrollPane, (int) palettePanel.getMinimumSize().getWidth() + 3, (int) palettePanel.getPreferredSize().getWidth() + 3, (int) palettePanel.getMaximumSize().getWidth() + 3) .addComponent(workSplitPane)); groupLayout.setVerticalGroup(groupLayout.createParallelGroup() .addComponent(paletteScrollPane, 0, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE) .addComponent(workSplitPane, 0, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)); setSize(new Dimension(Math.max(800, ((int) getLayout().preferredLayoutSize(this).getWidth()) + 120), Math.min(600, ((int) getLayout().preferredLayoutSize(this).getHeight()) + 38))); setLocationByPlatform(true); addWindowListener(this); return this; }