I have a JSplitPane in Java Swing. One part of the split pane has buttons to open a new view. I want to open a new view on the other part of the split pane.
How can it be done?
I have a JSplitPane in Java Swing. One part of the split pane has buttons to open a new view. I want to open a new view on the other part of the split pane.
How can it be done?
Copyright © 2021 Jogjafile Inc.
Your buttons need to have ActionListeners or Actions assigned. Inside these listeners create the new view and add it to the JSplitPane's other view.
If creating a new view takes too much time you need to perform the activities on a separate thread, releasing the Event Dispatching Thread that invoked your listener so the UI does not freeze.