Java Referal
Application extends the Frame class as we need to be able to access the methods within the Frame class. Application is implementing the ActionListener class because we have various buttons which need to have to associate functions.The main frame in the application is made up of 2 panels and a list, the panels are set to the east and the bottom of the layout the centre of the frame is taken up by the list object. The east panel is made up of 4 buttons and is itself made up by from grid layout I have designated that the buttons are in a 1 column with 5 rows each row having one button placed within it except for the final one which is left blank for ease of layout. The bottom panel is made up of 3 buttons set in the default layout. All buttons have a actionlistener upon them and upon pressing the button the said action is executed. • Upon pressing the Movies button, the list in the centre is cleared of all content and a new instance of the SearchMov class is created. From this class variable an array of filenames from the given root is produced and the content of this array are one by one placed in the list. • Upon pressing the Music button, the list in
• Upon pressing the Exit button The whole application in whatever state is terminated. The SearchAll class we import the IO package because we need to be able to handle the methods given by the package. A global String array is declared first with the name list of files we then declare a file ‘dir’ with the address passed to use via the variable root and an array of files is then produced with the name f and is populated with all the files from the operation of searching the directory dir. • Upon pressing the Return to List button we try the segment of code thus:- string variable tempNotes is set to equal the contents of the textarea and a new instance of the class file SaveFile is created we then catch any exceptions and display an error message if need be. • Upon pressing the All button, the list in the centre is cleared of all content and a new instance of the SearchAll class is created. From this class variable an array of filenames from the given root is produced and the content of this array are one by one placed in the list.
Some topics in this essay:
Application Application,
View Notes,
SearchPic SearchPic,
SearchMov SearchMov,
SeachAll SearchAll,
SearchMusic SearchMusic,
FileNotes FileNotes,
Return List,
SaveFile SaveFile,
Root Directory,
string array,
dodirs method,
file array,
array file,
file file,
array check,
• pressing,
io package,
address passed via,
passed via,
class variable,
run dodirs method,
directory run dodirs,
file directory run,
array file directory,
Join now to see the rest of the essay!
Approximate Word count = 1726
Approximate Pages = 7 (250 words per page double spaced)
|