compsci

Mr. Christian Day’s Computer Science Weblog

Entries from May 2004

Toolkit class

May 5th, 2004 · No Comments

The Toolkit class is an abstract class used to “bind the various components to particular native toolkit implementations,” whatever the heck that means.  It has some useful methods.  First, to use it
Toolkit t = Toolkit.getDefaultToolkit();
t.beep();  <font color=”red”>// Emits an audio beep</font>
URL u = new URL(”http://community.emmawillard.org/Science/compsci/images/whatever.gif”);
Image someImage = t.getImage(u);
Dimension d = t.getScreenSize();  //<font color=”red”> Gets the [...]

[Read more]

Tags: Java development