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: 179

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


Bookmark and Share

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

Issue No: 179 12 August 2003
14070 subscribers

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

In this issue:
  • 1. The class Robot was introduced in Java version 1.3 and belongs to awt (java.awt.Robot). Why?
  • 2. What is jvmstat?
  • 3. What type of garbage collection does a System.gc() do?
  • 4. Latest posts on our message board
  • 5. Link to Java FAQ

  • Hello dear friends!

    Tip 1

    Question: The class Robot was introduced in Java version 1.3 and belongs to awt (java.awt.Robot). Why? I got an impression that all new GUI features come to Swing and Robot class is GUI related class...

    Answer: The reason is simple: The Swing toolkit is a fully-featured UI component library implemented entirely in the Java programming language. The Robot class is used to generate native system input events for the purposes of test automation, self-running demos, and other applications where control of the mouse and keyboard is needed. The primary purpose of Robot is to facilitate automated testing of Java platform implementations.

    Using the class to generate input events differs from posting events to the AWT event queue or AWT components in that the events are generated in the platform's native input queue. For example, Robot.mouseMove will actually move the mouse cursor instead of just generating mouse move events.

    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 jvmstat?

    Answer: The jvmstat technology adds light weight performance and configuration instrumentation to the HotSpot JVM and provides a set of monitoring APIs and tools for monitoring the performance of the HotSpot JVM in production environments. The instrumentation is designed such that it is 'always on', yet has negligible performance impact. The monitoring interfaces added to the HotSpot JVM are proprietary and may or may not be supported in future versions of the HotSpot JVM.

    Tools include a general purpose command line tool called jvmstat, a java process list tool called jvmps, and a generational heap visualization tool called visualgc. Remote monitoring is supported via an RMI server application.

    The instrumented HotSpot JVM shipped with J2SE 1.4.1 as a technology preview. The instrumentation is disabled by default, but can be easily enabled through a command line argument. The tools included with this distribution can only monitor Java applications running on the HotSpot 1.4.1 JVM as distributed with Sun's J2SE 1.4.1 product.

    The jvmstat feature includes a number of tools:

    jvmstat - A tool to sample and log instrumentation

    jvmps - A tool providing a simple Java process listing

    visualgc - A tool to graphically display instrumentation

    perfagent - A server providing remote access to instrumentation

    tip is based on
    http://developers.sun.com/dev/coolstuff/jvmstat/

    Have you ever thought your idea could make a great product? Well, it can. Join the many who have cashed in on their ideas by getting your FREE Inventors Kit from Inventors Helpline. CLICK HERE to bring your ideas to life.
    http://mocda3.com/1/c/52983/73879/291831/291831


    Tip 3

    Question: What type of garbage collection does a System.gc() do?

    Answer: An explicit request to do a garbage collection does a full collection (both young generation and tenured generation). A full collection is always done with the application paused for the duration of the collection.


    Latest posts on our message board
    Compositing(image and movie) in Java

    I would like to do some compositing in Java. Currently I'm using QuickTime for Java to do it. It is very easy. However I always get some runtime exception when I execute the program. So I want to switch to pure Java. I want to play a movie as the background, probably using JMF. Then do some animation with some images and text in front of the movie. Is this possible? Any advice or sample program?

    Thanks in advance.
    please help here

    JTabbedPane and focus issue

    Maybe I'm just doing things a bit different than anyone else and I'm wrong. Here's the deal: I have a focus traversal policy for each frame in my app. When I used a personally-created subclass of JTabbedPane it was trying to set focus on a component on a non-visible tab. So I fixed that problem by not allowing focus to go to non-visible tab panels.

    Now I want, on a tab change, to set focus on the first focusable component of the new tab. But at the time I get a change event to hook this call the old tab is still visible and the second one isn't.

    So my first fix...
    thread continues here

    How to realize my project

    Hi,
    I’m new on java and i should do a project to create an application to design Workflow on thin client (IE6) or a software and use Java Web Start. The design is base on the state-chart diagram. All the information concerning items (position, size) will be store under lotus Notes Documents.
    Each item (state, chart relations) will have different values selected from list. Each list will be fill in with informations descended from data contains under Lotus Notes documents.
    thread continues here


     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