GraphicsEnv.getInstance().getTextureLoader().loadTexture( HEADER_TEXTURE, false );
} catch ( Exception e ) {
final TextureNotFoundException textureException = new TextureNotFoundException( e );
new ErrorDialog( this.gameView, LanguageDictionary.ERROR_STRING, LanguageDictionary.ERROR_LOAD_HEADER, textureException, true );
throw textureException;
}
this.header = new Label() {
@Override
public void paint( Graphics g ) {
super.paint( g );
if ( this.getHeight() != 0 && this.getWidth() != 0 ) {
try {
Image img = GraphicsEnv.getInstance().getTextureLoader().loadTexture( HEADER_TEXTURE, false );
g.drawImage( img.getScaledInstance( - 1, this.getHeight(), Image.SCALE_SMOOTH ),
0,
0,
this.getWidth(),
this.getHeight(),
null );
} catch ( Exception e ) {
final TextureNotFoundException textureException = new TextureNotFoundException( e );
new ErrorDialog( MainPC.this.gameView, LanguageDictionary.ERROR_STRING,
LanguageDictionary.ERROR_LOAD_HEADER, textureException, true );
}
}
}
};