GaegeSmith / foyerSlideShow

1 stars 0 forks source link

Spelling errors #4

Open JustisGuin opened 2 years ago

JustisGuin commented 2 years ago

Setting is spelled wrong: Then you need to create a frame, two button, set frame size, and setDefaultCloseOperation. setDefaultCloseOperation is seting what happen to the frame when you try to close the frame or screen.

Capital Letter: for now let just keep it how I had it. Next you need to register your button listener and also set the button location. To do this type this

Error Spelled Wrong:

If you run this right now it will popup an errer that said errer: cannot find symbol. What this is saying is that there is no class name removeImage and also addImage. To fix the errer you need to create class for both of the removeImage and also addImage. To make a class you could ether create an new java file or create the class in side of this java file. To make a class type class nameOfClass{}. But for the addImage class and removeImage class you need to implements ActionListener. Place the classes right after the last bracket of the startProgram() method. Then you need to make a actionPerformed method in both of the classes the removeImage and addImage.

Capital Letter: if you run this is what will be created.

Capital Letter: If you run this and click on the Add Image button the file explorer will popup. then you need to type a if statement that check if status is == to JFileChooser.APPROVE_OPTION. The if statement will look like this

Error Spelled Wrong: The throws will throw out any IOException and InterruptedException errers. This will alow you to bypass these errers. Ceate this method after the removeImage class. Now lets go back the the addIImage class. You then need to type in a try and catch statement to catch the IOException and InterruptedException errers. This how the try and catch statement will look like

Inside Spelled Wrong: Now copy the code insid the actionPerformed mehod insid the addImage class and place it inside the actionPerformed method in the removeImage class. There is some things you need to change. The first change is to change the getAbsolutePath() on the chooser to getName(). The next change is to change the second parameter on the runSript() to "removeImageFromPiScript.ps1"

Website Spelled wrong: Link to websit

AyushPathak3011 commented 2 years ago

Created a PR to fix the typos PR