Easy to Learn Java: Programming Articles, Examples and Tips

Start with Java in a few days with Java Lessons or Lectures

Home

Code Examples

Java Tools

More Java Tools!

Java Forum

All Java Tips

Books

Submit News
Search the site here...
Search...
 
Search the JavaFAQ.nu
1000 Java Tips ebook

1000 Java Tips - Click here for the high resolution copy!1000 Java Tips - Click here for the high resolution copy!

Java Screensaver, take it here

Free "1000 Java Tips" eBook is here! It is huge collection of big and small Java programming articles and tips. Please take your copy here.

Take your copy of free "Java Technology Screensaver"!.

Java Newsletters Archive: 155

JavaFAQ Home » Java Newsletters Go to all tips in Java Newsletters


Bookmark and Share

=== [ The Java FAQ Daily Tips, weekly publication ] ===

Issue No: 155 25 March 2003
12150 subscriber
   
 

"...if you have no mentors around in the initial stages."
"This book has saved me hours of research...""


Foreword: Excuse me for possible mistakes. English is not native language for me.

In this issue:
  • 1. Today many mice have more than three buttons...
  • 2. What is a rasterizer? Why doesn't Java 2D use a native rasterizer for rendering fonts?
  • 3. How does the PersonalJava application environment differ from the EmbeddedJava application environment?
  • 4. Latest posts on our message board
  • 5. Link to Java FAQ

  • Hello dear friends! Important info, please read.

    Today I inform you about changes that will be introduced in May. During past two years I tried different ways to cover the cost of my site and newsletter running. Last year my site traffic more than tripled. Since August I moved to Virtual Server hosting which costs much more for me and my family. I publish newsletter as a private person and have no sponsors. Total price for hosting and software that I use exceeds now $1000/year. This everything I need to publish my newsletter.

    Unfortunately advertisements cover only 10%.

    Before beginning of May you will have two options:

    1. Free newsletter with three tips per week plus numerous and I agree, annoying some time advertisements. Tips here will be published with 2 months delay comparing to featured newsletter.
    2. Featured newsletter with 5 tips per week with no advertisements and if more than 100 people will ask about it - text version as well. All subscribers of this kind of newsletter will have access to member's area on the site where they can browse archive (all latest) of newsletters. I will also put useful Java related software to member's area. All tips from this area will come to public with two months delay.
      Plus to this all members will get as an introduction gift my e-Book "500 Java Tips!" with latest update "200+ Java Tips". Altogether 700 tips.

    The price for membership will be reasonably low - around $9 - 10/year. I will publish rules online (when they are ready) next week. Today I have only draft version...

    kind regards,
    John


    Tip 1

    Question: Today many mice have more than three buttons. And people program the fourth - thumb button differently. I want to catch an event that usually done by right click - popup menu. My friend uses for that a middle button on three buttons mouse. If somebody uses fourth (even fifth!) button for that how my program can know it?

    Answer: If your program supposed to support all kind of mice use boolean isPopupTrigger() method of MouseEvent class. This method returns whether or not this mouse event is the popup menu trigger event for the platform.

    Note: Popup menus are triggered differently on different systems. Therefore, isPopupTrigger should be checked in both mousePressed and mouseReleased for proper cross-platform functionality.

    Java wimps please close your ears ... For the Java programmer who
    thought he knew everything there was to know about Java, have a
    look at the most advanced Java newsletter archived on the website
    http://www.smotricz.com/kabutz Guess what, it won't even cost you
    anything! Subscribe today - you won't be disappointed.


    Tip 2

    Question: What is a rasterizer? Why doesn't Java 2D use a native rasterizer for rendering fonts?

    Answer: A rasterizer takes ideal shapes and produces coverage values for each pixel. The coverage values represent how much of each pixel is covered by the shape. These coverage values are called alpha values. Each pixel has its own alpha value which indicates the transparency of the pixel.

    The Java 2D API uses the T2K font rasterizer from Type Solutions. The Font Fusion font engine is independent of processor and OS and compatible with all industry standard font formats. It is a full featured lean, mean and fast next generation small-footprint multilingual scaleable outline font technology. Font Fusion was designed for both gray-scale and black and white, ROM and non-ROM, based devices where the fonts may reside locally or remotely.

    By allowing T2K to rasterize fonts, the Java 2D API isn't dependent on native rasterizers for the scalable outline fonts that it supports, which results in more consistent metrics display across different platforms and between on-screen and off-screen rendering.
    --
    this tip is based on SUN's FAQ's


    Tip 3

    Question: I know that the PersonalJava application environment is a Java platform for building network-connectable applications for consumer devices for home, office and mobile use.
    How does the PersonalJava application environment differ from the EmbeddedJava application environment?

    Answer: The PersonalJava application environment is designed for Web-connected consumer devices that are often executing applets from a network. To enable this "general purpose" functionality, a core required set of APIs or libraries must be present on every PersonalJava-enabled device. The EmbeddedJava application environment is targeted at dedicated-function embedded devices which may be network-connected or standalone. These dedicated-function devices will be performing a defined set of software tasks which are well-known at product conception. Only the class libraries that are needed to support this set of software tasks are included on the device. Because of this, every EmbeddedJava implementation may be different since there is no concept of a core required set of API's. The advantage of this is that the EmbeddedJava implementation often occupies a smaller memory footprint than the PersonalJava application environment


    Latest posts on our message board

    Problems with JTables

    Hi Everybody,
    I' m trying to put a []String Array inside a JTable with 4 columns but i can't find the way. I searched TableModels and etc but i didn' t find anything usefull, only simple examples.
    Guys please give some help here, i need it!!!
    TSolonel
    more read here...


    JSP error

    Hi,
    I am using J2EE 1.3.1, I have created a simple jsp and deployed using
    deplytool.
    but when i access jsp page from browser , I am getting following error
    J2EE SDK/1.3.1 - HTTP Status 500 - Internal Server Error
    what exactly is the problem?
    Thanks
    Jyoti Bhat.
    read more here...


    how to write into a file?!

    could anyone show me how to write into a file via a socket using client-server program ! ? ?
    thank you..
    read more here...


    banking system-please help!

    Hi everyone,
    I've got an assignment to hand in a week time, i was just wondering if anyone is willing to help me out with it.
    the problem iam facing at the moment is to take the input from a text field and insert it into a file.
    the whole program is about a banking system which the user is able to Credit, Debit and check the balance of his or her account. the following is the specification of the program.
    read more here...


    upgrade applet

    hi,
    i am trying to update this program in order to write an applet to play the "Cat and mouse" game. In this game, the user is a "mouse" who has to find their way safely to a mousehole drawn in the middle of the top of the applet pane. Several cats appear at random positions in the pane and will try to catch the mouse by chasing after it. You lose the game if the cat gets too close to your mouse. You win if you get to the hole before they get near you.
    here is mainpart of the program


    360 degrees panoramic

    hi!
    where can i find free source code about a Java 360 panoramic image viewer applet?
    sorry, for my poor english
    thanks!
    read more here...


    Problems Veiwing JTables

    Greetings to all
    I am new and I hope that I will be lots of help to you
    Email me anytime
    I have a small JTable problem and I hope you some one here can kindly help me with it.
    I have created a JTable using a TableModel. The table has about 1000 rows and 30 columns. Now initially all columns are visible in the tables viewport area and the data is all squished. So I set the table's prefferedsize to be larger than the jscrollPane's visible area. So the data is nicely spaced out but when I scroll to view the rest of the data it is not visible
    How can I display the rest of the table when I scroll to those regions.
    read more here...


    transformations

    Hi Folks!
    I have a little problem where on a panel, i am trying to flip an image.. but it seems to flip all images on the screen. I can't seem to get it working.. anybody able to spot the problem?
    It loops thru all images, and only if 'rotated' it should rotate image, draw them all to buffered image and draw it to screen

    Please ask your questions and help each other at our Java Forum:
    http://javafaq.nu/forum/


    The Java FAQ Daily Tips is a newsletter that is only sent to those who have specifically subscribed to it (double opt-in).

    To subscribe/unsubscribe to "The Java FAQ Daily Tips" weekly edition newsletter visit our page here:
    http://www.javafaq.nu/plm2html/my_subscription.shtml

    If you have troubles please contact us: subscription@javafaq.nu


    Link to Java FAQ

    If you have added a link to http://javafaq.nu on your WEB-site, please let us know and you will get listed on our
    "pages linking to us" pages! If your page is a programming is programming relates you will of course get listed in the WEB-directory as well. Also, if you link to us, you have a chance to be listed in this newsletter as well.

    More information and graphics artworks can be found here
    http://javafaq.nu/other/linktous.shtml


    Advertising

    For information on advertising on the Java FAQ's Daily Tips Newsletter, send an email to: adv@javafaq.nu
    You will get the answer immediately from auto responder!


    Send your comments, questions, praise and complaints to us: comments@javafaq.nu

    Copyright (c) 2000 - 2003 John Andersson, All rights reserved.


     Printer Friendly Page  Printer Friendly Page
     Send to a Friend  Send to a Friend

    .. Bookmark and Share

    Search here again if you need more info!
    Custom Search



    Home Code Examples Java Forum All Java Tips Books Submit News, Code... Search... Offshore Software Tech Doodling

    RSS feed Java FAQ RSS feed Java FAQ News     

        RSS feed Java Forums RSS feed Java Forums

    All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest 1999-2006 by Java FAQs Daily Tips.

    Interactive software released under GNU GPL, Code Credits, Privacy Policy