类javax.swing.JSplitPane源码实例Demo

下面列出了怎么用javax.swing.JSplitPane的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: netcdf-java   文件: UnitsPanel.java
/**
 *
 */
public UnitsPanel(PreferencesExt prefs) {
  this.prefs = prefs;

  unitDataset = new UnitDatasetCheck((PreferencesExt) prefs.node("unitDataset"));
  unitConvert = new UnitConvert((PreferencesExt) prefs.node("unitConvert"));
  dateFormatMark = new DateFormatMark((PreferencesExt) prefs.node("dateFormatMark"));

  split2 = new JSplitPane(JSplitPane.VERTICAL_SPLIT, unitConvert, dateFormatMark);
  split2.setDividerLocation(prefs.getInt("splitPos2", 500));

  split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JScrollPane(unitDataset), split2);
  split.setDividerLocation(prefs.getInt("splitPos", 500));

  setLayout(new BorderLayout());
  add(split, BorderLayout.CENTER);
}
 
源代码2 项目: jdal   文件: TableEditorFrame.java
public void init() {
	
	tableIcon = FormUtils.getIcon(tableIcon, DEFAULT_TABLE_ICON);
	for (TableEditor<?> editor : editors)
		editor.getPanel().setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 0));
		
	list = new JList(editors);
	list.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 0));
	list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
	list.setVisibleRowCount(-1);
	JScrollPane scroll = new JScrollPane(list);
	split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, scroll, editorPanel);
	getContentPane().add(split);
	list.addListSelectionListener(this);
	list.setCellRenderer(new ListCellRenderer());
	list.setSelectedIndex(0);
	setSize(800, 600);
}
 
源代码3 项目: ghidra   文件: DataTypeSyncDialog.java
/**
 * Creates a data type synchronization dialog
 * @param plugin the data type manager plug-in
 * @param synchronizer the data type synchronizer for synchronizing a program and archive.
 * @param list the list of data types to be displayed to the user.
 * @param commit true means data types from the program data types are to be committed 
 * back to the associated data types in the archive. false means update the program data 
 * types with changes that were made in the archive.
 */
public DataTypeSyncDialog(DataTypeManagerPlugin plugin, String clientName, String sourceName,
		List<DataTypeSyncInfo> list, Set<DataTypeSyncInfo> preselectedInfos,
		String operationName, String title) {
	super(title, true);
	this.plugin = plugin;
	this.operationName = operationName;

	syncPanel = new DataTypeSyncPanel(list, preselectedInfos, this);
	comparePanel = new DataTypeComparePanel(clientName, sourceName);
	JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, syncPanel, comparePanel);
	splitPane.setResizeWeight(0.6);
	mainPanel = new JPanel(new BorderLayout());
	mainPanel.add(splitPane, BorderLayout.CENTER);
	addWorkPanel(mainPanel);
	initialize();
	createActions();
}
 
源代码4 项目: jdk8u60   文件: MotifSplitPaneDivider.java
/**
 * overrides to hardcode the size of the divider
 * PENDING(jeff) - rewrite JSplitPane so that this ins't needed
 */
public void setDividerSize(int newSize) {
    Insets          insets = getInsets();
    int             borderSize = 0;
    if (getBasicSplitPaneUI().getOrientation() ==
        JSplitPane.HORIZONTAL_SPLIT) {
        if (insets != null) {
            borderSize = insets.left + insets.right;
        }
    }
    else if (insets != null) {
        borderSize = insets.top + insets.bottom;
    }
    if (newSize < pad + minimumThumbSize + borderSize) {
        setDividerSize(pad + minimumThumbSize + borderSize);
    } else {
        vThumbHeight = hThumbWidth = newSize - pad - borderSize;
        super.setDividerSize(newSize);
    }
}
 
源代码5 项目: jdk8u-jdk   文件: Test6657026.java
public static void main(String[] args) throws InterruptedException {
    if (new JSplitPane().getFocusTraversalKeys(0).isEmpty()){
        throw new Error("unexpected traversal keys");
    }
    new JSplitPane() {
        public void setFocusTraversalKeys(int id, Set keystrokes) {
            keystrokes.clear();
            super.setFocusTraversalKeys(id, keystrokes);
        }
    };
    if (new JSplitPane().getFocusTraversalKeys(0).isEmpty()) {
        throw new Error("shared traversal keys");
    }
    KEYBOARD_DIVIDER_MOVE_OFFSET = -KEYBOARD_DIVIDER_MOVE_OFFSET;

    ThreadGroup group = new ThreadGroup("$$$");
    Thread thread = new Thread(group, new Test6657026());
    thread.start();
    thread.join();
}
 
源代码6 项目: TencentKona-8   文件: Test6657026.java
public static void main(String[] args) throws InterruptedException {
    if (new JSplitPane().getFocusTraversalKeys(0).isEmpty()){
        throw new Error("unexpected traversal keys");
    }
    new JSplitPane() {
        public void setFocusTraversalKeys(int id, Set keystrokes) {
            keystrokes.clear();
            super.setFocusTraversalKeys(id, keystrokes);
        }
    };
    if (new JSplitPane().getFocusTraversalKeys(0).isEmpty()) {
        throw new Error("shared traversal keys");
    }
    KEYBOARD_DIVIDER_MOVE_OFFSET = -KEYBOARD_DIVIDER_MOVE_OFFSET;

    ThreadGroup group = new ThreadGroup("$$$");
    Thread thread = new Thread(group, new Test6657026());
    thread.start();
    thread.join();
}
 
源代码7 项目: DominionSim   文件: DomGui.java
private void initializeComponent()	{
  setJMenuBar( createMenu() );
  
     myVPLineChart = new DomLineChart(myEngine.getPlayers(), "VP");
  myBarChart = new DomBarChart(myEngine.getPlayers());
     myMoneyLineChart = new DomLineChart(myEngine.getPlayers(), "Money");

     myTopSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, new JScrollPane(getControlPanel()), myVPLineChart.getChartPanel());
     myBottomSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, myBarChart.getChartPanel(), myMoneyLineChart.getChartPanel());
  myBigSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true, myTopSplit, myBottomSplit);
     myBigSplit.setResizeWeight(0.8);
     myTopSplit.setResizeWeight(0.50);
     myBottomSplit.setResizeWeight(0.5);
     myBottomSplit.setDividerSize(5);
     myBigSplit.setDividerSize(5);
     myTopSplit.setDividerSize(5);

  add(myBigSplit);
}
 
源代码8 项目: openjdk-jdk8u   文件: Test6657026.java
public void run() {
    SunToolkit.createNewAppContext();
    if (new JSplitPane().getFocusTraversalKeys(0).isEmpty()) {
        throw new Error("shared traversal keys");
    }
    JSplitPane pane = new JSplitPane();
    pane.setUI(this);

    createFocusListener().focusGained(null); // allows actions
    test(pane, "positiveIncrement", 3);
    test(pane, "negativeIncrement", 0);
}
 
源代码9 项目: swift-k   文件: TasksRenderer.java
protected JComponent createFileStuff() {
	JSplitPane t = new JSplitPane(VERTICAL_SPLIT);
	t.setResizeWeight(0.5);
	t.setTopComponent(createTransferTable());
	t.setBottomComponent(createFileopTable());
	return t;
}
 
源代码10 项目: ramus   文件: RSFViewer2.java
public RSFViewer2(final Engine engine) {
    this.engine = engine;
    this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    this.addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(WindowEvent e) {
            try {
                ((FileIEngineImpl) engine.getDeligate()).close();
            } catch (IOException e1) {
                e1.printStackTrace();
            }
            System.exit(0);
        }
    });
    this.setTitle("Ramus files viewer sample 2");

    JSplitPane pane = new JSplitPane();

    pane.setLeftComponent(createQualifiersList());
    pane.setRightComponent(createTreeView());

    this.setContentPane(pane);

    this.pack();
    this.setSize(800, 600);
    this.setLocationRelativeTo(null);
}
 
源代码11 项目: osp   文件: ControlSplitPanel.java
public void setDefaultValue(int _index) {
  switch(_index) {
     case 0 :
       splitpanel.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
       break;
     case 1 :
       splitpanel.setOneTouchExpandable(true);
       break;
     default :
       super.setDefaultValue(_index-2);
       break;
  }
}
 
源代码12 项目: netbeans   文件: SplitDocumentVerticallyAction.java
@Override
public final void actionPerformed(ActionEvent evt) {
    final TopComponent tc = WindowManager.getDefault().getRegistry().getActivated();

    if (tc != null) {
        SplitAction.splitWindow(tc, JSplitPane.VERTICAL_SPLIT, -1);
    }
}
 
源代码13 项目: jdk8u-jdk   文件: Test6910490.java
@Override
public void init() {
    Insets insets = new Insets(10, 10, 10, 10);
    Dimension size = new Dimension(getWidth() / 2, getHeight());
    JSplitPane pane = new JSplitPane(
            JSplitPane.HORIZONTAL_SPLIT,
            create("Color", size, new MatteBorder(insets, RED)),
            create("Icon", size, new MatteBorder(insets, this)));
    pane.setDividerLocation(size.width - pane.getDividerSize() / 2);
    add(pane);
}
 
源代码14 项目: openjdk-jdk9   文件: JSplitPaneOperator.java
/**
 * Maps {@code JSplitPane.setLeftComponent(Component)} through queue
 */
public void setLeftComponent(final Component component) {
    runMapping(new MapVoidAction("setLeftComponent") {
        @Override
        public void map() {
            ((JSplitPane) getSource()).setLeftComponent(component);
        }
    });
}
 
源代码15 项目: openjdk-jdk9   文件: JSplitPaneOverlapping.java
protected void prepareControls() {
    JFrame frame = new JFrame("SplitPane Mixing");
    JPanel p = new JPanel(new GridLayout());
    p.setPreferredSize(new Dimension(500, 500));
    propagateAWTControls(p);
    sp1 = new JScrollPane(p);

    JButton button = new JButton("JButton");
    button.setBackground(Color.RED);
    button.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent e) {
            clicked = true;
        }
    });
    sp2 = new JScrollPane(button);

    JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, sp1, sp2);
    splitPane.setOneTouchExpandable(false);
    splitPane.setDividerLocation(150);

    splitPane.setPreferredSize(new Dimension(400, 200));

    frame.getContentPane().add(splitPane);
    frame.pack();
    frame.setVisible(true);
}
 
源代码16 项目: Java8CN   文件: MultiSplitPaneUI.java
/**
 * Invokes the <code>getMaximumDividerLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int getMaximumDividerLocation(JSplitPane a) {
    int returnValue =
        ((SplitPaneUI) (uis.elementAt(0))).getMaximumDividerLocation(a);
    for (int i = 1; i < uis.size(); i++) {
        ((SplitPaneUI) (uis.elementAt(i))).getMaximumDividerLocation(a);
    }
    return returnValue;
}
 
源代码17 项目: magarena   文件: DeckEditorSplitPanel.java
private Container getMainContentContainer() {

        // card pool
        cardPoolDefs = filterPanel.getFilteredCards();

        cardPoolTable = new CardTablePanelB(cardPoolDefs, generatePoolTitle(), false);
        cardPoolTable.addMouseListener(new CardPoolMouseListener());
        cardPoolTable.addCardSelectionListener(this);

        cardPoolTable.setDeckEditorSelectionMode();

        deckDefs = this.deck;
        deckTable = new CardTablePanelB(deckDefs, generateDeckTitle(deckDefs), true);
        deckTable.addMouseListener(new DeckMouseListener());
        deckTable.addCardSelectionListener(this);
        deckTable.setDeckEditorSelectionMode();
        deckTable.showCardCount(true);

        final JPanel deckPanel = new JPanel();
        deckPanel.setOpaque(false);
        deckPanel.setLayout(new MigLayout("insets 0, gap 0, flowy"));
        deckPanel.add(buttonsPanel, "w 100%, h 40!");
        deckPanel.add(deckTable, "w 100%, h 100%");

        cardsSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
        cardsSplitPane.setOneTouchExpandable(false);
        cardsSplitPane.setLeftComponent(cardPoolTable);
        cardsSplitPane.setRightComponent(deckPanel);
        cardsSplitPane.setResizeWeight(0.5);
        cardsSplitPane.setDividerSize(14);
        cardsSplitPane.setBorder(null);
        cardsSplitPane.setOpaque(false);
        cardsSplitPane.setDividerLocation(getDividerPosition());

        // update deck stats
        sideBarPanel.setDeck(this.deck);

        return cardsSplitPane;

    }
 
源代码18 项目: openjdk-8   文件: Test6910490.java
@Override
public void init() {
    Insets insets = new Insets(10, 10, 10, 10);
    Dimension size = new Dimension(getWidth() / 2, getHeight());
    JSplitPane pane = new JSplitPane(
            JSplitPane.HORIZONTAL_SPLIT,
            create("Color", size, new MatteBorder(insets, RED)),
            create("Icon", size, new MatteBorder(insets, this)));
    pane.setDividerLocation(size.width - pane.getDividerSize() / 2);
    add(pane);
}
 
源代码19 项目: visualvm   文件: JCompoundSplitPane.java
private Component getFirstComponent(JSplitPane splitPane) {
    if (splitPane.getOrientation() == JSplitPane.HORIZONTAL_SPLIT) {
        return splitPane.getLeftComponent();
    } else {
        return splitPane.getTopComponent();
    }
}
 
源代码20 项目: SproutLife   文件: PanelController.java
public void buildPanels() {
    gameFrame = new GameFrame(this);
    gameMenu = new GameMenu(this);
    gameFrame.setJMenuBar(gameMenu);
    gameToolbar = new GameToolbar(this);
    
    boardRenderer = new BoardRenderer(getGameModel());
    displayControlPanel = new DisplayControlPanel(this);
    settingsControlPanel = new RulesControlPanel(this);
    statsPanel = new StatsPanel(this);
    tipsPanel = new TipsPanel(this);
    ScrollPanel scrollPanel = getScrollPanel();
    

    JTabbedPane rightPane = new JTabbedPane();
    rightPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
    rightPane.addTab("Display", wrapInScrolPane(displayControlPanel));
    rightPane.addTab("Rules", wrapInScrolPane(settingsControlPanel));
    rightPane.addTab("Stats", statsPanel);
    rightPane.addTab("Tips", tipsPanel);

    JPanel gamePanel = new JPanel(new BorderLayout());
    gamePanel.add(scrollPanel, BorderLayout.CENTER);
    gamePanel.add(gameToolbar, BorderLayout.NORTH);

    splitPane = new JSplitPane();
    splitPane.setResizeWeight(1);
    splitPane.setOneTouchExpandable(true);
    splitPane.setLeftComponent(gamePanel);
    splitPane.setRightComponent(rightPane);

    gameFrame.add(splitPane);
}
 
源代码21 项目: netbeans   文件: MultiSplitPaneTest.java
protected void resizeSplit( int orientation, int splitSize, int nonResizingSize ) {
    if( orientation == JSplitPane.HORIZONTAL_SPLIT )
        split.setSize( splitSize, nonResizingSize );
    else
        split.setSize( nonResizingSize, splitSize );
    testWindow.getContentPane().add( split );
    split.validate();
}
 
源代码22 项目: binnavi   文件: AbstractScriptPanel.java
public AbstractScriptPanel(final LayoutManager layout) {
  super(layout);

  languageBox = new LanguageBox(getManager());
  languageBox.addActionListener(new InternalLanguageBoxListener());

  m_inputPane.setEditable(true);
  m_inputPane.setBackground(new Color((float) .97, (float) .97, 1));
  m_inputPane.setFont(new Font(GuiHelper.getMonospaceFont(), 0, 13));

  m_OutputPane.setDocument(m_PythonStdoutDocument);

  m_OutputPane.setEditable(false);
  m_OutputPane.setBackground(new Color((float) .97, (float) .97, 1));
  final JScrollPane inputScrollPane = new JScrollPane(m_inputPane);

  final TitledBorder inputAreaBorder =
      new TitledBorder(new LineBorder(Color.LIGHT_GRAY, 1, true), "Command Line");
  inputScrollPane.setBorder(inputAreaBorder);
  inputScrollPane.setPreferredSize(new Dimension(600, 200));

  final JScrollPane m_OutputScrollPane = new JScrollPane(m_OutputPane);

  final TitledBorder outputAreaBorder =
      new TitledBorder(new LineBorder(Color.LIGHT_GRAY, 1, true), "Output");
  m_OutputScrollPane.setBorder(outputAreaBorder);
  m_OutputScrollPane.setPreferredSize(new Dimension(600, 200));

  add(languageBox, BorderLayout.NORTH);
  add(new JSplitPane(JSplitPane.VERTICAL_SPLIT, false, inputScrollPane, m_OutputScrollPane));

}
 
源代码23 项目: netbeans   文件: JSplitPaneSupport.java
private int convertPosition(LayoutConstraints desc) {
    if (desc != null) {
        Object position = desc.getConstraintsObject();
        if (JSplitPane.LEFT.equals(position) || JSplitPane.TOP.equals(position))
            return 0;
        if (JSplitPane.RIGHT.equals(position) || JSplitPane.BOTTOM.equals(position))
            return 1;
    }
    return -1;
}
 
源代码24 项目: netbeans   文件: PSheet.java
/**
 * Overridden to handle our layout requirements
 */
public void doLayout() {
    Component[] c = getComponents();

    if (c.length > 0 && getWidth() >= 0 && getHeight() >= 0) {
        Insets ins = getInsets();
        c[0].setBounds(ins.left, ins.top, getWidth() - (ins.right + ins.left), getHeight() - ins.top + ins.bottom);

        if (c[0] instanceof JSplitPane && Boolean.TRUE.equals(firstSplit)) {
            JSplitPane pane = (JSplitPane) c[0];
            pane.setDividerLocation(0.80f);
            pane.resetToPreferredSizes();

            JComponent dc = findDescriptionComponent();

            if (dc != null) {
                if (dc.getHeight() > 0) {
                    firstSplit = Boolean.FALSE;
                }
            } else {
                firstSplit = Boolean.FALSE;
            }
        }

        if (c.length > 1) {
            throw new IllegalStateException("Hmm, something is wrong: " + Arrays.asList(c));
        }
    }
}
 
源代码25 项目: mzmine3   文件: ProcessingComponent.java
public ProcessingComponent() {
  mainPanel = new JPanel(new BorderLayout());

  mainPanel.setPreferredSize(new Dimension(600, 400));

  cbDiffMSn = GUIUtils.addCheckbox(mainPanel,
      "Use different settings for " + MSLevel.MSONE.toString() + " and "
          + MSLevel.MSMS.toString(),
      this, "CBX_DIFFMSN",
      "If enabled, MS^1 and MS^n processing will use different parameters. The currently used settings are highlighted in green.");
  cbDiffMSn.setSelected(
      DataPointProcessingManager.getInst().getProcessingParameters().isDifferentiateMSn());

  mainPanel.add(cbDiffMSn, BorderLayout.NORTH);

  setupTreeViews();
  split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, tvProcessing, tvAllModules);
  initTreeListeners();
  mainPanel.add(split, BorderLayout.CENTER);
  split.setDividerLocation(300);

  buttonPanel = new JPanel(new FlowLayout());
  GUIUtils.addButton(buttonPanel, "Add", null, this, "BTN_ADD");
  GUIUtils.addButton(buttonPanel, "Remove", null, this, "BTN_REMOVE");
  GUIUtils.addButton(buttonPanel, "Set parameters", null, this, "BTN_SET_PARAMETERS");
  GUIUtils.addButton(buttonPanel, "Load", null, this, "BTN_LOAD");
  GUIUtils.addButton(buttonPanel, "Save", null, this, "BTN_SAVE");
  // GUIUtils.addButton(buttonPanel, "Set Default...", null, this,
  // "BTN_SET_DEFAULT");
  mainPanel.add(buttonPanel, BorderLayout.SOUTH);

  chooser = new FileChooser();
  chooser.setTitle("Select Processing Queue File");
  chooser.getExtensionFilters().add(new ExtensionFilter("XML files", XML_EXTENSION));

  SwingUtilities.invokeLater(() -> {
    this.setContent(mainPanel);
  });
}
 
源代码26 项目: openjdk-jdk9   文件: GUIBrowser.java
private JSplitPane createUnderPane(JTree tree) {
    JTextArea toStringArea = new JTextArea();
    toStringArea.setLineWrap(true);
    toStringArea.setEditable(false);
    tree.addTreeSelectionListener(new ToStringListener(toStringArea));
    JSplitPane result = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
            new JScrollPane(tree),
            new JScrollPane(toStringArea));
    result.setOneTouchExpandable(true);
    result.setDividerSize(8);
    result.setDividerLocation(0.8);
    return result;
}
 
源代码27 项目: BART   文件: ChartTopComponent.java
private void initLayout()   {
    JSplitPane splitPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
    splitPanel.setDividerLocation(230);
    
    JScrollPane scrTextArea = new JScrollPane();
    scrTextArea.setBorder(new TitledBorder(new LineBorder(Color.BLACK),
            Bundle.HINT_ChartTopComponent_SCRPanelTitle(), 
             TitledBorder.CENTER,TitledBorder.TOP));
    scrTextArea.setPreferredSize(new Dimension(220, 300));
    scrTextArea.setViewportView(detailedLog);

    JScrollPane scrTable = new JScrollPane();
    scrTable.setBorder(new TitledBorder(new LineBorder(Color.BLACK),
            Bundle.HINT_ChartTopComponent_SCRPanelTable(), 
             TitledBorder.CENTER,TitledBorder.TOP));
    scrTable.setViewportView(cellChangesTable);
    
    JScrollPane scrTC = new JScrollPane();
    scrTC.setViewportView(panelChart);

    splitPanel.add(scrTextArea);
    splitPanel.add(scrTable);
    
    JPanel tmp = new JPanel(new BorderLayout());
    tmp.add(panelChart,BorderLayout.NORTH);
    tmp.add(splitPanel,BorderLayout.CENTER);
    JScrollPane tmpScr = new JScrollPane();
    tmpScr.setViewportView(tmp);

    add(tmpScr,BorderLayout.CENTER);
}
 
源代码28 项目: visualvm   文件: JCompoundSplitPane.java
public void mouseReleased(MouseEvent e) {
    SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                ((JSplitPane) getFirstComponent()).setResizeWeight(firstResizeWeight);
                ((JSplitPane) getSecondComponent()).setResizeWeight(secondResizeWeight);
            }
        });
}
 
源代码29 项目: visualvm   文件: OQLControllerUI.java
private static void tweakSplitPaneUI(JSplitPane splitPane) {
    splitPane.setOpaque(false);
    splitPane.setBorder(null);
    splitPane.setDividerSize(3);

    if (!(splitPane.getUI() instanceof BasicSplitPaneUI)) {
        return;
    }

    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider();

    if (divider != null) {
        divider.setBorder(null);
    }
}
 
private void init() {
    setLayout(new BorderLayout());
    splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    splitPane.setOneTouchExpandable(true);
    splitPane.setBottomComponent(objectTable);
    TreeSearch tSearch = TreeSearch.installForOR(objectTree.getTree());
    splitPane.setTopComponent(tSearch);
    splitPane.setResizeWeight(.5);
    splitPane.setDividerLocation(.5);
    add(splitPane);
}
 
 类所在包
 同包方法