This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
hi, pl. help me out in acheiving the foll: U all must hv seen tht while using std Word or any Microsoft prod, When we clk on File menu we get the listing of recently opened files before "exit" menu item. whtevr file r opened or closed it appears in the list. Same file list also appears whn we clk on "window" menu item. but the no.of file here are just 3 most recent files whereas whn ths appears on "File" menulist thn the no.of most recently opened files are 8. i also want to implement this in my GUI. i hv made Menu using JMenu, Jmenuitems etc. I want same std word file listing implementation here too... pl. reply soon....
Hi remi, I have been thinking about this too for one of my applications, but haven't actually done it yet. The way I'm going to approach this is 1) When you open a file you will need to add it's path and name to some text file which always holds, say, 8 filenames in a list (files separated by new lines). If there are already 8 files in the list, remove the first one and add the new one to the end. 2) Use this file when you are creating your swing JMenu. First, read the text file list into an array of Strings with 8 elements. Then, use the values of these array elements in a loop to generate new JMenuItems, soemthing like the following: e.g.
If you make any progress with this, I would be interested to know how you do it. hope this is of some use. Ben. [This message has been edited by Ben Wood (edited August 29, 2001).]