Saturday, July 30, 2011

How to create a dialog-based program in Java?

by Vilchor G. Perdido (eturo)


First in our code is to import the package in the Java API where the JOptionPane is. And it is found at the javax.swing package, so will create a code to import this package. It look like this...

import javax.swing.JOptionPane;
or you may write the code above like this;

import javax.swing.*; //note that the asterisk (*) indicate that all the classes and methods inside this package will be automatically used or include by the program


Second, create a code to define the class name (Note: The class name you entered a while ago is always the same the class name you will write in the code.) Below the class declaration, put a paired of open and close curly bracket where we will put the variables and methods later to be used by our program. The whole class is denoted by the light blue color in the code pad in the BlueJ text editor.

import javax.swing.JOptionPane;
public class MyFirstGUIProgram
     your code here
}

 
Third, after defining your class, the next step is to create the main method to be able to execute by the program. Whatever statements you declared inside the main method will be executed. The main method of our program will be indicated by the light yellow color the code pad window. To create the main method of our program, do this inside the class:


import javax.swing.JOptionPane; //package declaration


public class MyFirstGUIProgram //class definition

{

     public static void main(String[] args) //the main method
     {
         your code here
     }
}


Now, we are ready to create the statement that will display a dialog box with a message. To do this, we have the following syntax in creating a message dialog box.

JOptionPane.showMessageDialog(null,"your message here","text in the title bar", type of dialog box ,);

Explanation:

 


So, in our code:


Thursday, July 14, 2011

Your PC Will Die If You Don't Do These 5 Things

Update Windows

Avoid skipping Windows Update if possible. As the updates are pushed from Microsoft’s server to your computer automatically, install the updates as soon as possible and restart your computer if necessary. While this may be a hassle at times, it does keep your computer safer and improve its stability. 


Microsoft Security Essentials

Regardless of which operating system you are using, Windows, Mac or Linux, there are always viruses out there. Because Windows is the commonly used operating system in the world, you will need an antivirus software to be running in the background. Please do not try to run multiple antivirus softwares on the same system as this will lead to system instability.
Here’s the good news though, there’s no need to pay for an antivirus, for you have Microsoft Security Essentials to turn to. As a matter of fact, Microsoft Security Essentials is pretty great on its own. Findings from AV-Test.org shows it detects 98% of their enormous malware database, and AV-Comparatives.org found MSE to be one of only three products that did well at both finding and removing malware, including the leftovers. On top of that, they are the only free product to achieve an “Advanced+” rating – the top award for an anti-malware solution.
Nevertheless the technically inclined note that MSE does not incorporate fancy heuristics to detect viruses that aren’t already in the database. Whether this is a major weakness, it depends very much if you have the tendency to open files from untrusted sources. For the best defense against malware is safe browsing, with or without antivirus. 

Back Up Your Hard Drive
Be it the simple Windows Backup or other automated offsite backup tool like Crashplan, backups are crucial for any computer user. And it is not just about maintenance, it’s about having access to your files when your computer stops showing any signs of life. And this is one of the most important maintenance you will have to carry out. 

Clean Up Your Temporary Files

It is normal for Windows to have a lot of temporary files stored on your hard drive, mostly from your web surfing, and it is a good idea to clean these up regularly. A great tool for this job is CCleaner, and you can use this to clean up your PC manually or set up an automated schedule, keeping your computer free of all the temporary clutter. 

Completely Uninstall Programs

While Windows’ Add/Remove Programs dialog is a useful feature, Revo Uninstaller is by far better. Not only does it remove all traces of an application from your computer, but it also helps you uninstall apps you can’t locate, in addition to managing your startup processes which can speed up your boot up and run smoother once you do.

Thanks to this link.

Friday, July 8, 2011

Web Page Anatomy

By Jason Beaird


 
It’s similar to making a phrase on your refrigerator with magnetic poetry words. Although there are millions of ways to arrange the words, only a few arrangements make any sense. The magnetic words are like the components, or blocks, of the web page. Although the number of these necessary blocks depends on the size and subject of the site, most websites have the components seen in the figure below:
 Diagram of wireboxes illustrating the anatomy of a website.

Let’s look at each of these components in turn:

Containing block

Every web page has a container. This could be in the form of the page’s body tag, an all-​​containing div tag. Without some sort of container, we’d have no place to put the contents of our page. The elements would drift beyond the bounds of our browser window and off into empty space. The width of this container can be fluid, meaning that it expands to fill the width of browser window; or fixed, so that the content is the same width no matter what size the window is.

Logo

When designers refer to an identity, they’re referring to the logo and colors that exist across a company’s various forms of marketing, such as business cards, letterhead, brochures, and so on. The identity block that appears on the website should contain the company’s logo or name, and sit at the top of each page of the website. The identity block increases brand recognition while informing users that the pages they’re viewing are part of a single site.

Note: Many people use the words “identity” and “branding” interchangeably. Branding is a broad term that describes the process of developing an awareness of a company, product, or service. The branding process involves advertising, market research, customer feedback, and much more. Identity is actually a subset of branding in that it deals only with the visual aspects of branding.

Navigation

It’s essential that the site’s navigation system is easy to find and use. Users expect to see navigation right at the top of the page. Whether you plan to use vertical menus down the side of the page, or a horizontal menu across the page, the navigation should be as close to the top of the layout as possible. At the very least, all main navigation items should appear “above the fold.”

Above “the Fold”

The fold, as many designers call it, is where the content of a page ends before users scroll down. This metaphor is derived from the fold in a newspaper. If you look at the cover of a folded newspaper, most of the headlines and biggest news appear in the top half, so that the most important news items can be seen at a glance when the newspaper is folded. The location of the fold on a web page depends on the browser dimensions and the user’s screen resolution. At a resolution of 1024×768 pixels, accounting for browser chrome — that is, the space taken up by the browser application itself in the form of tabs, buttons, the address bar, and a bottom status bar — the fold is usually just over 500 pixels from the top.

Content

Content is king. A typical website visitor will enter and leave a website in a matter of seconds. If visitors are unable to find what they’re looking for, they’ll undoubtedly close the browser or move on to another site. It’s important to keep the main content block as the focal point of a design, so that visitors can scan the page for the information they need.

Footer

Located at the bottom of the page, the footer usually contains copyright, contact, and legal information, as well as a few links to the main sections of the site. By separating the end content from the bottom of the browser window, the footer should indicate to users that they’re at the bottom of the page.

Whitespace

The graphic design term whitespace (or negative space) literally refers to any area of a page without type or illustrations. While many novice web designers (and most clients) feel a need to fill every inch of a web page with photos, text, tables, and data, empty space on a page is every bit as important as having content. Without carefully planned whitespace, a design will feel closed in, like a crowded room. Whitespace helps a design to breathe by guiding the user’s eye around a page, but also helps to create balance and unity.

Six Tips For Creating Iconic Logos

By Jennifer Farley




Logo design is undoubtedly one of most challenging aspects of graphic design. It may seem easy at first glance but successful logos tend to have several characteristics in common. Those features are:
  • simplicity
  • uniqueness
  • relevance
  • memorable
  • focus
  • tradition (or not following trends).
Here’s a brief overview of each of these characteristics with a well known brand examples to illustrate the point.

1. Keep it simple. A frequent mistake made by new designers is to over-​​complicate, or over-​​design. Simplicity is a good thing and when in comes to design, less is definitely more.
i-love-ny-logo

2. Make it unique. In a world full of swooshes, arcs, leaves and other logo clichés, this is easier said than done. The Nike logo is a tick or correct mark yet is instantly recognizable and unique.
nike-logo
3. Keep it relevant. When you’re designing a logo, think about the appropriateness of the symbol or typefaces you use. For example, a skull and crossbones will not work for a wedding planning business. The Lego logo uses bright primary colors and a child-​​friendly font – perfect for its intended audience.
Lego
4. Make it memorable. Your logo design is a visual representation of what the company stands for. The logo will often only receive a quick look, so it needs to make a fast impression.
playboy-logo
5. Keep the focus and use one idea to make the design special. The Fed Ex logo features an arrow between the letters E and X, representing the idea of moving parcels from place to another.
FexEx

6. Aim for longevity. While many logos will be updated over their lifetime, its probably not a bad idea to design something which will not look dated after a year. Avoid “trendy” fonts and symbolism. The Coca-​​Cola logo is among the most recognized logos and brands in the world. The logo’s distinctive cursive script has not changed dramatically over its long lifetime.
coca-cola

These are, of course guidelines and pointers. All rules are made to be broken but it helps if you know the rules before breaking them. What other rules or guidelines would you add to this list?


Click this to read more tutorials.

Breaking Out of the Box With CSS Layouts

By Jina Bolton | | CSS Tutorials

One of the most commonly used arguments regarding CSS that I hear from designers who don’t like web standards is, "CSS designs are so boring. They’re too boxy." I can’t help but find this statement to be a bit silly. To me, that’s like saying buildings built with wood are boxy. An architect can create a boring-looking building. But, using the same tools, an architect can create a stunning work of art. It all depends on creativity and experimentation.

It’s true that CSS is heavily reliant upon a grid — everything flows on x and y axes (and can be positioned as such, much like designs built in Photoshop). However, this doesn’t mean that your design has to be boring. If you understand how the grid works, you can fracture or abstract that grid to make your layout more dynamic and interesting. In achieving this goal (while supporting flexibility and maintainability), CSS designs have so much more to offer than table-based layouts.

Grids and Wireframes
If you’ve taken any classes in typography or layout, you know that the grid is one of the most important essentials in design. However, if you aren’t familiar with this concept, here’s a very brief overview:
  • A grid provides organization. A grid can act as your page layout’s "blue plan." Well-planned grids can be aesthetically pleasing, as well as providing organization to your content.
  • A grid can define more information. A well-organized layout can help provide consistency from page to page, and define what type of information is being provided at various points (for example: a sidebar can be used to provide secondary information; copyright and legal information, etc. might be placed in the page footer, and so on).
  • A grid can unify a series. Having a planned guide for the placement of logos, headlines, images, and/or text in any medium (business cards, advertisements, web site layouts, etc.) can help "tie" everything together. Therefore, a grid can be a very important element of a brand.
Starting our Design
Here’s an example of a grid that you may typically see on a web site:
Sample Web Layout

Click here to read more.

Friday, June 17, 2011

The Dos and Donts of Web Site Design Part I


Let’s discuss an important point about online content/text versus print. People read text on a computer screen at about 1/4th the speed that they do on paper. This important fact tells us that we should keep what we want to say on the web short and sweet.

There are many options available when creating web pages, many good and many bad. The following is a list of some of those options and how I think you should deal with them.

Some things you should do and not do in your web pages:


1. No page counters: Page counters do nothing except make you look like an amateur, mess with your design, and tell people information about your site you probably don’t want them to know! If you want to know how many people are hitting your site, just ask your host for server stats. Any host worth it’s salt should be able to provide you with detailed stats that make page counters look stupid.

2. Forget blinking or flashing text: The only place you see blinking and or flashing text is on the neon signs of naked bars or web sites made in the mid 90's! People don’t like them and expect to see naked people inside sites or buildings that have them … enough said.

3. Make your titles on your web page make sense: One of the core attributes of a web page is its title. In between the tags you can specify the page's title as it appears in the browsers top title bar and in the search engine results.
People pay attention to page titles, so you should make sure that they are clear. If you have a page on how to take care of dogs and you happen to have a dog named ‘Jimmy’ don’t title your page: ‘How to look after Jimmy and his furry friends.’ You should title you page something like: ‘How to take care of dogs.’


Thursday, June 16, 2011

BlueJ - The Java Interactive Enviroment

The Blueroom is a community site for educators using BlueJ. It's purpose is to share resources and have discussions with other educators and the BlueJ development team.
If you are an educator using BlueJ, head over to the Blueroom and sign up.

If you are using BlueJ text editor in creating Java programs, you can download the latest version in this site or you can get in this blog. Go here to download.

Click here to join the Blueroom Community.

Wednesday, June 15, 2011

Cascading Style Sheets (CSS) Basic Tutorials

You’ve heard the buzz about the seperation of style from content, but you are stuck in the world of nested tables and deprecated markup. If so, you have come to the right place! Using CSS to style your (X)HTML files, will benefit you and your visitors in many ways.

 

To learn more about CSS, just click here. Happy learning! 

 

 

Web Designing Tips

A Website should be packed with:
  • content;
  • functions;
  • compatibility;
  • search engine and;
  • consistency 
1. Great content is an unmatched promotion machine 
  • everything is secondary to quality content
    • for your website to be a success, it needs to deliver something people want 
  • with great content, the rest will fall into place much more easily
2. Good navigation is paramount
  • websites that have poor navigation annoy and confuse visitors, causing them to leave frustrated, and unlikely to return 
  • if you're just learning web design, learn to write code that validates 
    • Example: for a website with lots of pages, separate them into descriptive categories, and build a hierarchal menu
    • Example: avoid drop down JavaScript menu systems 

Like Us on Facebook

Related Posts Plugin for WordPress, Blogger...