Wednesday, January 26, 2011

How To Create a JFrame in Java



This post will teach you how to create a Java Frame using the swing library. It's been a while now since I got to play with Java swing because I've been working with web, of course using the Java Programming Language.

I guess you know Java because you came across to this site. Somehow looking for a simple program to start. Maybe you got a mini-school project or an assignment you want to work on.

Open your Eclipse IDE and let's get started. Create a java project (File>New>Java Project). Name your project in any way you want it, mine is JavaSwing. Don't forget to create a pachage.

To create a simple frame in java, you need to import javax.swing.JFrame. See code below.

package com.javaswing;

import javax.swing.JFrame;
import javax.swing.SwingUtilities;

public class JavaSwing {
  public static void main(String []argv){     
   SwingUtilities.invokeLater(new Runnable(){
    public void run(){
      JFrame frame = new JFrame("Example Frame");
      frame.setSize(300, 300);
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.setVisible(true);
    }
   });
  }
}
Code in Eclipse
Run as Java Application
The frame
Your application should use SwingUtilities.invokeLater because it is the proper way. Your application should always be thread safe.

Learn More:

Monday, January 24, 2011

Five SEO Ways to Improve your Website's Rankings



When it's your first time to work on a website and you badly need that website to rank high in search engine sites, you obviously rely on the Internet for advices, tips, and more. However, there's no guarantee that the information you have read from another source may be correct and true. Most of the time, there are individuals who will pose as SEO experts but have not really practiced the methods of SEO. So what you really need is to get the right information from the right resources.
A lot of articles and information through the web will tell you that SEO is just about matching keywords to make your site rank. Well, there's some truth in some aspect, but there's actually more than just keyword phrasing. There's a lot of work to be done especially when you need to apply some SEO to your website. We tell you, it's not that easy to rank especially when you are still an amateur. If you truly want to succeed, follow the footsteps of veteran SEO experts and know what they have done to further enhance their websites' rankings.

One of the things you need to give importance for SEO is putting an anchor text in all of your inbound links to your site. When an online user is searching for a particular topic or phrase, and end ups writing a keyword that similarly matches your anchor text phrase (or partly matches), what the search engine does is crawl it to the top pages. Your anchor text will help determine what your site is all about so that users will know if your site is clickable or not. If your website is shown in the top pages, you made a good job. But if not, then you need to work harder because there's a lot of competition out there.

The next thing you need to know when it comes to SEO is to construct the right keywords in title tags and meta tags. Although meta tags create little impact on search rankings, but it's still important and very helpful for your site to gain visibility in search engine sites. Also, meta tags are helpful categorizing your page.
Link popularity is another crucial factor in SEO ranking. Take note that a user will take time to read your website especially if it has good quality content or because it was included in the top pages of search engine sites. But most of the time, users go for the latter. Link popularity can also be the same as Page Rank since it highlights the importance of the number and quality of links that are pointing to your website.

Doing link building might be a bit tricky for some, but it\'s also considered one of the major factors in SEO. When you have generated many inbound links from different sites, it has a higher chance of getting more results from search engine sites. The more inbound links generated, the better the performance are in search engines.

Last but not the least is that you use a keyword text in your root domain. Using keywords in sub domains is also helpful, but putting it in a root domain will give your website more visibility and exposure, especially when that particular keyword phrase is the most searched online.
Results may not come overnight. However, if you utilize these SEO tips and advices and be consistent with them, then your site will be making progress in no time.
 
Article Source: http://www.articlesbase.com/seo-articles/five-seo-ways-to-improve-your-websites-rankings-4100632.html

Learn More:

Upload Image Without Refresh Page - Asynchronous Image File Upload Without Ajax



Through concept such as Ajax and scripting languages like PHP, we now have a much robust set tools with which to deal with imaging. Thorugh Ajax, we can dynamically load and display images without the rest of the page having to reload, which speeds up the process considerably. We also have more control over what the user sees while the screen or images load. Users are generally understanding of load times, provided that you let them know what is happening. Thorugh Ajax and a little PHP magic, we can help the user's experience be a seamless and enjoyable as possible.

The basic uploading, manipulating and dynamically displaing images using PHP and Ajax.

Uploading Images
I suppose it is neccessary to bring a little bad news to Ajax at this point, it is not possible to process a file upload through the XMLHtrtpRequest Object. The reason of this is that javascript has no access to your computer's file system. While this is somewhat disappointing, there are still ways to perform Ajax-like functionality for this wighout making use of the XMLHttpRequest Object. Clever developeres have discovered that you can use hidden iframes to post a form request, thereby allowing for a image upload wiothout refresh.

I am designing a website with ajax and php. My main target is doing everything without full page refresh. I have done everything completed. I solved it partially using IFRAME.

By setting the iframe's CSS display property to none, the element is persent on the page to be utilized by the upload form, but not visible to the end user. by assiging a name to the iframe tag, you can use the target attribute in the form tag to post the request to the hidden iframe. Once you have the iframe configured, you can perform any uploads you like, and then use Ajax to perform any extra functionality. Consider the following example, which will allow yout to upload an image to a folder of your specification. Consider the code, which will allow you to create application.

An Ajax-enabled file upload system that uses hidden iframes to hide the upload

The code to create form, with a hidden iframe for processing

As you can see, you are using the same functionality and you will now use it to load the recently uploaded image into your

web page dynamically and without a screen refresh. The uploading function will still perform your form submission, but it is now coupled with a function called downloading, which will fire once the process_upload.php script has finished uploading the image (determined by the onload evernt). The doneuploading function takes ther parent frame of the hidden iframe and the fine name as arguments. It then users Ajax to dyanmically load the image the speicified element of ther parent frame.

Im trying to create a page for a picture framing site where users can upload images to see how they would look framed.

Uploading images can be broken down into the three following steps which will be looked at in turn:

* An HTML form with a browse button to allow the client to choose which file to upload
* A script to process the upload, validate the file, name it and place it in the file system
* Lastly a page to advise the client the upload was a success
* Is there a AJAX based solution or PHP based solution to check the filesize a user is trying to upload via a form.
* If the filesize exceeds more than 2 MB we want to give a message to the user that they need to upload a smaller file

size.

You can upload ZIP file of all your images in one shoot. You can upload image using zip file.
* You can create zip file for image, doc file and other file.
* This script find only jpg file uploaded and other file deleted.
* You can set which extension allowed or not allowed using this script uploaded.
Article Source: http://www.articlesbase.com
About the Author
I am Asif Khalyani. I am software Engineer. PHP and ajax free script download site phpasks

Learn More:

Effective Website Design and Layout



So you got to build a website because you’ve learned that the net is a great medium to boost you business. You may actually start now. A simple HTML will do. Anyway, you just want to inform to the world you got a business, you have a product to sell.

It is however will not be as simple as that. Your website is running for a month already, only to find out no one is visiting your site. No one is buying your product and no one knows about you. And you say, “Well that’s just a try. I’m giving it another month”. But still, you cannot reach your quota or at least the minimum.

You’ve just come to the right place. I’ve got some tips for you to follow. Just remember, these are the basic of web design that help make your site a success.

Provide essential information to your users – Your website must provide an ‘About Us’ or ‘Contact Us’ link. Visitors may find it awkward for a business website not providing any information about your business. When the website loads, it usually displays the header first so it is very ideal to put your contacts at the header. Provide FAQ’s so that visitors will have their initial troubleshooting. Usually, if you provide good content to your website, they may scroll it up to the bottom of the site, so it is also good to provide your contacts at the footer of your site.

Text must be readable - Who the hell would be interested in a website that is unreadable and ugly? Give accent to those keywords that really reflect what you want to convey. Chose the right font size because too large or too small will just irritate the readers. Make use of the ‘Justify’ in aligning your text that way it will look very professional. Use different font colors for different keywords but don’t overdo it.

Website navigation should be easy – Your site must be very easy to navigate. The name of the link or the button should reflect the landing page. Usually, the navigation stays on top or the left side of the website, whichever you prefer. At least differentiate the visited links to the unvisited links to inform the user better. You can do this by using CSS (Cascading Style Sheet) for it to look better.

Avoid using elements which take a long time to download – Flash is good however if it is not needed, do not use it. Use JavaScript instead but not so much. CSS will do as long as you know how to maximize it. Visitors like website that load fast and look very professional. Do not add components to your website that takes long time to download. Just make your site very frank and very straight.

Use a consistent design for all the pages of your website – Visitors may think they are pointed to a different site if you are not consistent with your layout, as much as possible use one theme for all your pages. It should be noted to do the same with your footer and your header. Use the same format too. Get to develop a very interesting site but very consistent to all the elements you included in the website.

Learn More:

Sunday, January 23, 2011

Can I Learn HTML Programming Easily?



Have you ever thought of building a website of your own? Is it possible? The plain answer is YES, but how?

HTML stands for Hypertext Markup Language. It has been longed used to present confidential and non-confidential information to humans around the world. It has been known to be the medium of communication between different parties to convey new and existing information.

HTML is easy to learn. There are tags which I suggest you to memorize for you to gain more familiarity to the structure. Make use of these tags as often as possible because these are vital in building a more complex website. As you progress and gain more knowledge, building a website for you is very easy.

I was able to look at my first HTML project, back when I was still a college student, a simple autobiography. It was so funny indeed. Colors do not match; styles are so awful, damn so pathetic. But you know this is just my first encounter with the scripting language. As I gain more familiarity with HTML, displaying website components is very easy for me. Now integrating CSS and JavaScript with HTML doesn’t seem to be very difficult for me to do.

What I suggest for you to learn HTML really fast is to look at W3School. There are a lot of HTML tutorials you can find there. Practice the basics first before diving to a more complex topic. You can do the script in a notepad and then save it as “sample.html” with the quotes of course, and then open it with any browser. Mastery is not done overnight so be patient.

Be motivated to be successful. To tell you honestly, programming is also done by trial and error. If there are some incompatibilities, don’t hesitate to do some research. There are also forums which could help you for free. Don’t hesitate to ask someone who is very knowledgeable to HTML because they know the best practice. You can learn more from them. 

If you have mastered HTML, you can build your own website design. Make use of it to earn money. You can also bid web design projects at Freelancer if you feel you can already do it.

Start learning HTML now onwards.

Learn More:

Friday, January 21, 2011

Earn at your spare time by typing - Kolotibablo



Are you tired of online scams? Yes I am too. I tried so much and work as much as I can only to find out in the end, it is a scam. Don't worry, I'm not gonna refer you or cheat you, I just want to share something it really works, at least for me. Your earning is yours and that's guaranteed.

As shown in the figure below, I was paid two times in 2011. In fact, I just recently joined this site, tried it and it really worked. You can cashout when you reach $1. Only, they pay thru webmoney. My way to withdraw my webmoney is to sell my dollar/s to a legitimate local Forex and they are the one depositing to my local bank account. Earning money here is really easy. Just type the letter shown in the picture in the textboxes and hit enter, the counter will begin displaying how many have you typed. As you type more, your level increases and thus you gain more bonus.


Increase your earnings by:
  • If your in GMT+8 pacific time, you must login between 4am to 9am because server workload is really high. They offer the most to $0.65/1000 capchas, the server is really fast.
  • The time is limited only to 10 seconds. If you feel you can't do it in 10 seconds, just hit any key continuously and limit will reset to 10 seconds so you won't miss.
  • If you can't read the display, just put ? in the textbox so the number of the type capchas will still increase, the thing is you will not be credited for the wrong capcha you have typed.
  • Don't use any external software. I've tried it and I got a warning from them. They will ban your account if they found you're cheating them. The drawback? your earnings will be gone too.
What are you waiting for, register to http://kolotibablo.com/bablo.php and start earning. This is a Russian site but there is an English version so it won't be difficult for you. You can also increase your earnings by working as a team.

P.S.

The link I gave you is not a referral. A referral link would be displayed something like this; http://kolotibablo.com/?ref=123456(not existing). Just give it a try.


Link Exchange Directory - Simplify Right Now - Link Exchange

Learn More:

There was an error in this gadget