harinath_2007 56 Posting Whiz

Looks like something went wrong...
You dont need to change any connections..
I will attach the entire working version of code if you would like to have...

harinath_2007 56 Posting Whiz

If you dont want the window not to close when user selects NO or CANCEL.

you should use

setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
harinath_2007 56 Posting Whiz

@sathya88

I think this is what you are looking for

frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);

place the above code in line 13 and 17.

harinath_2007 56 Posting Whiz

No..You cannot use the shortcut method. :)
You need to specify the access specifier for each member variable separately with patience..

But it will be nice if oracle make changes like what you have said..

harinath_2007 56 Posting Whiz

One more thing .. If you have a firewall like Zonealarm etc , ignore the firewall warnings and allow your program to access smtp..

harinath_2007 56 Posting Whiz

You can use JavaMail(javax.mail) for sending mail. you should provide your maid id and password in the program.
Check out this...
http://www.javacommerce.com/displaypage.jsp?name=javamail.sql&id=18274

harinath_2007 56 Posting Whiz

@ harinath_2007:
So what is your question..?
Be clear in what you say and ask the questions in a precise manner

sorry for not clearly asking the question, what i meant was since i have no expirience in developing application of larger scale, is it possible for someone like me to develop it? or should i wait until i have enough expirience to turn the idea i have into a real working software or preferable give it to someone who has the right expirience becauase my fear is not finishing it due to complexity of the problems that need to be solved while coding and time since i am still a student.

All it depends on the type of the software and seriousness of software( i mean whether the software will be developed for real time use or is it just a academic project)..

Even if it is a large scale application , why not give it a try??

If you think you are weak in coding , give yourself a considerable amount of time for preparing basics and syntax perfectly.

If you are stuck anywhere , There are many professionals here to help you ..

So prepare yourself and carry on.....

harinath_2007 56 Posting Whiz

So what is your question..?
Be clear in what you say and ask the questions in a precise manner.

harinath_2007 56 Posting Whiz

I am assunming that there is no way to extract it using windows zip?

If you are talking about .zip file , then you can unzip it using windows unzip command.

If you want , you can check it manually using command prompt

Open your command prompt and go to the diretory where the zip file is present and use the unzip command.

Ex. unzip hello.zip

The above command works perfectly and even it wont asks for user conformation .

You can write the same command in your java program.....Why going for another 7zip application.?

harinath_2007 56 Posting Whiz

Are you talking about .zip file or .rar file?

If it is zip file , you can use the unzip command.

unzip mydir.zip
harinath_2007 56 Posting Whiz

you can use StringTokenizer class inorder to differentiate ip and port

harinath_2007 56 Posting Whiz

@NormR1 I just gave the example to your explanation..

harinath_2007 56 Posting Whiz
JOptionPane.showMessageDialog (null,"\nMY SALARY IS "+EN + "\n MY DEDUCTION is" +DR );
NormR1 commented: Don't spoonfeed, let the OP work it out. -3
harinath_2007 56 Posting Whiz

What you asked or said works 100% right....

harinath_2007 56 Posting Whiz

Ofcourse..you CAN...

harinath_2007 56 Posting Whiz

Try this..

We can set class path from command prompt also..

Runtime r=Runtime.getRuntime();
r.exec("set classpath=your desired path");
harinath_2007 56 Posting Whiz

What are the errors you got when compiled your code?..post them..

harinath_2007 56 Posting Whiz

It all depends on your use and your requirements..

No IDE will change your software.. so all IDE's provide almost
same features and perfomance of IDE is not a big deal.

All that matters is perfomance of your code..

One man's crappy software is another man's full time job. ~Jessica Gaston

harinath_2007 56 Posting Whiz

Here's a useful link which may be helpful to you...

http://www.codeproject.com/KB/cs/Trial_Maker.aspx

harinath_2007 56 Posting Whiz

when a variables's value changes does it create an event, if so, what could I use to detect it?

Change in value of variables does not create a event .

But every GUI application can be well handled through events..

However ,in case of non-GUI application

Instead of checking the value of variable again and again

write the code which you need to execute when a variable value is changed and

call that function when the value changes.

check this condition

if(b==true)
{
valueChanged();
}

harinath_2007 56 Posting Whiz

EDIT: My problem was solved. :)
But I have a doubt, what is the most effective way to wait for something to happen in java?
for example, if I want to wait for a boolean b to be true, does this below work?

while(!b) {}
//stuff to do after wait here

or is it more effective to use a Thread and sleep some time before checking again? Or is there another way?

OLD SOLVED STUFF:
Hey, I'm developing a game in which you control a ball with your mouse and you must avoid hitting some rectangles that keep rising in number. While trying to write the scores to a file, I came across a very strange problem. When I add some lines in my code, to wrtie the score to a file, the collision detection stop working!!

I think the most effective way to make a program wait is using handling EVENTS..

harinath_2007 56 Posting Whiz

You should use the Thread.sleep() method in your code to make the progress Bar go slowly.


extend your class with Thread class and write all the code in run() method and then call the

sleep()method.

then you can make the progress bar go slowly....

harinath_2007 56 Posting Whiz

"copy the path of rt.jar file and set the class path in environmental variables"

WRONG. Not needed, not recommended, don't do this.

Setting the classpath will make the jdk to know where your class files are.


The CLASSPATH variable is one way to tell applications, including the JDK tools, where to look for user classes. (Classes that are part of the JRE, JDK platform, and extensions should be defined through other means, such as the bootstrap class path or the extensions directory.)


The advantage of classpath is you can create your own package and can use as part of
those packages that available in java ..


*****************

Setting the classpath doesn't mean that it is wrong..

harinath_2007 56 Posting Whiz

can anyone say how to use java in windows 7
I installed it but its not working.
i am unable to compile a java program.
please help me in solving this problem.


i am getting this message in command problem when i use javac

"'javac' is not recognized as an internal or external command,
operable program or batch file."

please help me

You need to set the path of the java in the environmental variables inorder to compile
and run the java programs..


Go to the folder where java installed and copy the path of the bin folder

for ex. In my system , java is installed C drive.

C:\Program Files\Java\jdk1.6.0\bin;

set the bin folder path to the environmental variables path

Now find the rt.jar file in the jre\lib folder .

C:\Program Files\Java\jre1.6.0\lib\rt.jar;.;

copy the path of rt.jar file and set the class path in environmental variables

now you can compile and run the java programs..

enjoy java programming

harinath_2007 56 Posting Whiz

Hi,
I have managed to assemble the following but how do I convert the Raster result to an Image type?

public Raster transform(Image img, float alpha) {
    BufferedImage bi = new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_ARGB);
    bi.getGraphics().drawImage(img, 0, 0, null);
    RasterOp rop = new RescaleOp(new float[] { 1.0f, 1.0f, 1.0f, alpha }, new float[] { 0.0f, 0.0f, 0.0f, 0.0f }, null);
    //BufferedImage fImage = new BufferedImage(bi.getWidth(), bi.getHeight(), bi.getType());
    Raster result;
    result = rop.filter(bi.getData(), null);
    return result;
    }

I dint understand why do u need image object

because if you want to save that image you can directly use WritableRaster class..