O'Reilly logo

Introduction to the Art of Programming Using Scala by Mark C. Lewis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12

Graphics

Not everything that you might ever want to put into a Graphical User Interface (GUI) is part of the standard GUI library. They have only added elements that are used fairly frequently. There are also times when you want to display your own graphics, something completely unique to your program, in a GUI. In order to do this, you have to be able to write graphics code.

Scala does not have its own graphics library. This is because the one in Java is quite complete and works well in a Scala style. The graphics capabilities of Java we will be using are collectively referred to as Java2D because they are the 2-D graphics libraries in Java. The types that we will use are primarily located in three different packages: java.awt, java.awt.geom, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required