Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
Python and Tcl - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Lua, etc
Client side (Applet) and Server side (Servlet) Graphics in Java

What is the current release of Java? Is it Java 1.6, Java 2 (1.6) or Java 6? Yes it is - they're all different names for the same thing!

Java started out as Java 1.0 ... and since code that would run on that Virtual Machine / written in that language will still run on today's version, it's still technically "Java 1". But would you seriously 'buy' a product that's not had a major revision in more than a dozen years? You would think twice ... and so it was that the marketing gurus switched to the "Java 2" name, and then to "Java 5" for 1.5 and "Java 6" for 1.6. And in some ways that makes huge sense beyond the marketing side too, because Java 6 is a very different beast to Java 1.0

Java 1.0's main use was in Applets - code running within a user's browser, sandboxed into an internal frame within a browser window and with carefully limited access beyond that frame. A very close parallel to Flash these days. But things have moved on ... Java has moved from browser / client side through to server side, where it's running complete applications (perhaps under Tomcat through the Servlet / JSP interface, tag libraries, Struts, Spring and the rest!)

From its early days, Java supported graphics through the AWT - Abstract Windowing Toolkit - a useful but low level interface. You call methods to paint with a Graphic object on a Frame object - methods with name like setcolor and drawLine and drawString. If you're working at this level, you'll be using pixel addressing so you'll find that you're providing your own utility methods with names like toXPixel and toYPixel - mapping world to screen coordinates; there's an example of such an applet here.

So is such graphics useful now that most Java runs on the server? It turns out that yes, it is!. As well as working on a Frame within a browser window, Java can work on a psuedoFrame in memory ... and then that frame can be stored as - for example - a .jpg file. We have an example of such a Servlet (for that's what it is) here. Technically, it uses a BufferedImage object, on which you run a createGraphics - it took me a while to work out the first time, but the example I'm pointing you at (link on "here") has all the hard word done for you and produces a graphic of data that the server extracts from MySQL database table. A truly 'put it all together' application!
(written 2009-06-17, updated 2009-06-22)

Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
J802 - Java - Abstract Windowing Toolkit
  [3049] Computer Graphics is fun - even if Java Applets are Old Hat - (2010-11-13)
  [2654] Java - from applets to servlets. JSPs and more - (2010-02-27)
  [2649] Length, size or capacity in Java? - (2010-02-24)
  [1325] Java - Client side applet applications as well as server side - (2007-08-29)

J807 - Java - Images
J953 - Combined Java Web Example: Servlets, JDBC and Graphics
  [1466] Effective Java training - the bootcamp approach - (2007-12-09)

Q913 - Object Orientation and General technical topics - Computer Graphics Principles
  [3262] Some SVG Elements, pixel and percent positioning - (2011-04-24)
  [3261] Scalable Vector Graphics - easy, low bandwidth, high resolution, dynamic. - (2011-04-23)
  [3211] Computer Graphics in PHP - World (incoming data) to Pixel (screen) conversion - (2011-03-24)
  [3148] OpenGL / C / C++ - an example to get you started - (2011-01-26)
  [2992] Matplotlib - graphing in Python - teaching examples - (2010-10-10)
  [2758] But what will you DO with all those pictures? - (2010-05-09)
  [2633] Why do I teach niche skills rather than mainstream? - (2010-02-13)

Back to
What should a web site cost you?
Previous and next
Horse's mouth home
Forward to
What difference does using the XHTML standard really make?
Some other Articles
Public Transport from London to Melksham, Wiltshire
Getting home from Melksham
A day in the life of a hotelier
What difference does using the XHTML standard really make?
Client side (Applet) and Server side (Servlet) Graphics in Java
What should a web site cost you?
Changing a variable behaviour in Perl - tieing
So what is this thing called Perl that I keep harping on about?
Perl references - $$var and \$var notations
How do I query a database (MySQL)?
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page

This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2019: 404 The Spa • Melksham, Wiltshire • United Kingdom • SN12 6QL
PH: 01225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/2245_Cli ... -Java.html • PAGE BUILT: Sat May 27 16:49:10 2017 • BUILD SYSTEM: WomanWithCat