Java Desktop

Java Desktop Applications

A bit about garbage collection

August 18, 2007
By admin

This assertion has yet to be proven to my satisfaction. However, I’ve begun to see that many of my doubts about speed come from early implementations that were not particularly efficient so there was no model at which to point to explain how Java could be fast. Part of the way I’ve thought about...
Read more »

Posted in Core Java, J2EE, Java Desktop | No Comments »

Centering a Dialog using Java

August 17, 2007
By admin

Where does a dialog go when you show() it? Unfortunately, the default location of a displayed dialog is relative to the position it was placed in the Visual Composition Editor. What does that mean ? In a nutshell, if the dialog is 300 pixels to the right and 200 pixels down from the upper-left...
Read more »

Posted in Core Java, Java Desktop, Swing | No Comments »

How to send email using java ?

August 16, 2007
By admin

import javax.mail.*; import javax.mail.internet.*; import java.util.*;public void postMail( String recipients, String subject, String message , String from) throws MessagingException {     boolean debug = false;      //Set the host smtp address      Properties props = new Properties();      props.put(“mail.smtp.host”, “smtp.testserver.net“);     // create some properties and get the default Session     Session session...
Read more »

Posted in Core Java, Java Desktop | No Comments »

Launching an Application with a Space in its Name

August 14, 2007
By admin
Launching an Application with a Space in its Name

Using Runtime.getRuntime().exec() to launch an application is pretty straight forward, except when you’re trying to start an application whose name contains one or more spaces. Under Windows, you need to quote the application name: Runtime.getRuntime().exec("\"My Appliaction.exe\""); or use a String array: Runtime.getRuntime().exec(new String{"My Application.exe"}); Under Mac OS X, you need to call open: Runtime.getRuntime().exec(new...
Read more »

Posted in Core Java, Java Desktop, Swing | No Comments »

Calendar

    September 2010
    M T W T F S S
    « Jul    
     12345
    6789101112
    13141516171819
    20212223242526
    27282930