swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Canvas in java


From: Paul E Johnson
Subject: Re: Canvas in java
Date: Mon, 29 Jan 2001 08:42:08 -0600

kavita kadam wrote:
> 
> I am using canvas to draw objects .I want to draw each object onto something
> so that each object can be selected individually and can be moved, resized or
> deleted.What should that something be on which the object should be drawn?
> 

In Swarm 2.1.1, several of the gui classes are not available to java
programs in the default build of swarm.  We want people in the user
community to develop replacements for the canvas and various other gui
protocols that Swarm previously offered though tk/tcl.  If people do
that, we can enhance the Swarm package.  I've not done this, but Marcus
Daniels has said several times that users are free to recompile swarm
after editing the source file etc/interface.el.

I'm trying to learn enough about Swing to do drawing of the sort you
describe with native Java code.  So far, I've got a Raster class that
can draw dots and write words, and draw shapes.  I posted that sample
code last week in this list with a title such as "recruiting volunteers"
or such.  

Your description makes me think you are planning to allow the mouse-user
to move objects, and that's a level of complexity I had not considered,
but I bet you can work it out.  I don't know what kind of a project it
might be to have an object that is self-aware enough to change its (x,y)
coordinates when the user drags it.  But it must be possible.

-- 
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]