Change Contents of the Bubble
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Questions on HW7-Fall07

Ask questions on Homework 7 here:

Question: When you select some topics from the GUI, does the collage generator select one random picture from each directory and assemble them into a collage, or does it select multiple random pictures from each folder?

Question: By filter, do you mean alter the pictures somehow (posterize, negate?)?

Question: Do we have to restrict 3-5 topics chosen or can we allow them to select as many as they want?

Question: I'm having trouble with the concept of having them enter in the media path. Would you have 2 GUI's and then when they click a "submit" button then it opens up a 2nd GUI with the choices and such?

In my picture folders: I get a list like Is this a directory?

Will there always be a Thumbs.db?

Question: I'm confused about the placement of things. If I'm putting all of the collage generator into one class, what kinds of things should be in the main method?
public static void main(String [] args){
  myCollageGenerator cg = new myCollageGenerator(FileChooser.getMediaPath(""));}
This is what I have so far. Is it necessary to have anything else inside the main method?

Question: We are having trouble using objects that are defined and created in the GUI Constructor class within the inner class (for an action listener). We got this error: "local variable list1 is accessed from within inner class; needs to be declared final". We tried to declare the variable as public in the CollageGenerator class outside the constructor but it didn't fix the error. Help?

Question: I have created a JFileChooser that allows a user to pick any directory (directories only) he or she wants on his computer. Afterwards, I am putting the directory through a wrapper method in another class that will increment through the array of all returned files and find out which index holds pictures, directories, etc... and return only the pictures.

When I am incrementing through my loop to check the contents on the user selected directory, do I need to account for non-picture file types or will the TAs only pick directories with pictures in them? I.e. do I need to find a way to filter out .exe's, .txt's, etc... from any selected directories?

Question: Do both partners have to turn in the files, or does only one person have to do it?

I can't seem to get rid of thumbs.db. My collage works fine even with the thumbs.db as long as i don't apply filters to it. Once i do, it just gives me lots of runtime exceptions and crashes. Help!!!

Gracias for the tip on thumbs.db,my collage works to perfection now!!!

As stated in the homework "The TA's will have their own pictures arranged in the directory structure described above." So, their directories for the pics will always be under c:\cs1316\MediaSources\ ? we can go ahead and make the code in a way that the directories submitted will be always from c:\cs1316\MediaSources\ ? thanks.

Will we be determining the topics/directories, or should we have a directory-chooser for the TA to use? And related to the question above, should we assume the folders are in the working directory, use getMediaPath, or hard-code the directories assuming the folders are in c:\cs1316\MediaSources\?

Link to this Page