🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #308

Java program to simulate circuits.. help with graphics area ..

#308
From: Aaron T
Date: Sat, 05 May 2001 02:54
20 lines
2004 bytes
Okay I have got to build a program that will be able to draw gates to the
screen (such as AND, OR, NOT etc) and flip flips, sources etc, pretty basic
stuff. Also pins must be recorded on the canvas as the gates should be able
to be connected.

I've been hard pressed to find a tutorial that deals with anything past the
very basics of 2DGraphics in java, like drawing to screeen and so forth..

What I need to be able to do is draw to screen, but then later have the user
able to select any gate and move it around. I kind of know how to do the
moving with a update() or paint() method that is called by a mouse movement,
but how do I make each shape (I'm using GeneralPath as the shape for a
certain gate) a seperate 'object' that is able to be selected at will?

Any help on the forum, email or pointers to websites would be great.. I've
sifted the sun site, used the books I've bought and nothing seems to go into
any great detail on this.

Thanks very much
Aaron Todd
Technical Details
Message-ID: <3af36d74$0$25514$7f31c96c@news01.syd.optusnet.com.au>
Path: arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!nsw.nnrp.telstra.net!news01.syd.optusnet.com.au!nnrp01.syd.optusnet.com.au!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113ae9,b3cb45071f1608e7,start
X-Google-Attributes: gid113ae9,public
X-Google-Thread: 10d6db,b3cb45071f1608e7,start
X-Google-Attributes: gid10d6db,public
X-Google-ArrivalTime: 2001-05-04 20:05:05 PST
Path: arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!nsw.nnrp.telstra.net!news01.syd.optusnet.com.au!nnrp01.syd.optusnet.com.au!not-for-mail
From: "Aaron T" <toddam@dingoblue.net.au>
Newsgroups: aus.computers.java,comp.lang.java.help
Subject: Java program to simulate circuits.. help with graphics area .. 
Date: Sat, 5 May 2001 10:54:48 +0800
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Lines: 24
Message-ID: <3af36d74$0$25514$7f31c96c@news01.syd.optusnet.com.au>
NNTP-Posting-Host: 198.142.79.202
X-Trace: 989031797 news01.syd.optusnet.com.au 25514 198.142.79.202