I want to make a program same as notepad with tab option. I created a tab with JTabbedPane and add TextArea in that. tab created whit user when program run. how I can access to JTextArea in selected tab by user to save data and other options?
JPanel
. This class will container a JTextArea
(presumably within a JScrollPane
)When you need to add another tab, create an instance of this class, configure as you need. Generate a unique identifier for it (probably the same as the tab's name) and add it to a Map
of some kind, keyed to the identifier.
When you need to, using the identifier, get the instance of "editor pane".
Some other useful methods you might need