Monday, November 11, 2019

Learnnig java_ Lesson(1) Graphics

Into coding adventures with Eclise and java,
All the learning of the language is pretty straightforward
if one already knows javascript. Decided to jump ahead to
graphics.

The first project, below, was easy eough.
Copied from a tutorial on youtube:


Still working on a second one, to show an image.

Let me make things easier for those who might wnat to experiment,
here. One cannot simply type the 'import...' statement to call the
swing libraries (for GUI). The way to do it is to type in the
component one want, and then click on the error x. The Eclipse
IDE will suggest using the import statement...



This is true more generally for using Eclipse. One creates
a new class by right-cliking on src on the left, and asking
for a new class. That's why its an IDE...

                                                       *     *     *

Yes, java makes use of classes, which are abstract. Then,
one creates an instance of that class with the word new. There is
no memory allocated for a class, memory is allocated at run
time with the word 'new'.

Code is compiled for use by the JRE, but the later interprets it!

                                                      *     *     *


https://www.dummies.com/programming/java/how-to-write-java-code-to-show-an-image-on-the-screen/

                                                     *     *     *



                                                    *     *     *

https://docs.oracle.com/javase/tutorial/

No comments: