2D Animation of Recursive Backtracking Maze Solution Using Javafx Versus AWT and Swing

Total Page:16

File Type:pdf, Size:1020Kb

2D Animation of Recursive Backtracking Maze Solution Using Javafx Versus AWT and Swing 2020 International Conference on Computational Science and Computational Intelligence (CSCI) CSCI-ISSE Full/Regular Research Paper 2D Animation of Recursive Backtracking Maze Solution Using JavaFX Versus AWT and Swing Anil L. Pereira School of Science and Technology Georgia Gwinnett College Lawrenceville, GA, USA [email protected] Abstract—This paper describes software developed by the AWT and Swing have been used widely in legacy software author, that constructs a two-dimensional graphical maze and uses [8]. Even though, software developers claim that there is a steep animation to visualize the recursive backtracking maze solution. learning curve for JavaFX [9], applications using AWT and The software is implemented using three Java graphics Swing are being rewritten with JavaFX. This is because of technologies, Java Abstract Window Toolkit, Java Swing and JavaFX’s look and feel and other features mentioned above. JavaFX. The performance of these technologies is evaluated with Also, the performance is claimed to be better, due to its graphics respect to their graphics rendering frame rate and heap memory rendering pipeline for modern graphics processing units (GPUs) utilization. The scalability of their rendering performance is [10]. This pipeline is comprised of: compared with respect to maze size and resolution of the displayed • A hardware accelerated graphics pipeline called Prism maze. A substantial performance gap between the technologies is reported, and the underlying issues that cause it are discussed, • A windowing toolkit for Prism called Glass such as memory management by the Java virtual machine, and • A Java2D software pipeline for unsupported graphics hardware accelerated graphics rendering. hardware • High-level support for making rich graphics simple Keywords—graphics; animation; JavaFX; Swing; AWT with Effects and 2D and 3D transforms I. INTRODUCTION The software implemented by the author of this paper is comprised of four Java programs. One program called Abstract Window Toolkit (AWT) is the original platform- MakeMaze.java constructs a 2D graphical maze using animation dependent windowing, graphics, and user interface (UI) widget and a randomized version of the well-known depth first search toolkit for Java, first released by Sun Microsystems in 1995 [1, algorithm. The program stores the information about the maze’s 2]. Swing is a graphical user interface (GUI) widget toolkit for structure in a text file. The other three programs were Java and is part of Oracle Corporation's Java Foundation Classes implemented for the purpose of reconstructing the graphical (JFC). JFC is an Application Programming Interface (API) for maze after reading the information about its structure from the providing GUI for Java programs. Swing was originally text file, and then solving the maze graphically using animation developed by Netscape Communications Corporation and was and the well-known recursive backtracking algorithm. The first included as part of the Java Standard Edition release 1.2 in difference in the three programs is that they use different Java 1998. The Swing API mostly extends AWT, but unlike AWT graphics technologies. One of the programs is called components, Swing components are "lightweight". i.e., they are SolveMazeAWTSwing.java (implemented using AWT and not implemented by platform-specific code, instead, they are Swing) and the other two are called SolveMazeFXFill.java and written entirely in Java and are platform-independent [3, 4]. SolveMazeFXNodes.java (both implemented using JavaFX). JavaFX [5] is a software platform released by Sun SolveMazeAWTSwing.java uses AWT to draw the graphics Microsystems in 2008 for constructing and delivering desktop and Swing to construct the GUI frame on which graphics is applications, as well as rich Internet applications (RIAs) that can drawn. The space for the maze is logically divided into a grid of be used on a wide variety of devices. JavaFX became open- rectangular shaped cells. A cell is called a tile. source in 2011. In 2012, it became part of Oracle Corporation’s SolveMazeFXFill.java uses a graphics context object to directly Java Development Kit (JDK). JavaFX is replacing Swing paint each tile in the maze to the program memory, similar to because of several advantages. It is more lightweight, and has SolveMazeAWTSwing.java, but uses JavaFX libraries and Cascading Style Sheets (CSS) styling, FXML and Scene GPU-based hardware accelerated rendering. Builder. Scene Builder allows UI construction by dragging and SolveMazeFXNodes.java adds each rectangle shaped tile as a dropping controls from a palette. This information is saved as node to a scene graph and passes the graph to the GPU-based FXML, a special XML format. Oracle Corporation no longer hardware accelerated rendering pipeline. includes JavaFX with Java since JDK 11. In 2018, JavaFX was made part of OpenJDK under the OpenJFX project to hasten the The main contribution of this paper is the evaluation of the pace of its development [6, 7]. graphics rendering performance and scalability of Java Swing and AWT when compared to JavaFX, for the purpose of 2D animation. To the best of the author’s knowledge, there is no 978-1-7281-7624-6/20/$31.00 ©2020 IEEE 1787 DOI 10.1109/CSCI51800.2020.00330 work reported in the available peer-reviewed technical literature, The program produces a graphical representation of the maze that researches this specific topic and discusses the effects of through animation, when the Make Maze button is clicked on memory management by the Java virtual machine (JVM) and the GUI as shown in Figs. 1 - 5. Linked lists, stack and priority hardware accelerated graphics rendering on performance and queue [5, 12] are used to store elements of the maze during its scalability. However, there are several Web-based resources construction. Queues and linked lists are used to store elements such as blogs, documentation, articles, and question and answer of the discovered path(s). sites that cover this specific topic, but present no data to compare memory utilization of the three Java graphics technologies. In The MakeMaze.java program prompts the user to enter the this paper, the data for heap memory utilization of the three file name and the width and height of the maze (in pixels) to be technologies collected by the author is presented and analyzed. displayed. The user is also prompted for the number of logical Results show, that greater the heap memory utilization, greater rows and columns of a 2D array data structure. The program are the effects of JVM’s memory management tasks of memory constructs the 2D array and initializes the value at every position allocation and deallocation on graphics rendering performance in it to zero. Each position is logically indexed by the and scalability. The reasons for it are discussed in this paper. intersection of a row and column of the 2D array. The first row from the top is row 0 and the first column from the left is column The paper is organized as follows. Section II describes the 0. The value at a particular position in the 2D array corresponds implementation details of the four programs and how they use to the color of a tile in the maze at relatively the same position. the Java graphics technologies. Section III contains performance Zeros represent the tiles in the boundaries (walls) which are evaluation. Section IV contains conclusions and future work. colored black. II. SOFTWARE IMPLEMENTATION For the maze shown in Figs. 1 – 5, the user input was 20 for both the number of rows and columns of the 2D array. The A. Make Maze Program product of the number of rows and columns gives the maze size, The MakeMaze.java program constructs a maze using a i.e., the total number of tiles in the maze. Thus, the maze size is randomized version of the depth first search algorithm [11]. This 20 X 20 tiles. The maze is completely colored black initially, as algorithm is frequently implemented with a stack [5, 12]. As shown in Fig. 1, because every position in the array is initialized explained in the introduction above, the space for the maze is to zero. Figs. 2 - 5 show intermediate frames in the animation of logically divided into a grid of rectangular shaped cells, and a path construction in the maze after the Make Maze button is cell is called a tile. Beginning at a random tile, the program clicked. The program constructs the paths with ones. Ones selects a random neighboring tile to the left, top, right and represent the tiles in the paths. Tiles in the paths are colored light bottom that has not been visited. The program marks the new tile gray when first visited. They are colored white on backtracking. as visited, and pushes it onto the stack for the purpose of The program constructs n mazes using the array (the value backtracking [11]. The program continues this process until a tile of n is specified by the user), adds each maze to a linked list and with no unvisited neighbors is encountered. Such a tile is selects the one with the longest path area (greatest number of considered a dead-end. When a dead-end is encountered, the ones) using a priority queue and writes the ones and zeros row- program backtracks through the path it constructed until it by-row into a text file. The content of the text file is shown in reaches a tile with an unvisited neighbor, and continues the path Fig. 6. Each of the n mazes when constructed initially have the generation by visiting this unvisited tile, thus constructing a new same path length. To ensure different path lengths for each maze, junction. This process continues until every tile in the maze is zeros are randomly changed to ones before adding the maze to visited, causing the program to backtrack to the beginning tile the linked list.
Recommended publications
  • Java Programming Language, Java SE 6
    Java Programming Language, Java SE 6 Electronic Presentation SL-275-SE6 REV G.2 D61748GC11 Edition 1.1 Copyright © 2008, 2010, Oracle and/or its affiliates. All rights reserved. Disclaimer This document contains proprietary information, is provided under a license agreement containing restrictions on use and disclosure, and is protected by copyright and other intellectual property laws. You may copy and print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way. Except as expressly permitted in your license agreement or allowed by law, you may not use, share, download, upload, copy, print, display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle. The information contained in this document is subject to change without notice. If you find any problems in the document, please report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not warranted to be error-free. Sun Microsystems, Inc. Disclaimer This training manual may include references to materials, offerings, or products that were previously offered by Sun Microsystems, Inc. Certain materials, offerings, services, or products may no longer be offered or provided. Oracle and its affiliates cannot be held responsible for any such references should they appear in the text provided. Restricted Rights Notice If this documentation is delivered to the U.S. Government or anyone using the documentation on behalf of the U.S. Government, the following notice is applicable: U.S.
    [Show full text]
  • Abstract Window Toolkit Overview
    In this chapter: • Components • Peers 1 • Layouts • Containers • And the Rest • Summary Abstract Window Toolkit Overview For years, programmers have had to go through the hassles of porting software from BSD-based UNIX to System V Release 4–based UNIX, from OpenWindows to Motif, from PC to UNIX to Macintosh (or some combination thereof), and between various other alternatives, too numerous to mention. Getting an applica- tion to work was only part of the problem; you also had to port it to all the plat- forms you supported, which often took more time than the development effort itself. In the UNIX world, standards like POSIX and X made it easier to move appli- cations between different UNIX platforms. But they only solved part of the prob- lem and didn’t provide any help with the PC world. Portability became even more important as the Internet grew. The goal was clear: wouldn’t it be great if you could just move applications between different operating environments without worr yingabout the software breaking because of a different operating system, win- dowing environment, or internal data representation? In the spring of 1995, Sun Microsystems announced Java, which claimed to solve this dilemma. What started out as a dancing penguin (or Star Trek communicator) named Duke on remote controls for interactive television has become a new paradigm for programming on the Internet. With Java, you can create a program on one platform and deliver the compilation output (byte-codes/class files) to ever yother supported environment without recompiling or worrying about the local windowing environment, word size, or byte order.
    [Show full text]
  • Drawing in GTK+
    CSci493.70 Graphical User Interface Programming Prof. Stewart Weiss Drawing in GTK+ Drawing in GTK+ Background In order to understand how to draw in GTK, you rst have to understand something about how GTK draws widgets, because how GTK draws widgets has an important role in how you design your drawing application. An understanding of how GTK draws widgets is also required if you ever plan to build your own custom widgets. Windows and Clipping Most windowing systems are designed around the idea that an application's visual display lies within a rectangular region on the screen called its window. The windowing system, e.g. Gnome or KDE or Explorer, does not automatically save the graphical content of an application's windows; instead it asks the application itself to repaint 1 its windows whenever it is needed. For example, if a window that is stacked below other windows gets raised to the top, then a client program has to repaint the area that was previously obscured. When the windowing system asks a client program to redraw part of a window, it sends an exposure event to the program that contains that window. An exposure event is simply an event sent from the underlying windowing system to a widget to notify it that it must redraw itself. In this context, a "window" means "a rectangular region with automatic clipping", not a top-level application window. Clipping is the act of removing portions of a window that do not need to be redrawn, or looked at the other way, it is determining which are the only regions of a window that must be redrawn.
    [Show full text]
  • Intro to Opengl
    Intro to OpenGL CS4620 Lecture 14 Guest Instructor: Nicolas Savva What is OpenGL? ● Open Graphics Library ● A low level API for 2D/3D rendering with the Graphics Hardware (GPU) ● Cross-platform (Windows, OS X, Linux, iOS, Android, ...) ● Developed by SGI in 1992 – 2014: OpenGL 4.5 – 2008: OpenGL 3.0 – 2006: OpenGL 2.1 ● Main alternative: DirectX/3D Cornell CS4620 Fall 2015 How does it fit in? ● Tap massive power of GPU hardware to render images ● Use GPU without caring about the exact details of the hardware Cornell CS4620 Fall 2015 CPU and GPU memory CPU BUS GPU SHADERS B B U U S S B U S F GPU MEMORY B SYSTEM MEMORY Display Cornell CS4620 Fall 2015 What OpenGL does for us ● Controls GPU ● Lets user specify resources...: – Geometry (vertices and primitives) – Textures – Shaders (programmable pieces of rendering pipeline) – Etc. ● ...and use them: – Rasterize and draw geometry Cornell CS4620 Fall 2015 How we will use OpenGL ● OpenGL version – We use 2.x-3.x (plus extensions) – Code avoids older, deprecated parts of OpenGL standard ● LWJGL – Lightweight Java Game Library – Java bindings for OpenGL API ● CS 4620/4621 Framework – Simplifies creating and using OpenGL resources Cornell CS4620 Fall 2015 LWJGL ● OpenGL originally written for C. ● LWJGL contains OpenGL binding for Java www.lwjgl.org/ ● Gives Java interface to C OpenGL commands ● Manages framebuffer (framebuffer: a buffer that holds the image that is displayed on the monitor) Cornell CS4620 Fall 2015 MainGame ● A window which can display GameScreens ● Initializes OpenGL context
    [Show full text]
  • Canvas Pocket Reference
    Canvas Pocket Reference Canvas Pocket Reference David Flanagan Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo Canvas Pocket Reference by David Flanagan Copyright © 2011 David Flanagan. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promo- tional use. Online editions are also available for most titles (http://my.safari booksonline.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or [email protected]. Editors: Mike Loukides and Simon St. Laurent Production Editor: Teresa Elsey Proofreader: Sada Preisch Indexer: John Bickelhaupt Cover Designer: Karen Montgomery Interior Designer: David Futato Illustrator: Robert Romano Printing History: December 2010: First Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. The Pocket Reference series designation, Canvas Pocket Reference, the image of a gold weaver bird, and related trade dress are trademarks of O’Reilly Media, Inc. wnload from Wow! eBook <www.wowebook.com> o D Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation
    [Show full text]
  • Visualization and Geometric Interpretation of 3D Surfaces Donya Ghafourzadeh
    LiU-ITN-TEK-A-13/011-SE Visualization and Geometric Interpretation of 3D Surfaces Donya Ghafourzadeh 2013-04-30 Department of Science and Technology Institutionen för teknik och naturvetenskap Linköping University Linköpings universitet nedewS ,gnipökrroN 47 106-ES 47 ,gnipökrroN nedewS 106 47 gnipökrroN LiU-ITN-TEK-A-13/011-SE Visualization and Geometric Interpretation of 3D Surfaces Examensarbete utfört i Medieteknik vid Tekniska högskolan vid Linköpings universitet Donya Ghafourzadeh Handledare George Baravdish Examinator Sasan Gooran Norrköping 2013-04-30 Upphovsrätt Detta dokument hålls tillgängligt på Internet – eller dess framtida ersättare – under en längre tid från publiceringsdatum under förutsättning att inga extra- ordinära omständigheter uppstår. Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner, skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för ickekommersiell forskning och för undervisning. Överföring av upphovsrätten vid en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av dokumentet kräver upphovsmannens medgivande. För att garantera äktheten, säkerheten och tillgängligheten finns det lösningar av teknisk och administrativ art. Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i den omfattning som god sed kräver vid användning av dokumentet på ovan beskrivna sätt samt skydd mot att dokumentet ändras eller presenteras i sådan form eller i sådant sammanhang som är kränkande för upphovsmannens litterära eller konstnärliga anseende eller egenart. För ytterligare information om Linköping University Electronic Press se förlagets hemsida http://www.ep.liu.se/ Copyright The publishers will keep this document online on the Internet - or its possible replacement - for a considerable time from the date of publication barring exceptional circumstances.
    [Show full text]
  • 100% Pure Java Cookbook Use of Native Code
    100% Pure Java Cookbook Guidelines for achieving the 100% Pure Java Standard Revision 4.0 Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, California 94303 USA Copyrights 2000 Sun Microsystems, Inc. All rights reserved. 901 San Antonio Road, Palo Alto, California 94043, U.S.A. This product and related documentation are protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this product or related documentation may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. Restricted Rights Legend Use, duplication, or disclosure by the United States Government is subject to the restrictions set forth in DFARS 252.227-7013 (c)(1)(ii) and FAR 52.227-19. The product described in this manual may be protected by one or more U.S. patents, foreign patents, or pending applications. Trademarks Sun, the Sun logo, Sun Microsystems, Java, Java Compatible, 100% Pure Java, JavaStar, JavaPureCheck, JavaBeans, Java 2D, Solaris,Write Once, Run Anywhere, JDK, Java Development Kit Standard Edition, JDBC, JavaSpin, HotJava, The Network Is The Computer, and JavaStation are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and certain other countries. UNIX is a registered trademark in the United States and other countries, exclusively licensed through X/Open Company, Ltd. All other product names mentioned herein are the trademarks of their respective owners. Netscape and Netscape Navigator are trademarks of Netscape Communications Corporation in the United States and other countries. THIS PUBLICATION IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
    [Show full text]
  • Quick Guide to Tkinter.Canvas
    tkinter Reference Guide Common Usage and Functions Installation on Your Local Machine.................................. 2 Canvas Initialization .......................................... 3 The Coordinate System......................................... 3 Drawing Lines.............................................. 4 Drawing Rectangles........................................... 5 Drawing Ovals.............................................. 6 Drawing Polygons ........................................... 7 Drawing Text .............................................. 8 1 Installation on Your Local Machine It is very likely that your version of Python 3 came with tkinter already installed. You can check if your local machine has a working version of tkinter by writing and executing a simple Python program consisting of the two lines of code shown below: import tkinter tkinter._test() Upon running this program, a window similar to the one pictured below should appear. If this window appears, then you have a working version of tkinter installed and available to use in your programs! If this window does not appear, then: • Make sure that the function you called is tkinter._test(), with a period followed by an underscore as well as a set of empty parenthesis. • If you are running a version of Python 2, then upgrade your version to Python 3 (this is the standard version for 15-110). • If you cannot upgrade your version of Python, then capitalize all instances of tkinter in the above program and all programs you may write to Tkinter and try again. •
    [Show full text]
  • Introduction to Opengl
    433-481 © Pearce 2001 Outline • OpenGL Background and History • Other Graphics Technology •Drawing • Viewing and Transformation • Lighting • JOGL and GLUT • Resources 433-380 Graphics and Computation Introduction to OpenGL Some images in these slides are taken from “The OpenGL Programming Manual”, which is copyright Addison Wesley and the OpenGL Architecture Review Board. http://www.opengl.org/documentation/red_book_1.0/ 2 OpenGL Background and History Other Graphics Technology • OpenGL = Open Graphics Library • Low Level Graphics • Developed at Silicon Graphics (SGI) • OpenGL • Successor to IrisGL • Cross Platform • Scene Graphs, BSPs (Win32, Mac OS X, Unix, Linux) – OpenSceneGraph, Java3D, VRML, • Only does 3D Graphics. No Platform Specifics PLIB (Windowing, Fonts, Input, GUI) • Version 1.4 widely available • DirectX (Direct3D) • Two Libraries – GL (Graphics Library) • Can mix some DirectX with OpenGL (e.g – GLU (Graphics Library Utilities) OpenGL and DirectInput in Quake III) 3 4 Platform Specifics The Drawing Process • Platform Specific OpenGL Interfaces ClearTheScreen(); DrawTheScene(); – Windows (WGL) CompleteDrawing(); – X11 (GLX) SwapBuffers(); – Mac OS X (CGL/AGL/NSOpenGL) – Motif (GLwMwidget) • In animation there are usually two buffers. Drawing usually occurs on the background buffer. When it is complete, it is brought to the – Qt (QGLWidget, QGLContext) front (swapped). This gives a smooth animation without the viewer • Java (JOGL) seeing the actual drawing taking place. Only the final image is viewed. • GLUT (GL Utility Library) • The technique to swap the buffers will depend on which windowing library you are using with OpenGL. 5 6 1 433-481 © Pearce 2001 Clearing the Window Setting the Colour glClearColor(0.0, 0.0, 0.0, 0.0); • Colour is specified in (R,G,B,A) form [Red, Green, Blue, Alpha], with glClear(GL_COLOR_BUFFER_BIT); each value being in the range of 0.0 to 1.0.
    [Show full text]
  • APPENDIX a the Java API Packages
    APPENDIX A The Java API Packages The JDK provides many packages (JDK 1.1 had 26 packages) and others are being developed (such as the 2D, 3D and Media packages). You must prefIx the names of the packages in Table A.I with "java.". TABLE A.1 The Java API packages PackaKe name Contents applet Applet related classes awt Platform-independent windowing classes awt.datatransfer Support for cut and paste style operations awt.event DeleKation event model classes awt.image Image manipulation classes awt.peer Native windowing facilities classes beans Beans facilities for developers io Input and output classes lang Basic Java classes lang. reflect Java reflection classes math BigDecimal and BigInteger classes net Java networking facilities rmi Remote method invocation classes rmi.dgc Distributed garbage collection rmi.registry Facilities for mapping names to remote objects rmi.server Facilities for the server side of RMI security Java Security for signed applets security.acl Access control list security. interfaces Digital Signature Algorithm interface specifIcations sql JDBC SQL interface classes text Internationalization facilities 428 Java and Object Orientation util General utili classes util.zip Java Archive (JAR) su ort classes For further information on these packages, see books such as Chan and Lee (1996) and Gosling and Yellin (1996). APPENDIXB The java.lang Package B.l INTRODUCTION The java. lang package contains the classes and interfaces which are the basis of the Java environment (as distinct from the Java language). For example, the class Obj ect (the root of all classes) is defined in this package. This package is automatically imported into every Java program (whether it is an application or an applet).
    [Show full text]
  • Mac OS X for Java™ Geeks by Will Iverson
    [ Team LiB ] • Table of Contents • Index • Reviews • Reader Reviews • Errata Mac OS X for Java™ Geeks By Will Iverson Publisher : O'Reilly Pub Date : April 2003 ISBN : 0-596-00400-1 Pages : 296 Mac OS X for Java Geeks delivers a complete and detailed look at the Mac OS X platform, geared specifically at Java developers. Programmers using the 10.2 (Jaguar) release of Mac OS X, and the new JDK 1.4, have unprecedented new functionality available to them. Whether you are a Java newbie, working your way through Java Swing and classpath issues, or you are a Java guru, comfortable with digital media, reflection, and J2EE, this book will teach you how to get around on Mac OS X. You'll also get the latest information on how to build applications that run seamlessly, and identically, on Windows, Linux, Unix, and the Mac. [ Team LiB ] [ Team LiB ] • Table of Contents • Index • Reviews • Reader Reviews • Errata Mac OS X for Java™ Geeks By Will Iverson Publisher : O'Reilly Pub Date : April 2003 ISBN : 0-596-00400-1 Pages : 296 Copyright Preface Organization Conventions Used in This Book Comments and Questions Acknowledgments Chapter 1. Getting Oriented Section 1.1. All Those Confusing Names Section 1.2. Why Now? Chapter 2. Apple's Java Platform Section 2.1. Apple JVM Basics Section 2.2. Apple's JVM Directory Layout Section 2.3. Additional APIs and Services Section 2.4. Going Forward Chapter 3. Java Tools Section 3.1. Terminal Section 3.2. Code Editors Section 3.3. Jakarta Ant Section 3.4.
    [Show full text]
  • Achieving High and Consistent Rendering Performance of Java AWT/Swing on Multiple Platforms
    SOFTWARE—PRACTICE AND EXPERIENCE Softw. Pract. Exper. 2009; 39:701–736 Published online in Wiley InterScience (www.interscience.wiley.com). DOI: 10.1002/spe.920 Achieving high and consistent rendering performance of Java AWT/Swing on multiple platforms Yi-Hsien Wang and I-Chen Wu∗,† Department of Computer Science, National Chiao Tung University, Hsinchu, Taiwan SUMMARY Wang et al. (Softw. Pract. Exper. 2007; 37(7):727–745) observed a phenomenon of performance incon- sistency in the graphics of Java Abstract Window Toolkit (AWT)/Swing among different Java runtime environments (JREs) on Windows XP. This phenomenon makes it difficult to predict the performance of Java game applications. Therefore, they proposed a portable AWT/Swing architecture, called CYC Window Toolkit (CWT), to provide programmers with high and consistent rendering performance for Java game development among different JREs. They implemented a DirectX version to demonstrate the feasibility of the architecture. This paper extends the above research to other environments in two aspects. First, we evaluate the rendering performance of the original Java AWT with different combi- nations of JREs, image application programming interfaces, system properties and operating systems (OSs), including Windows XP, Windows Vista, Fedora and Mac OS X. The evaluation results indicate that the performance inconsistency of Java AWT also exists among the four OSs, even if the same hardware configuration is used. Second, we design an OpenGL version of CWT, named CWT-GL, to take advantage of modern 3D graphics cards, and compare the rendering performance of CWT with Java AWT/Swing. The results show that CWT-GL achieves more consistent and higher rendering performance in JREs 1.4 to 1.6 on the four OSs.
    [Show full text]