permaculture playing cards*
The moose likes GWT and the fly likes rounded corner Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "rounded corner" Watch "rounded corner" New topic
Author

rounded corner

Nilesh Pat
Ranch Hand

Joined: Mar 01, 2010
Posts: 46
hi,

can any one please help me for rounder corners. i stuck on this from many days..

i want to apply round corners to textbox, window panel.
for button i have used image. but it's a single image which didn't grow. so my button stays with same width.
same happens with textbox.

for window panel from using CSS is it possible to make corners rounded??

please help....................


Regards,
Nil
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10170
    
    8

You can choose to simply wrap your widget in a DecoratedPanel.
Else you can check out the css which GWT provides to see how it is done


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

As maneesh said, you can use a decorated panel for it.
Now for the implementation,

you can either use a gif rounded corner (wont be smooth)
or a png rounded corder (smooth)

I prefer to use the GWT's ImageBundle class to do so, it combines all corners into a single image so that its loaded only once by the browser.
the menu in Inf Explorer in my site was done in the same manner.


My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
Nilesh Pat
Ranch Hand

Joined: Mar 01, 2010
Posts: 46
Thank you for your replay. maneesh and salvin.
DecoratorPanel is good.
but as salvin said how can i use GWT's ImageBundle class to combines all corners into a single image? and how to apply that image on your widget? can anyone give hint or sample code?
i am new to GWT.
i want to apply round corners to buttons, textboxes, popup panels etc.
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

Simple. the 4 corners are in your image bundle so you can convert them into an image widget ...
The DecoratorPanel allows you to set the widgets for the corners so you can use those images @ corners...
next you have to figure out what is to be done for the sides...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: rounded corner
 
Similar Threads
How to upload a file on the click of a button.
View Files
Setting the focus on an image on selecting a radio button
How to use focus() command
Show default text in PasswordTextBox.