Easy to Learn Java: Programming Articles, Examples and Tips

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


Code Examples

Java Tools

More Java Tools!

Java Forum

All Java Tips


Submit News
Search the site here...
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: 178

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

Bookmark and Share

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

Issue No: 178 7 August 2003
14019 subscribers

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

In this issue:
  • 1. My application runs much slower with 1.3/1.4 when compared with the 1.2 Production release for Solaris. Why?
  • 2. What's the difference between the -client and -server systems (options in JVM)?
  • 3. Latest posts on our message board
  • 4. Link to Java FAQ

  • Hello dear friends!

    Tip 1

    Question: My application runs much slower with 1.3/1.4 when compared with the 1.2 Production release for Solaris. Why?

    Answer: Assuming that you are running a lot of bytecode make sure that you are using the correct mode of the virtual machine. For applications where small footprint and fast startup are important, use -client. For applications where overall performance is the most important, use -server. Don't forget that -server or -client must be the first argument to java, -client is the default. If this isn't your problem, read on for more tuning parameters you can try...

    from the Java Hotspot Virtual Machine FAQ:

    If you have a serious, perhaps urgent problem to resolve
    whether it be concerning money, bad luck, love or any other large or small grievance,
    to help you, I am offering you a FREE Clairvoyance Horoscope
    and I will reveal your lucky numbers, all FREE of charge. Click Here.

    Tip 2

    Question: What's the difference between the -client and -server systems (options in JVM)?

    Answer: These two systems are different binaries. They are essentially two different compilers (JITs) interfacing to the same runtime system. The client system is optimal for applications which need fast startup times or small footprints, the server system is optimal for applications where the performance is most important. In general the client system is better on GUIs. Some of the other differences include the compilation policy used, heap defaults, and inlining policy.

    from the Java Hotspot Virtual Machine FAQ:

    Prepare for a new career at home! Professional Career Development Institute
    offers self-paced distance learning courses and associate№s degree programs
    in today№s most popular careers. Or, earn your high school diploma. All
    programs are nationally accredited. Enjoy affordable tuition, open-book
    exams. Complete our exciting courses in your spare time now. Send for free

    Latest posts on our message board
    JList in a JTable cell

    Is it possible to render JList into a JTable cell? If it is please provide a code sample.
    please help here ...

    Object serialization

    Hi all,

    have a question for you.
    I have a socket sock, I use ObjectStream to read/write objects on the socket. If I write 2 or more times an object on the stream (the exactly same object) on the other side I don't see its state (values of attributes) changes.

    For example if I write a Dimension object 2 times and after the first writeObject I change its state with setSize, the second time I do readObject it return the SAME STATE as the first time, as I if never changed the size of Dimension.

    continues here ...

    How to realize my project

    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.
    State and chart max number: 99
    We will use Lotus Domino R6 as HTTP server.
    In fact the applet I should create will only be use to draw, all the information are from and store under Lotus Notes

    The software should contain a zoom option, an export option(GIF,.. ) and a print option (PDF, printer)

    I found jgraph,

    continues here ...

    Open-Source Wireless App Development

    Please vote to help select the topic for open-source wireless development,after the voting is over interested candidates will be able to join the project.

    Direct Link : http://www.thesoftwareobjects.com/Projects
    Main Url:

    problem with JPopup


    i have following problem.
    In a JTree i show a JPopup if i clicked with right mousebutton.
    If something is select and action the Popup i will allow to move it. This means i draw a ghost image of the selection on the position of the popup.
    I draw this image if the method actionperformed of the Popup calls.
    And when the mouse moves i draw it at the mouseposition.
    Now the problem. After the popup action the image is not draw correctly. At the position of popup it draw wight and the rest show correct.
    I have try to draw in following methods:

    -popupMenuWillBecomeInvisible and
    -propertyChange(PropertyChangeEvent e) {
    if((Boolean)e.getNewValue() == Boolean.FALSE)
    continues here ...

    Rounding Oval in a rect.

    Hey everybody. Please help me create a java applet of which the ball is rounding in a rectengular/square...

    And otherone. There is bar getting longer as you press a key.

    Please please please I need you...

    Limiting JTextArea

    Basically all I want to do is limit a JTextArea to, say, four lines max. I mean 4 physical lines, not 4 sentences. Now I know about PlainDocument and I know how to determine how many carriage returns there are in the JTextArea. But sometimes there will be carriage returns and sometimes there will just be linewraps at a word space. Both create "new lines" in my situation.

    So I'm struggling determining how many lines are in the JTextArea when carriage returns aren't used and how to limit the max number of lines. I have got as far as stopping entry when the fourth line is at its maximum width but this also stops entry on previous lines if the user moves the cursor back up a line.

    At this point I'm going around in circles and need a fresh approach. Any code examples or thoughts would be sincerely appreciated.
    please help 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