Code sample: Displaying the path to the video folder using System.getProperty()

import net.rim.device.api.ui.component.LabelField.*;
import net.rim.device.api.ui.container.MainScreen.*;
import net.rim.device.api.ui.UiApplication.*;

public class GetVidDir extends UiApplication
{
    public static void main(String args[])
    {
        GetVidDir app = new GetVidDir();
        app.enterEventDispatcher();
    }
    
    public GetVidDir()
    {
        HomeScreen hs = new HomeScreen();
        pushScreen(hs);
    }
}

class HomeScreen extends MainScreen
{
    public HomeScreen()
    {
        LabelField msg = new LabelField(System.getProperty("fileconn.dir.videos"));
        add(msg);
    }
}

Was this information helpful? Send us your comments.