Swing

Java Swing, GUI

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 »

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