nir sharma wrote:
abrar alvi wrote:
you can use fileaddress.getParent(); to get the parent directory and your variable filename already contain the file name or you can also use fileaddress.getName(); it wont make any difference though.
then you can store those in hashmap.
This should solve the issue but if not then can I know what is the issue you are facing?
Jelle Klap wrote:In your MyDrawPanel class you attempt to override JPanel#paintComponent(), but you've misspelled the name as paintComponenet(). Your method never gets invoked, which is why you're only seeing the default empty JPanel graphics
If you use the @Override annotation on a method that should be an overrides of a super class method or an implementation of an interface method, you can prevent this kind of thing very easily. In fact you seem to have done just that with the controlChange() method...
Campbell Ritchie wrote:Why have you got static fields? I think those fields should go with an object and should not be static.
Which page is it on? I have my copy here, and it would help to compare your code with what was printed.
Michael Dunn wrote:> Can you explain me why have you made String originalText as final....
remove the word 'final', recompile, see what happens.