Is this legit to keep a default value and avoid exception?
<pre><code>    private int getScreenWidth(){
        int width;
        try{
            Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
            width = screenSize.width &gt;= 1024 ? screenSize.width : 1024;
        }catch(HeadlessException e){
            logger.write("couldnt get screen width" + e);
            width = 1024;
        }
        return width;
    }
</code></pre>
