I'm trying to create a program and found this website that was exactly what I wanted. When I followed all the instructions I got this java code which makes no sense and also gives errors when I try to assign a class. Please help.

http://labs.unwieldy.net/moocirclepack/

<script type="text/javascript" src="js/mootools-1.2-core-nc.js">
</script>
<script type="text/javascript" src="js/mootools-1.2-more.js">
</script>
<script type="text/javascript" src="js/excanvas.js"></script>
<script type="text/javascript" src="js/moocirclepack.js"></script>
}
var circles = [
                new Circle(10, 10, 50, "rgba(120, 80, 120, 0.75)"),
                new Circle(20, 25, 20, "rgba(174, 175, 76, 0.75)"),
                new Circle(30, 40, 70, "rgba(88, 88, 120, 0.75)"),
                new Circle(65, 65, 10, "rgba(205, 55, 140, 0.75)")
              ]
<canvas id="canvasElement" width="500" height="500"></canvas>

var packer = new MooCirclePack(circles, "canvasElement")
packer.run()
packer.hook()

Try asking on a javascript forum. This forum is for java.

Moving to JS.

Moving to JS.

Sorry about that I thought I put it in Javascript. Thank you for Moving it Ezzaral.

Look at what js libraries the page is included...

<script type="text/javascript" src="js/mootools-1.2-core-nc.js"></script>
<script type="text/javascript" src="js/mootools-1.2-more.js"></script>
<script type="text/javascript" src="js/excanvas.js"></script>
<script type="text/javascript" src="js/moocirclepack.js"></script>

Do you have all of those library files (.js) in your "js" folder where the HTML file is located? If not, you won't be able to display it.

So what errors have you gotten?

By the way, if you just want a display circle, you could give wz_jsgraphics library a try (by Walterzon). Though, only German website version is still alive (http://www.walterzorn.de). Other sites (English version) are gone. I've been using this library all the time for drawing line/polygon/filled-polygon.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.