28 | 08 | 2008
Main Menu
Affiliates
Who's Online
We have 11 guests online
Alexa
Balloon Tips in Java
Written by administrator   
Monday, 26 May 2008 11:54

Rating 3.5/5 (2 votes)

Balloon tips can be used to display informational messages like name validation, password validation etc. A balloon tip consists of message, a ā€œIā€ icon to indicate that it is an information message, and a close button.

The below picture shows a balloon tip in windows system tray

 

To display similar balloon tips in java you can use the balloon tip library which can be downloaded from https://balloontip.dev.java.net/

The balloon tooltip library provides the following features
1) Shape of balloon, Edged or Rounded
2) Configurable balloon border color and width
3) Configure balloon fill color
4) Various alignment options: Top left, top right, bottom left and bottom right.
5) Configurable Tip location: AUTOMATIC, CENTER, NORTH, NORTHEAST, EAST, SOUTHEAST, SOUTH, SOUTHWEST, WEST, NORTHWEST
6) Show/Hide Close button.
The below applet displays a sample Balloon tip application.

 

 

To create a balloon tooltip two factory methods are provided in the BalloonTip class.

* BalloonTip.createEdgedBalloonTip(Component attachedComponent, Alignment alignment, Color borderColor, Color fillColor, int borderWidth, int horizontalOffset, int verticalOffset, boolean useCloseButton)

* BalloonTip.createRoundedBalloonTip(Component attachedComponent, Alignment alignment, Color borderColor, Color fillColor, int borderWidth, int horizontalOffset, int verticalOffset, int arcWidth, int arcHeight, boolean useCloseButton)

 

The created balloon tip can be displayed using the setVisible() Method.

 

The below image graphically explains the borderWidth, horizontalOffset and verticalOffset parameters. Other parameter names are self explanatory.

 

 

 

 



Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! JoomlaVote! Google! Live! Facebook! StumbleUpon! Yahoo! Free social bookmarking plugins and extensions for Joomla! websites!
Comments
Add New Search
dim   |84.88.50.xxx |2008-05-27 12:44:57
Nice, the only problem if you wish it outside the applet (I mean rounded).
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
Please input the anti-spam code that you can read in the image.

3.22 Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated ( Monday, 26 May 2008 12:19 )
 
Bottom Ad
Your Ad Here

Subscribe in a reader

Most Popular Articles
Ads
Popular Tags