How to create a label with an image background in GWT

In order to create a label with an image background, you will need to use an AbsolutePanel with an image background defined in CSS and add a Label to it. The reason behind using an AbsolutePanel is because this type of panel allows for positioning all children absolutely, allowing them to overlap. Keep in mind however that you will have to resize the panel to allow room for all its children because it will NOT resize automatically.

Here is a sample implementation of how this worked for me:

Java code in Samle.java:

AbsolutePanel absolutePanel = new AbsolutePanel();
absolutePanel.setStyleName("my_css_def");

Label myLabel = new Label("Hello world!");

absolutePanel.add(myLabel);

mainContainer.add(absolutePanel);

CSS definition in Sample.css file: 

.my_css_def {
background-imageurl("../images/myPath/bg_image.png"); !important;
height: 73px;
width: 108px;
}

Great Analytics Tool

If you are looking for a great analytics tool for your website, check out Woopra. It is now out of beta. I have seen it used a little and it looks pretty impressive. The basic plan is free, but if you are needing a little bit more information, here are the plans offered (http://www.woopra.com/plans/)

Transparency Setting for ALL Browsers

Below is CSS definition that creates transparency for all browsers:


.opacity_70 {
filter:alpha(opacity=70);     /**for IE8*/
-moz-opacity:0.7;             /**for Mozilla*/
-khtml-opacity: 0.7;          /**for Safari 1.x*/
opacity: 0.7;                 /**for FireFox*/
}

Solar Powered Skins for iPhone and iPod

Solar power iPhone skins are getting more popular for everyone. Apple devices with solar powered chargers are already available in the market, but solar powered skins are not. These skins are capable of charging an iPhone or iPod using solar energy. According to Heimbuch from TreeHugger, one of the solar power skins is capable for providing 30 minutes talk time on a 2G network with 2 hours of solar energy charging. Also these skins are shipped with a solar planner application which helps estimating the needed solar charge time during the day in order to have a working phone in the evevning.

Solar powered chargers can provide few minutes of talk time, however with high consumer demand, these devices may gain wider popularity leading to more competition and better quality overall.

Color Palette Generator

Here is a very nice color palette generator that creates both a dull and vibrant color palette based off of a photo url.

http://www.degraeve.com/color-palette/