Link Details

Link 139535 thumbnail
User 254157 avatar

By jlweaver
via learnjavafx.typepad.com
Published: Dec 07 2008 / 13:38

In the first post of this Simple Calculator App series, we took some baby steps toward creating a simple calculator. We're using the comp, shown below, that graphics designer Mark Dingman of Malden Labs supplied. For teaching purposes, I'm taking a very incremental and sometimes indirect approach to building this. For example, in the first post I used the SwingButton class for the calculator keys. In this post, we'll use a Group that consists of a Rectangle and Text object to create each key. Also, we'll use a for expression to succinctly create the keys -- a technique that has another benefit related to event handling that you'll see in a moment.
  • 14
  • 0
  • 914
  • 222

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.