File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
src/main/java/org/teachingextensions/logo Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1111import java .util .ArrayList ;
1212import java .util .List ;
1313
14- import javax .swing .ImageIcon ;
1514import javax .swing .JFrame ;
1615
16+ import org .teachingextensions .approvals .lite .util .ObjectUtils ;
1717import org .teachingextensions .logo .Turtle .Animals ;
1818import org .teachingextensions .windows .ProgramWindow ;
1919
@@ -98,6 +98,7 @@ private void paintTurtle(Graphics2D g)
9898 g .drawImage (image , move , null );
9999 }
100100 }
101+ @ Override
101102 public synchronized Image getImage ()
102103 {
103104 if (image == null )
@@ -106,6 +107,7 @@ public synchronized Image getImage()
106107 }
107108 return image ;
108109 }
110+ @ Override
109111 public synchronized Animals getAnimal ()
110112 {
111113 if (animal == null )
@@ -120,17 +122,18 @@ public synchronized Animals getAnimal()
120122 *
121123 * @see Animals
122124 */
125+ @ Override
123126 public synchronized void setAnimal (Animals animal )
124127 {
125128 this .animal = animal ;
126- //image = new ImageIcon(this.getClass().getResource(animal + ".png")).getImage();
127- image = new ImageIcon (this .getClass ().getClassLoader ()
128- .getResource ("images/" + animal + ".png" )).getImage ();
129+ this .image = ObjectUtils .loadImage (MultiTurtlePanel .class , this .animal + ".png" );
129130 }
131+ @ Override
130132 public void setCursor (int cursor )
131133 {
132134 this .setCursor (Cursor .getPredefinedCursor (cursor ));
133135 }
136+ @ Override
134137 public void ___ ()
135138 {
136139 // blank for the DeepDive
You can’t perform that action at this time.
0 commit comments