I made a notepad application using java swing and currently it has the following features in it, you can create a new file and save it to the desired location also you can open an existing file, edit it and save it on a new location or update the existing one.Now i want to add the feature that would support the multiple file editing/creating at the same time, just like in notepad++. I have not much idea about how could this be done, please tell me the way to do it.would multi threading help?
Asked
Active
Viewed 807 times
-2
-
2*"..would multi threading help?"* Not really. Seems the GUI needs a `JTabbedPane`. You have worked that out, right? – Andrew Thompson Jan 10 '14 at 21:09
-
You might start with http://docs.oracle.com/javase/tutorial/uiswing/components/tabbedpane.html – Andreas Fester Jan 10 '14 at 21:10
-
thanks for the answer, and i dont understand what you guys want to know, should i write whole stories about how i even did the typing of my code, every question i post is put on hold as unclear by one or the other guy, i seriously don't find any flaw in my question this time.I think from next time i will type big and long stories about how i got the idea, how i opened my IDE, how many times i pressed enter, backspace, etc etc, would it be fine guys?i guess then it wont be put on hold as unclear by geniuses like you. – nrj Jan 11 '14 at 07:27
1 Answers
2
Take a look at the jTabbedPane documentation: http://docs.oracle.com/javase/tutorial/uiswing/components/tabbedpane.html
With the tabbed pane you can use several components and manage them all without threading (only one tab is active at a time) it will just require some additional logic to determine which tab/text area you are currently viewing when the toolbar features are used.

RyanS
- 3,964
- 3
- 23
- 37