Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.awt.Component;

import javax.swing.JSplitPane;

public class Main {
    public static Component getOtherComponent(JSplitPane split, Component current) {
        if (split == null || current == null)
            return null;

        Component other = split.getLeftComponent();
        if (other == current)
            other = split.getRightComponent();
        return other;
    }
}