A Simple Java Drawing Tool Arkansas

The author has concocted an implement using AWT components for drawing basic geometric shapes on its panel using a mouse. Here's how to put it to work.

Local Companies

Applied Technology Group
(501) 372-2373
3201 US Highway 161
North Little, AR
Dts Computers Inc
(501) 794-3100
8660 Carrie Dr
Benton, AR
Hamco Business Solutions
(479) 646-6448
Fort Smith, AR
Edgewater Technology
(501) 227-0080
116 Ottenheimer St
Little Rock, AR
Computer Crafters
(870) 572-1520
315 S Sebastian
West Helena, AR
Softwyre
(501) 734-0017
804 Edgewood
Maumelle,, AR
L C I Network Solutions
(479) 527-9355
1115 E Shepherd Ln
Fayetteville, AR
Trademark Copy Systems
(479) 783-6588
1610 S B St
Fort Smith, AR
Hardwyre
(501) 734-0014
804 Edgewood Dr
Maumelle, AR
Moore Computing Services
(501) 225-8689
Little Rock, AR

provided by: 
Originally published at Internet.com


Recently, while I was doodling with Java code, I wrote this simple tool for drawing basic geometric shapes. This tool is written using AWT components and elaborates features such as inner classes, event handling, polymorphism, and menu handling. In this article, we will step through the code chunk by chunk to build our simple drawing tool.

Step 1: An Empty Class Structure



First, we start with an empty class structure and we extend/inherit it from java.awt.Frame class. We set the frame's title and size and make it visible.

//Title: A Simple Drawing Tool //Version: 1.0 //Copyright: Copyright (c) 2001 //Author: Yasir Feroze Minhas //Company: KAPS Computing (pvt) Ltd. //Description: This is a simple tool written using AWT for drawing basic shapes. package graph; import java.awt.*; public class SimpleDrawingTool extends Frame{ public SimpleDrawingTool() { //set frame's title super("Simple Drawing Tool"); //set frame size this.setSize(400, 400); //make this frame visible this.setVisible(true); } public static void main(String[] args) { SimpleDrawingTool simpleDrawingTool = new SimpleDrawingTool(); } }

Step 2: Adding Menus

...

Read article at Internet.com site

Featured Local Company

Softwyre

5017340017
804 Edgewood
Maumelle,, AR


Topics: 
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML