Tutorial: Creating a custom button

In this tutorial, you'll learn how to create a custom button by extending the Field class that is provided in the BlackBerry® Java® SDK. This button has a custom border that is created from PNG images, and responds to events (such as selecting and clicking) by changing its visual appearance.

Here's an example of what we'll be creating:

Before you start

Before you begin this tutorial, you should have the following:

  • Basic knowledge of Java® and an understanding of developing applications using the BlackBerry Java SDK
  • Familiarity with screens and managers, and how to use these components in an application
  • A tool, such as Eclipse® and the BlackBerry® Java® Plug-in for Eclipse®, to create and edit .java files.

For more information about how to install and use the BlackBerry® Java® Plug-in, visit www.blackberry.com/go/devdocs to read the BlackBerry Java Plug-in for Eclipse Installation and Configuration Guide.


Was this information helpful? Send us your comments.