<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>Java Forum RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest threads from the 'Java' forum at Programmer's Heaven, excluding replies.</description>
    <language>en</language>
    <copyright>Copyright 2008 Programmers Heaven</copyright>
    <pubDate>Mon, 01 Dec 2008 19:48:48 -0700</pubDate>
    <lastBuildDate>Mon, 01 Dec 2008 19:48:48 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>virtual key question (beginner)</title>
      <link>http://www.programmersheaven.com/mb/java/382444/382444/virtual-key-question-beginner/</link>
      <description>hi&lt;br /&gt;
&lt;br /&gt;
instead of pressing F3 button i want my program to do this command&lt;br /&gt;
&lt;br /&gt;
for example : I recieve a massege "press F3 to continue" but i dont want to actually press it i want to run my program and the it will continue...&lt;br /&gt;
&lt;br /&gt;
and ifts possible to get a code for example it will be grat!&lt;br /&gt;
&lt;br /&gt;
thanks alot&lt;br /&gt;
raz.&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Mon, 01 Dec 2008 13:34:04 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>How to retrieve text from an image?</title>
      <link>http://www.programmersheaven.com/mb/java/382417/382417/how-to-retrieve-text-from-an-image/</link>
      <description>I want to retrieve the whole information placed on an I-card and want to save that in a database.&lt;br /&gt;
But how can i retrieve a text from an image?&lt;br /&gt;
Is there any java API available for that?&lt;br /&gt;
and where can i get some source code to understand this concept?&lt;br /&gt;</description>
      <pubDate>Mon, 01 Dec 2008 08:06:57 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>problem about continuous playing the game..</title>
      <link>http://www.programmersheaven.com/mb/java/382409/382409/problem-about-continuous-playing-the-game/</link>
      <description>i should have not post here my code..&lt;br /&gt;
maybe bcoz someone is using it&lt;br /&gt;
sorry for the inconvenience but i dont know how to delete posts..&lt;br /&gt;
can someone tell me?</description>
      <pubDate>Mon, 01 Dec 2008 05:02:30 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>pls..i'm begging for your help..</title>
      <link>http://www.programmersheaven.com/mb/java/382390/382390/plsim-begging-for-your-help/</link>
      <description>Here is my problem:&lt;br /&gt;
&lt;br /&gt;
Write a program to assign passengers seats in an airplane. Assume a small airplane with seat numberings as follows:&lt;br /&gt;
&lt;br /&gt;
1 A B C D&lt;br /&gt;
2 A B C D&lt;br /&gt;
3 A B C D&lt;br /&gt;
4 A B C D&lt;br /&gt;
5 A B C D&lt;br /&gt;
6 A B C D&lt;br /&gt;
7 A B C D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The program should display th seat pattern with an 'x' marking the seats already assigned. For example, after seats 1A, 2B, and 4C are taken, the display should look like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1 X B C D&lt;br /&gt;
2 A X C D&lt;br /&gt;
3 A B C D&lt;br /&gt;
4 A B X D&lt;br /&gt;
5 A B C D&lt;br /&gt;
6 A B C D&lt;br /&gt;
7 A B C D&lt;br /&gt;
&lt;br /&gt;
After displaying he seats available,the program should prompt for the seats desired, the user can type in a seat,and then the display of available seats should be updated.this continuous until all seats are filled or until the user signals that the program should end. If the user types in a seat that is already assigned, the program should end. If the user types in a seat that is already assigned,the program should say that that seat is occupied and ask for another choice.&lt;br /&gt;</description>
      <pubDate>Sun, 30 Nov 2008 22:19:41 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>airplane seats program in java</title>
      <link>http://www.programmersheaven.com/mb/java/382370/382370/airplane-seats-program-in-java/</link>
      <description>pls..heLp me..&lt;br /&gt;
i really need a program for this problem..&lt;br /&gt;
can pls somebody help me..&lt;br /&gt;
&lt;br /&gt;
HERE IS THE PROBLEM:&lt;br /&gt;
&lt;br /&gt;
write a program to assign passengers seats in an airplane. Assume a small airplane with seat numberings as follows:&lt;br /&gt;
&lt;br /&gt;
1  A B   C D&lt;br /&gt;
2  A B   C D&lt;br /&gt;
3  A B   C D&lt;br /&gt;
4  A B   C D&lt;br /&gt;
5  A B   C D&lt;br /&gt;
6  A B   C D&lt;br /&gt;
7  A B   C D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The program should display th seat pattern with an 'x' marking the seats already assigned. For example, after seats 1A, 2B, and 4C are taken, the display should look like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1  X B   C D&lt;br /&gt;
2  A X   C D&lt;br /&gt;
3  A B   C D&lt;br /&gt;
4  A B   X D&lt;br /&gt;
5  A B   C D&lt;br /&gt;
6  A B   C D&lt;br /&gt;
7  A B   C D&lt;br /&gt;
&lt;br /&gt;
After displaying he seats available,the program should prompt for the seats desired, the user can type in a seat,and then the display of available seats should be updated.this continuous until all seats are filled or until the user signals that the program should end. If the user types in a seat that is already assigned, the program should end. If the user types in a seat that is already assigned,the program should say that that seat is occupied and ask for another choice.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PLEASE HELP ME...&lt;br /&gt;
&lt;br /&gt;
TNX..&lt;br /&gt;</description>
      <pubDate>Sun, 30 Nov 2008 03:02:47 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>plz help me..(tic-tac-toe)</title>
      <link>http://www.programmersheaven.com/mb/java/382368/382368/plz-help-metic-tac-toe/</link>
      <description>I need a Java code/program which allow two users to play tic-tac-toe. The program should ask for moves alternately from player X and player O. The program displays the game position as follows:&lt;br /&gt;
&lt;br /&gt;
1   2   3&lt;br /&gt;
4   5   6&lt;br /&gt;
7   8   9&lt;br /&gt;
&lt;br /&gt;
The players enter their moves by entering the position number they wish to mark. After each move, the program displays the changed board. A sample board configuration is:&lt;br /&gt;
&lt;br /&gt;
X   X   O&lt;br /&gt;
4   5   6&lt;br /&gt;
O   7   8&lt;br /&gt;
&lt;br /&gt;
-----THANK YOU..plssss...help me..&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Sun, 30 Nov 2008 02:38:46 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>help with tic tac toe</title>
      <link>http://www.programmersheaven.com/mb/java/382366/382366/help-with-tic-tac-toe/</link>
      <description>i need to create a class that let's 2 people play a game tic tac toe..&lt;br /&gt;
any one have any idea?&lt;br /&gt;</description>
      <pubDate>Sat, 29 Nov 2008 21:03:35 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>only a beginner..help</title>
      <link>http://www.programmersheaven.com/mb/java/382354/382354/only-a-beginnerhelp/</link>
      <description>im just asking how to write this syntax in java form:&lt;br /&gt;
&lt;br /&gt;
cards[r][c]=rand()%8+1;//it is written in C&lt;br /&gt;
im trying to think what is the value of rand() in java,&lt;br /&gt;
is it Math.random?&lt;br /&gt;
pls help me...&lt;br /&gt;
&lt;br /&gt;
this is my whole program in C;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;cstdlib&amp;gt;&lt;br /&gt;
#include &amp;lt;ctime&amp;gt;&lt;br /&gt;
using namespace std;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    char comma;&lt;br /&gt;
    int r1, c1, r2, c2, cards[4][4];&lt;br /&gt;
    srand((unsigned)time(NULL));&lt;br /&gt;
    //fill board&lt;br /&gt;
    for (int r=0; r&amp;lt;4; r++)&lt;br /&gt;
    {&lt;br /&gt;
        for (int c=0; c&amp;lt;4; c++)&lt;br /&gt;
        {&lt;br /&gt;
            cards[r][c]=rand()%8+1;&lt;br /&gt;
            cout&amp;lt;&amp;lt;cards[r][c];&lt;br /&gt;
        }&lt;br /&gt;
        cout&amp;lt;&amp;lt;endl;&lt;br /&gt;
    }&lt;br /&gt;
    //display board&lt;br /&gt;
    cout&amp;lt;&amp;lt;"    1 2 3 4\n";&lt;br /&gt;
    cout&amp;lt;&amp;lt;"  ";&lt;br /&gt;
    for (int i=0; i&amp;lt;=8; i++)&lt;br /&gt;
    {&lt;br /&gt;
        cout&amp;lt;&amp;lt;"-";&lt;br /&gt;
    }&lt;br /&gt;
    cout&amp;lt;&amp;lt;endl;&lt;br /&gt;
    for (int r=0; r&amp;lt;4; r++)&lt;br /&gt;
    {&lt;br /&gt;
        cout&amp;lt;&amp;lt;r+1&amp;lt;&amp;lt;" | ";&lt;br /&gt;
        for (int c=0; c&amp;lt;4; c++)&lt;br /&gt;
        {&lt;br /&gt;
            cout&amp;lt;&amp;lt;"* ";&lt;br /&gt;
        }&lt;br /&gt;
        cout&amp;lt;&amp;lt;endl;&lt;br /&gt;
    }&lt;br /&gt;
    cout&amp;lt;&amp;lt;endl;&lt;br /&gt;
    //selection&lt;br /&gt;
    cout&amp;lt;&amp;lt;"Please insert the first card row and column seperated by a comma.\n";&lt;br /&gt;
    cin&amp;gt;&amp;gt;r1&amp;gt;&amp;gt;comma&amp;gt;&amp;gt;c1;&lt;br /&gt;
    cout&amp;lt;&amp;lt;"Please insert the second card row and column seperated by a comma.\n";&lt;br /&gt;
    cin&amp;gt;&amp;gt;r2&amp;gt;&amp;gt;comma&amp;gt;&amp;gt;c2;&lt;br /&gt;
    //fix&lt;br /&gt;
    r1--;&lt;br /&gt;
    c1--;&lt;br /&gt;
    r2--;&lt;br /&gt;
    c2--;&lt;br /&gt;
    //reveal&lt;br /&gt;
    cout&amp;lt;&amp;lt;"    1 2 3 4\n";&lt;br /&gt;
    cout&amp;lt;&amp;lt;"  ";&lt;br /&gt;
    for (int i=0; i&amp;lt;=8; i++)&lt;br /&gt;
    {&lt;br /&gt;
        cout&amp;lt;&amp;lt;"-";&lt;br /&gt;
    }&lt;br /&gt;
    cout&amp;lt;&amp;lt;endl;&lt;br /&gt;
    for (int r=0; r&amp;lt;4; r++)&lt;br /&gt;
    {&lt;br /&gt;
        cout&amp;lt;&amp;lt;r+1&amp;lt;&amp;lt;" | ";&lt;br /&gt;
        for (int c=0; c&amp;lt;4; c++)&lt;br /&gt;
        {&lt;br /&gt;
            if ((r==r1)&amp;amp;&amp;amp;(c==c1))&lt;br /&gt;
            {&lt;br /&gt;
                cout&amp;lt;&amp;lt;cards[r][c]&amp;lt;&amp;lt;" ";&lt;br /&gt;
            }&lt;br /&gt;
            else if((r==r2)&amp;amp;&amp;amp;(c==c2))&lt;br /&gt;
            {&lt;br /&gt;
                cout&amp;lt;&amp;lt;cards[r][c]&amp;lt;&amp;lt;" ";&lt;br /&gt;
            }&lt;br /&gt;
            else&lt;br /&gt;
            {&lt;br /&gt;
                cout&amp;lt;&amp;lt;"* ";&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        cout&amp;lt;&amp;lt;endl;&lt;br /&gt;
    }&lt;br /&gt;
    //match?&lt;br /&gt;
    if (cards[r1][c1]==cards[r2][c2])&lt;br /&gt;
    {&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
    }&lt;br /&gt;
    //this pushes the next board onto a blank screen&lt;br /&gt;
    for (int b=0; b&amp;lt;=20; b++)&lt;br /&gt;
        cout&amp;lt;&amp;lt;endl;&lt;br /&gt;
    //repeat&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
hope you'll help me..&lt;br /&gt;</description>
      <pubDate>Sat, 29 Nov 2008 07:37:38 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>boolean method problem</title>
      <link>http://www.programmersheaven.com/mb/java/382327/382327/boolean-method-problem/</link>
      <description>I have a boolean method that finds out whether a record in an ArrayList collection exists or not, but when I try calling that method it seems to think that it isn't a boolean type.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
System.out.println("Student ID &amp;gt;&amp;gt;");
   studID = keyboardMain.nextInt();
   UndergradMember u = new UndergradMember();
                
   if(!loanExistsUndergrad(studID,membersList)){
      u.deleteUndergrad((ArrayList) membersList, studID);
   }

public boolean loanExistsUndergrad(int studID, ArrayList &amp;lt;UndergradMember&amp;gt; undergradList){
   for (int i = 0; i &amp;lt; undergradList.size(); i++)
   {
      if(undergradList.get(i).returnStudID() == this.studID)
      {
         return true;
      }
   }       
   return false;
}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
The error is that it returns an incompatible type "loanExistsUndergrad" instead of "boolean".&lt;br /&gt;
&lt;br /&gt;
I don't know why it doesn't think it's a boolean, can you help me understand why it's not working properly?&lt;br /&gt;</description>
      <pubDate>Fri, 28 Nov 2008 13:55:55 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>getResource() doesnt return URL in HP Unix  for a valid path</title>
      <link>http://www.programmersheaven.com/mb/java/382213/382213/getresource-doesnt-return-url-in-hp-unix--for-a-valid-path/</link>
      <description>The below code works fine in Windows. But in HP Unix, the URL is always null, though the directory exists.&lt;br /&gt;
&lt;br /&gt;
==================================================
=========================&lt;br /&gt;
Tester x = new Tester();&lt;br /&gt;
			String xmlPath = args[0];//"../../../../../" + "txn-xml";&lt;br /&gt;
			String s1 = xmlPath + "/" + "init_record" + "/";&lt;br /&gt;
			URL url = x.getClass().getClassLoader().getResource(s1);&lt;br /&gt;
			System.out.println("1. URL is : " + url);&lt;br /&gt;
			String s2 = "/app/fib/SitNov2008/XLS-ADMIN-SERVER/webapps/FIBSIT01/WEB-INF/txn-xml/init_record/";&lt;br /&gt;
			url = x.getClass().getClassLoader().getResource(s2);&lt;br /&gt;
			System.out.println("2. URL is : " + url);&lt;br /&gt;
			System.out.println("3. FOLDER EXISTS is : "&lt;br /&gt;
					+ (new java.io.File(s1)).exists());&lt;br /&gt;
			System.out.println("4. FOLDER EXISTS is : "&lt;br /&gt;
					+ (new java.io.File(s2)).exists());&lt;br /&gt;
==================================================
=========================&lt;br /&gt;
&lt;br /&gt;
The Output:&lt;br /&gt;
1. URL is : null&lt;br /&gt;
2. URL is : null&lt;br /&gt;
3. FOLDER EXISTS is : true&lt;br /&gt;
4. FOLDER EXISTS is : true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Is there anything wrong to get the URL.&lt;br /&gt;
Can somebody help on this?&lt;br /&gt;</description>
      <pubDate>Tue, 25 Nov 2008 06:46:23 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>java</title>
      <link>http://www.programmersheaven.com/mb/java/382202/382202/java/</link>
      <description>what is the difference between volatile and transient keywords in java&lt;br /&gt;</description>
      <pubDate>Mon, 24 Nov 2008 23:39:15 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>I am failing my java class</title>
      <link>http://www.programmersheaven.com/mb/java/382200/382200/i-am-failing-my-java-class/</link>
      <description>I am failing Java because I do not understand.  I have a project due tomorrow and I do not even know where to start.  I have to create an application with 4 methods to set 3 people's beginning bank balance, add deposits and withdrawals, and print the final balance and interest rate earned. &lt;br /&gt;
&lt;br /&gt;
Does anyone know where I can find something like this online to look at and possibly just adjust my code?  I really can't fail this class!  :(&lt;br /&gt;</description>
      <pubDate>Mon, 24 Nov 2008 20:32:33 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>Calling event methods from within a for loop</title>
      <link>http://www.programmersheaven.com/mb/java/382131/382131/calling-event-methods-from-within-a-for-loop/</link>
      <description>I am currently a student programmer in high school with only twelve weeks of experience so I could realy use some help. I am writing a program involving graphics using an applet. This program will draw graphics in a certain location based on the mouse position. To do this I created a class that implemented the MouseMotionListener and created a mouseMoved(MouseEvent event) method.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
// Variables defined elsewhere.
public int X = 0, Y = 0;

public class MouseMotion implements MouseListener, MouseMotionListener {

public void mouseMoved(MouseEvent event) {
X = event.getX();
Y = event.getY();
Graphics.this.repaint(); // This calls my paint method.
}
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
This method allows me to successfully draw the graphics where ever the mouse location is by drawing at positions X and Y. The problem I have involves calling mouseMoved while inside of a loop. Whenever I have a loop running inside of the paint method, the MouseEvent won't get called until after the loop is over. This results in the graphics not moving properly whenever a loop is running. Is there anyway I can create a statement inside of the for loop that calls the MouseEvent automatically regardless of if the MouseMotionListener detects the mouse movement? I have tried placing addMouseMotionListener(Object); inside of the for loop but this doesn't work. I hope I presented my problem clearly enough. If anyone out there has any ideas I would greatly appreciate. Thanks for reading!&lt;br /&gt;
-James</description>
      <pubDate>Fri, 21 Nov 2008 23:26:40 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>Recursive Algorithm for Postfix/Infix expressions</title>
      <link>http://www.programmersheaven.com/mb/java/382044/382044/recursive-algorithm-for-postfixinfix-expressions/</link>
      <description>For those that are unaware if infix is an expression like (5 + (3 * 2)) or (3 + 5) * 10, then the respective postfix expressions are 5 3 2 * + and 3 5 + 10 *.&lt;br /&gt;
&lt;br /&gt;
Basically I need to do two things if given a postfix expression: 1) determine if it's a valid postfix expression, and 2) if so, evaluate it.&lt;br /&gt;
&lt;br /&gt;
Now, I can do this with stacks easily.  Very easy to understand with stacks.  However, I need to do both using recursion, not stacks.&lt;br /&gt;
&lt;br /&gt;
I really don't know where to begin.  Can someone help with the necessary algorithm needed for both methods? tia</description>
      <pubDate>Wed, 19 Nov 2008 13:35:37 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>Can we know the geographical info(country, region, city) using java?</title>
      <link>http://www.programmersheaven.com/mb/java/381998/381998/can-we-know-the-geographical-infocountry-region-city-using-java/</link>
      <description>Hello Everyone,&lt;br /&gt;
&lt;br /&gt;
I'd like to know the geographical info(country, region, city,...etc) of client using java API.Is this possible?&lt;br /&gt;
I have searched on the web.However, I could not get any info.&lt;br /&gt;
Could someone let me know whether it is possible or not,Please?&lt;br /&gt;
Any help would be appreciated.&lt;br /&gt;
&lt;br /&gt;
Thanks.&lt;br /&gt;</description>
      <pubDate>Tue, 18 Nov 2008 03:15:18 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>Database Making</title>
      <link>http://www.programmersheaven.com/mb/java/381994/381994/database-making/</link>
      <description>Hello. This would be my first post in this site. Lucky me.&lt;br /&gt;
&lt;br /&gt;
Anyway, I have this dilemma. You see, I'm a student with a programming job (it's a light one, because i'm working in a forest-related course, and so my task is always computer-related since none but me there knows much about computers), and so my abilities are limited. Despite this, I took up the challenge to make a program. This would be my biggest work as of now.&lt;br /&gt;
&lt;br /&gt;
What I plan to do is to make a student record system. My dilemma is that I do not know how I would do it. I have made some basig GUI, but no processes are yet made. I have no idea how to make a concrete database (similar to that of MS Access 2007) with forms and such.&lt;br /&gt;
&lt;br /&gt;
I would want to use java for the following reasons:&lt;br /&gt;
1. I am most familiar with Java.&lt;br /&gt;
2. So that it would be easier and more... artistic to use Java than a simple database.&lt;br /&gt;
3. I am considering making this my project. Of course, any help would be credited and recognized.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please do help me. I only have 2 months to do this. Thank you very much.&lt;br /&gt;</description>
      <pubDate>Tue, 18 Nov 2008 02:43:50 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>need help with an invalid input problem.</title>
      <link>http://www.programmersheaven.com/mb/java/381934/381934/need-help-with-an-invalid-input-problem/</link>
      <description>Hey Guys,&lt;br /&gt;
I need help with an invalid input type of problem. my program needs the user to input a five digit integer, and if the input is invalid i don't want the program to crash, so i need to come up with a way to loop back and ask for a valid input type.&lt;br /&gt;
&lt;br /&gt;
Thanks.&lt;br /&gt;</description>
      <pubDate>Sun, 16 Nov 2008 20:23:17 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>unabling buttons</title>
      <link>http://www.programmersheaven.com/mb/java/381922/381922/unabling-buttons/</link>
      <description>how do i unable buttons then make them able only if a certain condition is done? example a button will not be "clickable" unless i type something in the textfield&lt;br /&gt;</description>
      <pubDate>Sun, 16 Nov 2008 05:00:12 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>composition</title>
      <link>http://www.programmersheaven.com/mb/java/381918/381918/composition/</link>
      <description>hi&lt;br /&gt;
i have 3 classes that i want to link using composition. class1 has a 2 dimensional array and class2 is to print the array and class3 is to sort the array in ascending order.&lt;br /&gt;
how do i get access to the class1(with the array), so i can manipulate it. &lt;br /&gt;</description>
      <pubDate>Sat, 15 Nov 2008 19:17:39 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>how to know the system configuration using java</title>
      <link>http://www.programmersheaven.com/mb/java/381899/381899/how-to-know-the-system-configuration-using-java/</link>
      <description>Hello Everyone,&lt;br /&gt;
&lt;br /&gt;
I wanna know the system configuration (Hard Disk size,Ram capacity,Processor speed) .Can we know it using Java API? Or else is there any API which makes my life easier?&lt;br /&gt;
&lt;br /&gt;
if we can know the system configuration using the languages like c or c++ ,&lt;br /&gt;
can we call that code using java?I am new to java.&lt;br /&gt;
Can someone let me know,please?&lt;br /&gt;
&lt;br /&gt;
All ur answers r most welcome.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;</description>
      <pubDate>Sat, 15 Nov 2008 01:13:44 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>Newbie class-question</title>
      <link>http://www.programmersheaven.com/mb/java/381874/381874/newbie-class-question/</link>
      <description>I've implemented a class that contains instance data that represents a sphere's diameter and I've written a constructor to initialize the diamter. Then I included getter and setter methods for the diameter and eventually calculated the volume.&lt;br /&gt;
&lt;br /&gt;
Now, the problem is that the next task is to "Create a driver class whose main method instantiates and updates several Sphere objects".&lt;br /&gt;
&lt;br /&gt;
I'm so confused =/ I've been trying and trying but I guess I don't really understand what it means.&lt;br /&gt;
Can someone please please explain?&lt;br /&gt;
=)&lt;br /&gt;</description>
      <pubDate>Fri, 14 Nov 2008 07:31:19 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>Evaluating Boolean Expressions in Java</title>
      <link>http://www.programmersheaven.com/mb/java/381856/381856/evaluating-boolean-expressions-in-java/</link>
      <description>Good evening to everyone!!!!!!&lt;br /&gt;
 &lt;br /&gt;
This question has me stumped and I'm not sure which loop or statement I should use.  Any help would be greatly appreciated.&lt;br /&gt;
 &lt;br /&gt;
Consider the following segment of code:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;                        
int x = 3, y = 5;
Integer i1, i2, i3, i4, i5;
i4 = new Integer (x + y);
i1 = new Integer (y + x);
i5 = x;
i3 = i4;
i2 = i3;
y = i5.intValue ( );
i4 = null;
x = i3;
 &lt;/pre&gt;&lt;br /&gt;
Evaluate the following expressions. If there is a runtime error, explain.&lt;br /&gt;
 &lt;pre class="sourcecode"&gt;                    
i1 == i3
i2 == i3
i2 == i4
i4 == null
i1.equals (i3)
i2.equals (i3)
i2.equals (i4)
i4.equals (i2) 
 &lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks in advance.&lt;br /&gt;</description>
      <pubDate>Thu, 13 Nov 2008 23:28:25 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>vector</title>
      <link>http://www.programmersheaven.com/mb/java/381853/381853/vector/</link>
      <description>how to add vector in java program?&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;</description>
      <pubDate>Thu, 13 Nov 2008 20:36:38 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>clustering algorithm</title>
      <link>http://www.programmersheaven.com/mb/java/381852/381852/clustering-algorithm/</link>
      <description>i need a source code using Frequent Term-based Text Clustering algorithm, or apriori algorithm?&lt;br /&gt;
&lt;br /&gt;
does anyone have it?&lt;br /&gt;
&lt;br /&gt;
Thanks so much.&lt;br /&gt;</description>
      <pubDate>Thu, 13 Nov 2008 20:35:56 -0700</pubDate>
      <category>Java</category>
    </item>
    <item>
      <title>Problem Loading my Java Applet</title>
      <link>http://www.programmersheaven.com/mb/java/381804/381804/problem-loading-my-java-applet/</link>
      <description>Hi all,&lt;br /&gt;
&lt;br /&gt;
I have created a java applet and it compiles fine but when I try view it in browser it does not loads.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

/**
 *
 * @author  Jamie66
 */
public class PcPerformance2 extends JApplet {
    
    //This run the into method what calls the initcomponents this
    //is where all the layout and button and layers are keep to be set up.
    public void init() {
        try {
            java.awt.EventQueue.invokeAndWait(new Runnable() {
               public void run() {
                    initComponents();
                }
            });
        } catch (Exception ex) {
          ex.printStackTrace();
       }
    }
    
    //This is the initcomponents this builds the gui
    //it put the button on the screen the jpanle the lables everythink you see
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        lbPcAmount = new javax.swing.JLabel();
        txtAmount = new javax.swing.JTextField();
        lbPc1Year = new javax.swing.JLabel();
        lbPcDay = new javax.swing.JLabel();
        lbCopyWrite = new javax.swing.JLabel();
        btnCal = new javax.swing.JButton();
        btnReset = new javax.swing.JButton();
        lbLogo = new javax.swing.JLabel();
        txtYear = new javax.swing.JLabel();
        txtDay = new javax.swing.JLabel();

        setLayout(new java.awt.BorderLayout());

        jPanel1.setBackground(new java.awt.Color(199, 198, 254));

        lbPcAmount.setText("Enter Performance Amount £");

        txtAmount.setText("0");

        lbPc1Year.setText("Total PcPerformance");

        lbPcDay.setText("Cost of PcPerformance per day");

        lbCopyWrite.setText("© Copywrite 2008");

        btnCal.setText("Calculate");
        btnCal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCalActionPerformed(evt);
            }
        });

        btnReset.setText("Reset");
        btnReset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnResetActionPerformed(evt);
            }
        });

        lbLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/PcP
erformance/pc.jpg"))); 

        txtYear.setText("0");

        txtDay.setText("0");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.Grou
pLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(29, 29, 29)
                .addGroup(jPanel1Layout.createParallelGroup(javax.
swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.
swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lbPcAmount)
                            .addComponent(lbPc1Year)
                            .addComponent(lbPcDay))
                        .addPreferredGap(javax.swing.LayoutStyle.Component
Placement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.
swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtAmount, javax.swing.GroupLayout.DEFAULT_SIZE, 72, Short.MAX_VALUE)
                            .addComponent(txtYear, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txtDay, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(45, 45, 45)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.
swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbCopyWrite)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(btnCal)
                                .addPreferredGap(javax.swing.LayoutStyle.Component
Placement.RELATED)
                                .addComponent(btnReset)))))
                .addContainerGap(45, Short.MAX_VALUE))
            .addComponent(lbLogo, javax.swing.GroupLayout.DEFAULT_SIZE, 302, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.Grou
pLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILI
NG, jPanel1Layout.createSequentialGroup()
                .addComponent(lbLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.Component
Placement.RELATED, 78, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.
swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbPcAmount)
                    .addComponent(txtAmount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.Component
Placement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.
swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbPc1Year)
                    .addComponent(txtYear))
                .addPreferredGap(javax.swing.LayoutStyle.Component
Placement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.
swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbPcDay)
                    .addComponent(txtDay))
                .addGap(35, 35, 35)
                .addGroup(jPanel1Layout.createParallelGroup(javax.
swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnCal)
                    .addComponent(btnReset))
                .addPreferredGap(javax.swing.LayoutStyle.Component
Placement.RELATED)
                .addComponent(lbCopyWrite)
                .addContainerGap())
        );

        lbPc1Year.getAccessibleContext().setAccessibleName
("Total PcPerformance");

        add(jPanel1, java.awt.BorderLayout.CENTER);
    }

private void btnCalActionPerformed(java.awt.event.ActionEvent evt) {                                       
// this is the actionlisten for the calculation button 
    
  double x;
  String total;
  String newtotal;
  
  //This converts the string to a double.
      try {
      String xStr = txtAmount.getText();
      x = Double.parseDouble(xStr);
   }
      //This gives an error if the user inputs a letter 
   catch (NumberFormatException e) {
          // The string xStr is not a legal number.
      txtAmount.setText("Illegal data");
      return;
   }
      //value = getParameter("length"); // Get message param, if any. to get value
     //currentLength = value;
    // value = getParameter("length");
    //   currentLength = Integer.parseInt(value);  // Convert string to number.
  
      //This is where the calculation takes place 
      total = ( "£" + (x*12));
      txtYear.setText(total);
      newtotal =(((x*12)/365) +"p");
      txtDay.setText(newtotal);
         
}                                      

private void btnResetActionPerformed(java.awt.event.ActionEvent evt) {                                         
// This is the second actionlisten that reset the fields once the button is clicked
    txtAmount.setText("0");
    txtYear.setText("0");
    txtDay.setText("0");
}                                        
 
    // Variables declaration - do not modify
    private javax.swing.JButton btnCal;
    private javax.swing.JButton btnReset;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel lbCopyWrite;
    private javax.swing.JLabel lbLogo;
    private javax.swing.JLabel lbPc1Year;
    private javax.swing.JLabel lbPcAmount;
    private javax.swing.JLabel lbPcDay;
    private javax.swing.JTextField txtAmount;
    private javax.swing.JLabel txtDay;
    private javax.swing.JLabel txtYear;
    // End of variables declaration
    

}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
That is my code and when I go to the java console it has this &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;java.lang.reflect.InvocationTargetException
	at java.awt.EventQueue.invokeAndWait(Unknown Source)
	at PcPerformance2.init(PcPerformance2.java:15)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
	at javax.swing.ImageIcon.&amp;lt;init&amp;gt;(Unknown Source)
	at PcPerformance2.initComponents(PcPerformance2.java:
69)
	at PcPerformance2.access$000(PcPerformance2.java:9)
	at PcPerformance2$1.run(PcPerformance2.java:17)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilter
s(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(U
nknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarch
y(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I hope someone can help sorry if this is silly mistake I am pretty new to java many thanks.&lt;br /&gt;</description>
      <pubDate>Wed, 12 Nov 2008 12:39:29 -0700</pubDate>
      <category>Java</category>
    </item>
  </channel>
</rss>