Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 3
Registered: ‎08-09-2012
My Device: curve 3 9300

Custom GUI

HI THERE ! PLEASE CAN SOME ONE TELL ME ABOUT A TOOL I COULD USE TO DEVELOPE CUSTOME USER INTERFACE ! I AM JUST TIRED OF USING THE NATIVE LOOK AND FEEL, NEED TO MAKE MY APP LOOK MORE NICE AND BEAUTIFUL. THANKS GUYZ.

Developer
Posts: 246
Registered: ‎12-13-2010
My Device: Not Specified

Re: Custom GUI

There is no tool. 

Contributor
Posts: 16
Registered: ‎06-27-2012
My Device: Bold 9900

Re: Custom GUI

You're gonna have to override the paint() method in whatever it is you would like to provide a custom delegate for. For example, if you would like to have a blue background in your app, simply implement Screen (or extend any implementing class such as FullScreen), override paint(), and use Graphics to draw what you like. It also exists for buttons, but beware, you'll have to do some math to configure the "hotspot" of the button (Look for Blackberry Advanced UI Samples, there is one for Pill Buttons I'm pretty sure)

 

Here is an example, setting the background of a FullScreen to Blue:

public class MyScreen extends FullScreen {
	public MyScreen() {
		this.add(new LabelField("Hello World"));
	}

	public void paint(Graphics graphics)
	{
		super.paint(g); // always call super first, otherwise other components might not show up
	
		graphics.setBackgroundColor(Color.BLUE); // Background color is now blue
		graphics.clear();	// paints the background to blue
	}
}

NB: I didn't test this code, but this should be fairly close.

Developer
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10

Re: Custom GUI

visit this site

https://github.com/blackberry/Samples-for-Java/tree/master/Advanced%20U

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.