Question on Graphics example from sun

I'm looking at the code for Transform.java from this link
http://java.sun.com/docs/books/tutorial/2d/display/transforming.html
I understand everything but the purpose of the boolean no2D, what exactly is it for?
Thanks

The boolean no2D variable determines if the paintComponent method should cast the Graphics object into a Graphics2D object and take advantage of the 2D API.

Similar Messages

  • Running examples from J2EE Tutorial

    Has anyone been successfully running examples from
    J2EE Tutorial on Creator?
    I tried to import the JSP but Creator complains that it is
    not an XHTML document. Clicking on the 'Convert to XHTML'
    button or 'Preview...' button does not seem to do anything.
    Openning the Source panel shows parsing problems on
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    Does anyone know how to run these in Creator correctly?
    - weijyh

    Yes,
    It runs successfully....
    I have download the examples from Sun,
    unzipped It into my Projektfolder and open it in Creator, start it and works fine ...
    No error messages ....

  • General and specific questions on the applicability of Sun Studio 11

    Hi. In an e-mail letter from Sun Microsystems I read about Sun Studio 11 to "utilize its record-setting parallelizing compilers." From this message I was attracted by the possibility of adding something like parallel processing, not by changing the processor (hardware), but by adding Sun-Studio-11 software to a Linux operating system. Now I already have a Fortran compiler, the Intel Fortran Compiler for Linux, which is free and can handle Cray-style pointers, a feature hard to find in a free Fortran compiler.
    1a. So for the most basic of questions, without having parallel-processing hardware, just an ordinary processor [a 1-GigaHertz (GHz) Advanced MicroDevices Duron central processing unit, in my case], is it possible to have parallel processing and thereby increase one's computing speed by installing Sun Studio 11 in a Linux operating system?
    1b. If so, by what factor could one expect the speed of computation to increase over not having Sun Studio 11 installed? (If the gain in speed is dependent on the type of computations being performed, I imagine possibly using a Fortran code to perform numerical calculations using and perhaps searching for minima or maxima in a two-or-more-dimensional surface. So please give me an idea of the sort of gain in speed one could expect for these two types of activites, calculations using formulas and searches for minima and maxima among already-computed quantities.)
    1c. Again if so, how could one just by adding software have parallel processing without two or more hardware processors? In other words, what is the basic working principle of the software to make the simultaneous performance of multiple tasks (multitasking or parallel processing) possible?
    2a. Does Sun Studio 11 include a Fortan compiler?
    2b. If so, must one use it to have parallel processing with Sun Studio 11?
    2c. Or will the Intel Fortran Compiler for Linux work with Sun Studio 11 to have a parallel processing capability?
    Concerning hardware requirements I read that Sun Studio 11 requires a minimum of 512 MegaBytes (MB) of memory, presumably Random Access Memory (RAM). My Hewlett-Packard, ZE1110, Pavilion, notebook computer has 256 MB of RAM, but is expandable to a maximum of 512 MB of RAM. So in this respect it is in principle at least technically possible for me to meet the minimum system requirement for Sun Studio 11 with my computer, if I choose to increase its RAM. Somehow accommodating the cost of such a RAM addition, including whether one may have to buy two, matching, 256-MB RAM modules or just presumably one additional 256-RAM module, is another requirement. But before spending money for such an upgrade, one should first thoroughly investigate other matters to determine if other things are going to work and to determine what gain, if any, one could expect in computing speed with Sun Studio 11 and an additional 256 MB of RAM; then decide, based on such data, whether the purchase is personally worth the money or not. That's one motivation behind this posting; another motivation is for me to learn some things.
    Lastly I would like to here thank whoever was thoughtful enough to provide the Sun Download Manager (SDM) 2.0, which allows the pausing and resumption of the 207-MB download studio11-lin-x86.tar.bz2 for the Linux version of the Sun Studio 11! Using a slow, dialup, Internet connection like mine having a maximum speed of 28.8 kilobits/second, this makes it possible to download that file over a number of Internet sessions instead of having to have an uninterrupted, 19-or-more-hour Internet session. Besides the invconvenience of tying up one's telephone line for that long a time, it might be even be difficult to have such an uninterrupted Internet session for that long a time. I have at least started such a download using the SDM 2.0 potentially over multiple Internet sessions. Whether or not I carry it out to completion could depend on whether everything looks good with Sun Studio 11 for my particular situation. Thanks in advance for your help.

    Thanks for both of your postings here. I'm mostly trying to learn something here.
    From Maxim Kartashev: "For example, if one thread (or process, or lwp) frequently performs an I/O operation, then the other thread (process, lwp) can utilize processor resources to perform, say, some computations while first one waits for operation to complete."
    I think I might understand what you meant above. I guess lwp in the above context stands for light-weight process. And I think you may be talking about a potential gain in speed with just one, ordinary processor. I guess you meant that one program, or perhaps group of programs, could perform input/output processes at the same time it is performing calculations because different parts of the processor are being used in these two groups of processes. Then on "while first one waits for operation to complete" I guess you meant that if the input/output operations finish before the computations finish, then thread 1 that was performing the input/output operations will have to wait until the current computations ordered by thread 2 are complete before thread 1 can utilize the computational resources for its own computations; i.e., two threads can't use the same computational resources of an ordinary processor at the same time. How is my thinking so far, Maxim, right, partly right, or all wrong?
    Now if the above thinking of mine is right, then it appears that one could have some gain in speed doing things like you suggest with just one, ordinary processor. And if so, I imagine that the gain could be a maximum of a factor of two for a program that requires spending as much time in input and output as it does in computation; i.e., keeping both the computational and input/output resources working all of the time without the input/output resources waiting on the computational resources or vice versa. How is my thinking here?
    If the above thinking is correct, just for purposes of discussion with just one, ordinary processor, not a dual processor, and a program which does nothing but computations there would be no gain in speed using Sun Studio 11 and a Fortran compiler over not using Sun Studio 11. In other words, to increase the speed of computation one would have to buy a faster computer, buy parallel processing hardware for an existing computer and use parallel-processing software, or somehow figure out how to harness two or more computers to work for you at the same time with instructions from one piece or perhaps set of pieces of code set up for parallel processing using two or more different computers. The latter case would be a computer analogue or "two 'heads' are better than one," not human heads, but computers. How is my thinking here?
    Here I am still assuming that it is possible for one processor to be used to do two different kinds things at once. However, I don't see how one Fortran program could instruct two things to be done at once. This is because I have not seriously studied parallel processing, I suppose. That is I am used to a sequential set of instructions that proceed from top to botton down the lines of code; i.e., one instruction or line of code can't be executed until the line of code before it has been completely executed. That is the computing "world" with which I am familiar. So how about someone here teaching me with an example of parallel-processing Fortran code how parallel processing works, explaining what instruction or group of instructions tells the computer to execute input and computational instructions at the same time?
    Based on the encouraging information from one or more other people I have been able to use the Intel Fortran for Linux 8.1.024, if I remember correctly, in a computer with a 1-GigaHertz (GHz), Advanced MicroDevices (A.M.D.), Duron Processor. So this is at least one case where it is not essential to have an Intel processor to use the Intel Fortran Compiler for Linux 8.1.024.
    Is the Sun Fortran compiler free for personal use? And can it handle Cray-style pointers?

  • Signed Jars from Sun?

    I also posted this topic in the "Security General" forum. Please write your answers there. Thank you!
    Hello,
    why are the jars provided by Sun for the different Java technologies not signed with a trusted certificate from Sun?
    I have the requirement that my WebStart enabled application must run in privileged mode, but then all resources including for example the ejb.jar must be signed.
    I know that I could easily run the jarsigner tool myself on the ejb.jar but this would probably evoke legal problems: My company can't claim authorship for a piece of software built by Sun.
    My personal opinion is, that this makes the utilizability of WebStart for commercial products highly questionable.
    sanostol

    It dosnt make utilizability of WebStart for commercial products highly questionable - It's up to your company to ensure your code is signed with their own key, and to ensure nothing has been tampered with - if a user downloads something from your site that proceeds to wipe their disk or perform a denial of service attack on Microsoft for that matter that's your liability.
    You have to understand that all the jars in a web start app currently have to be signed by the same key, furthermore each jar cannot be signed more than once. Were Sun to sign their jars we'd all be having to unpack to remove the signatures, re-jar the contents and sign with out own keys again - it's often a royal pain when third party jars come signed.
    We can get around this by making these third-party jars a separate <part> each having its own jnlp file, but this is more work and if this part needs security settings the user will be prompted about wether they want to install every indivdual jar in your app - defiantly not desirable. Currently we have this with JavaHelp which frustratingly does come signed, and needs at least client-privs to allow users to print pages.
    - Richard

  • Question about graphic card

    Question about graphic card
    my friend has Macbook pro 13 with intel HD 3000 he upgraded his ram from 4 to 8gb and his graphic card updated from 384mb to 512mb why ?
    and i have macbook 2010 and i upgraded from 2gb to 8gb and my graphic card didnt upgraded why ? its still 256mb
    can someone till me whats the trick !!!

    You have a Core 2 Duo MacBook and not a  i7 MacBook Pro.

  • Migrate Oracle Apps 11.5.10.2 from Sun solaris to RHE Linux 32 bit.

    We are migrating the Oracle Apps 11.5.10.2 from Solaris two node to Linux two node including the database Oracle 10.2.04 64 bit.
    Since the applications only support 32 bit we are not able to store CM tier in a 64 bit Linux so with this considerations we are going with the below plan.
    1. Install RHEL 5 as a 32 bit for two nodes ( One for DB/CM and FORMS/WEB)
    2. Migrate the applications and DB from Solaris to Linux as the same node configuration that is
    Node A:
    Oracle DB 10.2.0.4 64 bit ( SUN oS 10 64bit) -> Oracle 10.2.0.5 32bit (RHEL 5 32 bit)
    Oracle Apps CM 11.5.10.2 (SUN OS 10 64bit) -> Oracle apps CM 32 bit(RHEL 5 32 bit)
    Node B:
    Oracle apps 11.5.10.2 forms (sun OS 10) -> Oracle apps 11.5.10.2 forms ( RHEL 5 32bit)
    Oracle apps WEB 11.5.10.2 (SUN OS 10) -> Oracle apps WEB 11.5.10.2 ( RHEL 5 32 bit).
    Question : 1. Did you see any snag on this kind of migration
    2. Any documentation to migrate the Oracle APPS 11i 10.2.0.4-64 bit database from Sun Solaris to oracle apps 11i 10.2.0.5-32 bit on Linux

    Hi,
    1. Did you see any snag on this kind of migrationWhy would you downgrade the db from 64 bit to 32 bit. As 32 Bit has lot of memory limitations.
    You could keep the database on 64 bit for linux too.
    2. Any documentation to migrate the Oracle APPS 11i 10.2.0.4-64 bit database from Sun Solaris to oracle apps 11i 10.2.0.5-32 bit on Linux Please see
    Note 238276.1 - Migrating to Linux with Oracle Applications Release 11i
    Using Oracle Applications with a Split Configuration Database Tier on Oracle 10g Release 2 [ID 369693.1]
    10g Export/Import Process for Oracle Applications Release 11i [ID 331221.1]
    10g Release 2 Export/Import Process for Oracle Applications Release 11i [ID 362205.1]
    Notice to Oracle E-Business Suite Customers: Correction to Export/Import Notes [ID 1055539.1]
    EBS 11i Export/Import Fails On Admsc1020.sql Due To Missing Catmgdidcode.sql [ID 804665.1]
    Thanks
    Edited by: EBSDBA on Oct 25, 2011 5:30 PM

  • Interface Monitoring - any example from your experience please ?

    Hi Gurus,
    In Interface Monitoring (as a subset of BPM), as you may be aware, as of Software Component ST-SER Release being  700_2008_1, a new functionality is supported:
    http://help.sap.com/saphelp_sm40/helpdata/en/2c/40328724e2431ba71958275b15e9fb/content.htm
    Well, I am keen to learn from your experiences if you have already used this.
    My specific question is: Can you please share an example, from your experience, an example of Interface Scenario, Interfaces and Interface Steps  for SAP interacting with Non-SAP systems inside/outside the company?
    Best regards,
    Srini

    Closing this for housekeeping sake.

  • Cannot unzip the image file from Sun

    I have downloaded the first compressed install CD image file from Sun. But it cannot be unzip. I used almost all of the unzip software(such as Winzip, WinRAR, PKUNZIP for DOS and for Windows).
    Anybody can help me?

    OK! I downloaded for the 5th time without using GetRight and I can now unzip the file in question. For some reason GetRight chokes on this zip file only. All of the other images were downloaded using GetRight and they unzipped just fine. Go figure...
    My reccomendation to anyone else using a download tool like GetRight and having the same problem is to disabled the tool temporarily and just do a normal download through your browser.
    Hope someone finds this useful.
    Bob C.
    Make that another ditto!!! I have downloaded the
    first CD image for x86 Solaris 4 times now. Each time
    the download has succeeded without error, but I can
    not open the zip file. I have been using GetRight 4.3
    to do the download rather than straight FTP or HTTP so
    maybe this is the issue, but I have never had a
    problem using this tool before.
    Help anyone!?!?!?!
    Bob C

  • Migrating data from Sun ONE directory server into openLDAP

    Hi,
    I was to migrate the data from Sun ONE directory server into openldap. Has anybody done this or know about this. Can you please share the steps that needs to be done.
    NOTE: I have exported the data into LDIF file but when I run with ldapadd into the open ldap
    ldap_add: Invalid syntax (21)
    additional info: objectClass: value #1 invalid per syntax
    Are there specific schemas that i need. Where can I find them?
    Thanks

    Why would you want to migrate data into an OpenLDAP server ?Good Question, let me explain you my problem with Sun DS.
    No Question DS is the better product (even Red Hat realized this).
    Problem: DS is not a base Solaris 10 OS component, for patch support
    you need some additional plan, now sun marketing nightmare comes ;o)
    Every year service plans are changed (want a SJES or a DS or a DSEE ?)
    so use solaris with OpenLDAP, or linus with NSDS.
    Sun please give us a Solaris Core Component called LDAP Server (no need for trillions of entries).
    joe

  • Graphics linked from FM reference pages don't display

    Before I tell my department that they must edit each of the
    hundreds of caution and warning notes in thousands of pages:
    Is it true to say that graphics linked from reference page in
    FM do not appear in help files?
    This is a commonly use style:
    Paragraph Designer / Advanced tab / Frame Below Pgf

    Matthew Ellison- the baggage file idea was a help. Thanks!
    Here is the only way I could get the reference page graphic
    to display in a .chm help project.
    And note, this method does not use FrameMaker's graphic, this
    method re-introduces the same graphic into RoboHelp by including it
    in as a background image in a css file.
    - In Robohelp Project Manager, I must link to the graphic as
    baggage item
    - The FrameMaker para tag must be mapped in RoboHelp
    (Properties, Style Mappings) to a special css style that includes
    the graphic as a background image (see example below).
    - The graphic must appear in Project Manager list of images
    for the project file for the framemaker chapter.
    - And here's the deal killer, in order for the graphic to
    appear in the project file for the FM chapter,
    I must use the graphic somewhere in the FrameMaker as a
    discrete graphic. (It's not enough to just include the graphic in
    the folder using windows explorer.)
    So each chapter of FrameMaker must include a page displaying
    any icons being used in that chapter (can't refer to the reference
    page, must be linked to outside file)
    Weird.
    And there goes another day of my time...
    css style definition for paragraph tag with linked icon:
    P.note_elect_warn {
    background-image: url(electric.png);
    background-repeat: no-repeat;
    background-position: 16px 28px;
    height: 100px;
    width: 100px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 20px;
    font-weight: bold;
    color: #0033FF;
    text-align: center;
    PS I do all my stylesheet editing in Dreamweaver, and I don't
    have a problem, as long as I:
    - Remember to save the css file before I run RoboHelp.
    - Allow Dreamweaver file to accept outside edits to the css
    file, and reload the css file.
    PS 2
    In the CSS definition, the background-image must be in the
    same folder. In other words, this won't work:
    background-image: url(icons/electric.png);
    only this:
    background-image: url(electric.png);
    PS3
    A FrameMaker paragraph tag that consists only of autonumber
    text will not be picked up for mapping.
    You can force RoboHelp to notice the FrameMaker paragraph tag
    by typing in a few letters where the tag appears on your FrameMaker
    page (which you can later remove, and the style will remain).
    For example, if you have a paragraph tag with Autonumber text
    that places the word Thanks!, RoboHelp ignores it unless you add
    some content to the the paragraph tag on the page, like Thanks!
    ...for all the fish...
    Later, you can remove ...all the fish...

  • JMF 2.1.1e API Documentation is Removed from Sun

    Hi All,
    In the last few days i'm not able to browse the JMF 2.1.1e API Documentations pages, its automatically redirecting to JMF 2.0 API documentation where there are no document for some important api's like RTPManager.
    Have any one downloaded the API Documentation from sun.com previously, If so please send it to my mail id - [email protected]
    Or is there any other link to JMF 2.1.1e API documentation pls reply.
    Thanks in Advance,
    Karthikeyan R

    Check your mail..
    By the way. Did you report the broken links to Sun?
    I was so irritated at finding all the details of classes missing, that I did not think to report it.
    The missing JavaDocs may be a simple oversight.
    Edited by: AndrewThompson64 on May 18, 2008 1:03 AM
    OK.. found the motivation to report it. Here is the report I submitted.
    This thread complains of missing JavaDocs for the JMF classes
    [http://forum.java.sun.com/thread.jspa?messageID=10256685]
    Somebody replied that they are here..
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/apidocs/]
    But this is only the 'top level' documents, and every link from those pages that I have tried so far, is a '404'.
    For example, 1st links in the left hand frames..
    Top frame. The link to the javax.media package
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/apidocs/javax/media/package-frame.html]
    Bottom frame. The link to the ActiveReceiveStreamEvent class
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/apidocs/javax/media/rtp/event/ActiveReceiveStreamEvent.html]
    Also tried Processor, RTPManager and a few others. All '404'.
    What gives? Is this an oversight, or another step in Sun's gradual abandonment of JMF?
    (And if it is the latter, isn't it better to put the poor programmers out of their misery by making a public announcement re the status and future of JFM, and removing the top level of those JavaDocs?)
    Edited by: AndrewThompson64 on May 18, 2008 1:22 AM

  • Problems doing the "Web Service" example from the 2-Day-Developer Guide

    Hello,
    I want to do the "web service" example from the 2-Day-Developer Guide.
    I give the application my proxy server address in the format address:port and go through the assistant creating the web service. After selecting the IBM UDDI-service and searching for %xMethods% as business name I get the following error:
    ORA-31011: XML-Parsing not successful ORA-19202: Error parsing XML LPX-00104: Warning: Element "html" is not declared in DTD Error at line 2
    What have I done wrong?
    With kind regards
    Florian Reiser

    Please.. Could you change your forum handle to something more human, we are a friendly group here and lik to know who we are talking to.. Secondly, WHy are you using such an OLD version oft he product. You would be better off installing 3.2.1 (latest released build) and asking your questions after you do that..
    (I am sorry, it's like asking for help in a Windows support forum about issues you are having with Windows 3.1)
    Thank you,
    Tony Miller
    Webster, TX

  • Error running code examples from Training Video

    I am currently learning Java and I am using a Java Training series from Sun. There are several code examples that I am having problems running. I am 99.9% sure that my code is correct. That is the code that I have followed along and written.
    Here is an example of code that I am trying to run. ( I am on OS X 10.5 BTW )
    public class Person
         public int ageYears = 32;
         public void calculateAge()
              int ageDays = ageYears * 365;
              long ageSeconds = ageYears * 365 * 24L * 60 *60;
              long ageMinutes = ageSeconds / 60;
              long ageMilliseconds = ageSeconds * 1000;
              System.out.println("You are " + ageDays +  " days old.");
              System.out.println("You are " + ageSeconds + " seconds old.");
              System.out.println("You are " + ageMinutes + " minutes old.");
              System.out.println("You are " + ageMilliseconds + " milliseconds old.");
    }After I create the file (which is named Person.java) I open the terminal and cd to the directory the file is in. In my terminal I first say
    javac Person.java
    I don't get any errors at all. Then I try to run the program like this.
    java Person
    When I try this I get the following error
    Exception in thread "main" java.lang.NoSuchMethodError: main
    I am not sure why I get this error. On the instruction video the instructors code seams to run just fine with out have a main function. The instructor is on Windows and I am not sure if that has anything to do with it or not?
    Any thoughts or suggestions would be really helpful.

    mswallace wrote:
    I am currently learning Java and I am using a Java Training series from Sun. There are several code examples that I am having problems running. I am 99.9% sure that my code is correct. That is the code that I have followed along and written. Trust what the compiler and the JVM say to you.
    I am not sure why I get this error. On the instruction video the instructors code seams to run just fine with out have a main function. The instructor is on Windows and I am not sure if that has anything to do with it or not?
    Any thoughts or suggestions would be really helpful.So, as the error is asking you, where is the main method that every runnable program must have? This has nothing to do with windows and everything to do with all programs needing a main method to run (even applets where the main method is I believe within the Applet class code).

  • Could not run the bookstore1 example from the Java Web Services Tutorial

    The bookstore1 servlets example from the Java Web Services Tutorial (issue Aug 1, 2002) was built and deployed successfully by using the deploytool (following the steps described on pages 498ff of the tutorial).
    After deploying the application the Tomcat Web Application Manager shows the entry:
    /bookstore1:stopped:0:D:\Programme\Java\tomcat\jakarta-tomcat-4.1.8\work\Standalone\localhost\manager\bookstore1.war
    when entering the command: http://localhost:8080/manager/list.
    After entering the command: http://localhost:8080/manager/start?path=/bookstore1, the (uncomplete) message appears:
    FAIL - Application at context path /bookstore1 could not
    It should be noted that I was able to build and deploy the application GSApp (chapter 3 of the tutorial) successfully.

    Did you set up the database as described in
    http://java.sun.com/webservices/docs/1.0/tutorial/doc/WebApp13.html#69868

  • Can not use XML API from Sun (JAXP)

    Some of my EJBs and Servlets uses XML API from Sun (JAXP) but after deployment the J2EE Container uses its own XML engine (Oracle XML Parser....) instead.
    I try to add JAXP library to my deployment file and test again but this problem still occurred.
    My question is how to add my libraries to J2EE Container and these libraries can be shared by any applications.
    Regards,
    Narong

    Please post this in the misc or xml newsgroup.
    vipuld shah wrote:
    i have an application which is running through javaWebStart
    if u start the application first time(through clicking on
    link of .jnlp file), it will download necessary .jar files
    & it will store those files in javaWebStart's cache.
    when u will visit second time, it will check files in cache
    with the files in server, if both are same, then it will not
    download but will use from its cache.
    it works fine for .jar files, but is it possible for some .xml
    files which are changing very rarely.--
    Rajesh Mirchandani
    Developer Relations Engineer
    BEA Support

Maybe you are looking for

  • BT NetProtect Plus Problems

    Just wondering if anyone has had problems with bt netprotect plus and found any solutions. I was a customer of McAfee for some years, I upgraded to BT Broadband Option 2 with bt netprotect plus provided by McAfee included, my original McAfee software

  • Condition to check in decode statement

    Hi All, I have a requirement to check below condtion in decode , please help me on this I need to check name field from a table if it is not equals to null and not equals to ABC% then i need to print some static value as 'XYZ' Thnaks

  • Not a valid date - error in Web dynpro hosting the form

    Dear Experts, I have an interactive form embedded in an ABAP WebDynpro screen. It has a date field which is filled by the user. This field has been working perfectly fine except for one user. Whenever he tries to enter a date and validate (round trip

  • Sony Ericsson K800i and MacBook... How can I can connect to the web?

    Hi guys, I've recently bought a new K800i Sony Ericsson. I set up bluetooth with my MacBook and everything's ok, but... I cannot connect to the web with my MacBook via K800i as a modem. Do you have any suggestions how to deal with the problem? I don'

  • 16-bit color depth SVG output?

    Bon día to you all, I have a very dumb question... How do I output 16-bit SVG files from Illustrator? I've been working with Illustrator for what has seemed an eternity but have never ventured into the realm of SVG. Now I have found myself with the n