29 Nov 2012

Test Post

Test post.youtube

JProgressBar
sdsdfafafafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Button
agagagagaga






afafafafwfaf 
Posted on 6:00 am | Categories:

26 Nov 2012

Hello World!

Hello everyone!


Hello there!How are you? I'm fine thanks! Thanks I owe you one. I like cupcakes! Yeah, I do! I like drawing and painting and programming and exercising! Yeah, I do!!!




Posted on 12:09 pm | Categories:

25 Nov 2012

Spice Up Your GUI: Using Progress Bars in Java

Welcome

Hello and welcome to my blog! Here, we're gonna talk mainly about (guess what) Java programming and whatever other topic comes up. We're gonna start with the "Spice Up Your GUI" series, which is a series about enhancing your applications' user interface, a topic of great importance in my opinion, as personal computers and cellphones are becoming more and more powerful, allowing for prettier (and prettier) user interfaces. We're gonna start off with the basics, like progress bars, tooltips, different look&feels, custom painting etc., and then we're gonna move on to more advanced stuff. In between, we will explore other topics of Java as well, and maybe topics not related to programming at all - I am assuming that you know the basics of Java, as well as the very basics of Swing, and have created simple GUI-oriented applications before.
[paragraph]So, what better way to start this, than with a good prologue?

Interactivity is Key

First of all, let's talk about interactivity. A good practice in GUI application development is to ensure that the program is interacting with the user at all times. We want to develop our application with the end user in mind. At the end of the day, it's up to the user to favor your app over another, right?  So for that, let's imagine the users of your application as greedy, overgrown babies. They demand that your app works perfectly and is responsive, and at the same time, holds their hands during the whole process. It should let the users know what each button does, as well as what it is doing at all times (i.e. its status).

Get on with it!

Ok ok. Time to talk about progress bars. We all know them and we all have seen them. Hell, some of us might have used one in the past.
Progress bars are one of the great ways of enhancing your application's GUI and letting the user know about the progress of an executing task, (e.g. downloading a file from the Internet or loading a level in a game). It is especially useful in lengthy tasks, where you want to know the exact percentage of the executing task, but it can also be used in indeterminate mode, meaning that it doesn't show the progress percentage. But how do you create a progress bar in Java?

Default progress bar
Progress bar in indeterminate mode
Thankfully, Java takes care of most of the work for us, by providing us with the JProgressBar class. This class extends JComponent, so essentially you can treat it like one in your program. This means that you can add a JProgressBar to a JPanel for instance just any other swing component.

JProgressBar bar = new JProgressBar();
frame.add(bar, BorderLayout.SOUTH);
bar.setValue(50);    // Sets the bar at 50%.
 
One apple each day!

Interactivity is Key

Interactivity is Key

Interactivity is Key

Interactivity is Key

Posted on 12:35 pm | Categories: