harinath_2007 56 Posting Whiz

This may help you Link

harinath_2007 56 Posting Whiz

Clearly , you are trying to assign the Multipart object to String referrence and that is why you are getting that ClassCastException

harinath_2007 56 Posting Whiz

Obsession meaning:

An irrational motive for performing trivial or repetitive actions, even against your will
An unhealthy and compulsive preoccupation with something or someone

Programming is not trivial to me. and i dont do anything which is against my will.
And for me , it is not compulsive. It is my PASSION.

So "obsession" is NOT the right word. (for me atleast) .

PS: And this is just a general post which i am typing now because i thought to express what is in my mind
Just like "What's in your mind?" option in facebook. (I think Daniweb should also add the option of posting status messages :) )

There is more chance of misinterpreting things when we are dealing with TEXT. We cant show our expressions (ofcourse smileys are there) in the perfect way. So Dont take my post as argument or reply to your post.
Its my personal feeling.

harinath_2007 56 Posting Whiz

Programming is in my blood. .. Programming is my religion.. Programming is my passion......Programming is my A-Z

Add your's feeling too......

Happy programming :)

harinath_2007 56 Posting Whiz

Generally people sit in front of computers for a long time which results in eye strain. We indeed forget to take a break. So here is a good freeware called FADETOP which reminds you to take a break after every 15 minutes.
However you can change the default time. You can download it for free from the below link

FADE TOP DOWNLOAD

metechsavvy.blogspot.com

harinath_2007 56 Posting Whiz

you might be talking about data encryption. There are so many encryption algorithms.. Choose any one encryption algorithm and encrypt the data.

harinath_2007 56 Posting Whiz

True :)

harinath_2007 56 Posting Whiz

"If people are talking behind your back, it means you're far in front of them."

harinath_2007 56 Posting Whiz

There are lot of people who try to deviate you while you are trying to achieve something..
Use them as ladder to grow yourself.

harinath_2007 56 Posting Whiz

you are getting that NumberFormatException while trying to convert string to integer. because of the parseInt() method . Make sure you are giving the valid number as parameter to the parseInt() method.

parseInt method converts string to integer provided string contains only numbers (strictly numbers , not even a space after the number). Otherwise it throws an NumberFormatException.

PS: trim() method will be quite useful in this case

String s="567     ";
int num=Integer.parseInt(s.trim());

Here eventhough the string 's' contains spaces , trim method will trim the spaces thus avoiding exception

tux4life commented: Good :) +13
harinath_2007 56 Posting Whiz

LOL

q1

harinath_2007 56 Posting Whiz

anything would be fine..but java reduces your work through api calls. My personal choice would be java (even you posted this thread in java forum :) #kidding)
Just create a simple game like tic-tac-toe , chess etc.

tux4life commented: Good suggestion :) +13
harinath_2007 56 Posting Whiz

Hai. More or less , i am in the same situation right now that you are facing. I did my graduation in computer science and i have strong (strong is less word) passion towards computers. I want to do my Masters in Computer science but due to lack of money , i cant pursue my dreams.
Maybe today I cant afford my dreams. But one day (god is there and i believe that day will definitely come) i will make my dreams come true.. Till then we should work hard and have to be patient.
Eventhough i deeply want to continue my education , my financial position is laughing at me thinking i cant study further.
The only option available to me is : doing a job.(whatever the job maybe, i need to do as there is no option )
BUT SURELY , I WILL DEFEAT THIS POVERTY ONE DAY AND I WILL PURSUE MY DREAMS.
I wish everything good happens to you.

PS: MONEY SHOULD NOT BE A QUALIFICATION FOR EDUCATION. (Praying god to make it happen).

All the best :)

harinath_2007 56 Posting Whiz

you can try this

from int to string

int a=3;
String s=a+"":

from int to char

char c = (char)(((int)'0')+a);

however here the value of 'a' should be a single digit number

jalpesh_007 commented: good solution +4
harinath_2007 56 Posting Whiz

Hi folks.

I am trying to learn J2EE and I am looking for a complete J2EE tutorials online. Plz suggest me some links where i can learn the J2EE completely(if not 100%, atleast 90%) . It will be pleasure if the tutorials are FREE as i cant afford to pay for the course. I know J2SE (JDBC, servelts and upto JSP). And i am very familiar with all core and advanced java basics .

Thanks in advance

harinath_2007 56 Posting Whiz

"Without requirements or design, programming is the art of adding bugs to an empty text file. ”

harinath_2007 56 Posting Whiz

If one day
we all are allowed to put our troubles on a table
& exchange them..

After few moments,
everyone would silently take back his own....:-)

Stuugie commented: The grass is always greener on the other side +0
harinath_2007 56 Posting Whiz

Success will always be a shadow of hard work

harinath_2007 56 Posting Whiz

"Never ever lose the faith and courage in you until you reach your goal. No matter the fucking situations are."

harinath_2007 56 Posting Whiz

The human brain is most outstanding thing.It functions 24 hrs n 365
days.It functions right from time U were born until U fall in love.

harinath_2007 56 Posting Whiz

Its quite boring here and requires some hot programming stuff discussions LIVE. Eventhough there's a PM option , why cant there be an option to live chat with somebody else in this website and share our thoughts and ideas and lot more. Its time for creating chat rooms..

harinath_2007 56 Posting Whiz

"If Debugging Is The Process Of Removing Bugs, Then Programming Must Be The Process Of Putting Them In."

harinath_2007 56 Posting Whiz

Data structures is an ocean.. There will be something to learn still even after studying so much..
I found this site. Hope it helps.

harinath_2007 56 Posting Whiz

You need to declare outside the constructor if you want to access the variables in your class.

Remember one basic rule : The scope of any variable is within the block they declared

Ex:- { int a=5;} so variable 'a' cannot be accessed outside that block.

If you want to access the variables in one class from another class, just create the object of the class that you want to use and access the variables using dot(.) operator

I also see

 protected JLabel lblPlayerName2;

since protected is there , you can access the above variable only in the subclass or in same package.

Learn about Acces specifiers. Click Here

harinath_2007 56 Posting Whiz

Dont leave the catch block empty. Add ex.printStackTrace() in the catch block. So that you will know the errors if any. (Remember : Never ever leave the catch block empty in you whole programming life because that will make your life worse:) )

And you do not need to add any jar file unless you use third-party libraries.

harinath_2007 56 Posting Whiz

Ofcourse , you have to use KeyListener.

Go through KeyListener and KeyEvent classes . The KeyEvent class will be useful for comparing what keys have been pressed.

Google some keylistener examples and based upon that build your own logic.

For example , if you dont want to allow numerics, then you can place a simple IF statement

if(pressed key = KeyEvent.VK_0 || pressed key = KeyEvent.VK_1 .........upto 9)
{
  JOption.ShowMessageDialog(this,"you have pressed a numeric key ...");
 }
harinath_2007 56 Posting Whiz

Reading the above post.

ImZick commented: haha +0
harinath_2007 56 Posting Whiz

"When GOD pushes you to edge of difficulty,Trust him fully, Bcoz Only two things can happen--Either he will catch you when you fall or He will teach you how to fly..."

harinath_2007 56 Posting Whiz

So. Question and as well as answer are posted by yourself...:)

harinath_2007 56 Posting Whiz

Its better to have few REAL friends than to have a thousand FAKE ones.

zeroliken commented: If only that applies to facebook ;) +0
harinath_2007 56 Posting Whiz

Incase of java , yes you can ....(possible in other languages also)

but remember...you can pass only variables but not the logic ..
i mean

void dothis(String s)
{

   if(s)
{
 -----

if you call the dothis as dothis("10>5"); ..It is not correct

you can pass the values i.e 10 , 5 but not the logic(i mean 10>5)

because.. if condition will accept only boolean result..

if(condition) ---- the condition should always evaluate to boolean value in java

harinath_2007 56 Posting Whiz
ChrisHunter commented: mentioned SDL rather than just tips +4
harinath_2007 56 Posting Whiz

If I am am am, Then I'm Not Not Not, a nut!, or am I Not? :D

Syntax error....unable to compile...:)

codeorder commented: :D +0
harinath_2007 56 Posting Whiz

Why did i write this in italic?

Shanti C commented: :) +0
harinath_2007 56 Posting Whiz

:) Found the link Download Zip file

peter_budo commented: Thank you for sharing your findings. +16
harinath_2007 56 Posting Whiz

If you look at API there's no showMessageDialog method which takes string as first argument.

Call the method by passing correct parameters.

harinath_2007 56 Posting Whiz

"Dreams are not those whose which come in sleep. Dreams are those which will not let you sleep"

codeorder commented: :) +0
harinath_2007 56 Posting Whiz

I have a windows 7 operating system on my pc. I am trying to install windows xp using VMware
and everytime i start to boot the guest operating system i get the following error..


PXE-E53 : No boot filename received

PXE-MOF : Exiting Intel PXE ROM.
Operating system not found


Can anyone help me to fix this error...

harinath_2007 56 Posting Whiz

Try this..Robot

Robot r=new Robot();
r.createScreenCapture(new Rectangle(your jframe co-ordinates as parameters));

You need to calculate the co-ordinates of your frame inorder to capture only the frame.

If you want to write the captured image to a image file , you can use ImageIO.write() method

harinath_2007 56 Posting Whiz

You can create an array of objects similar to how you create an array of primitive data.

Subscriber s[]=new Subscriber[10];

The above creates an array of 10 Subscriber objects.

However you should initialize those objects by using any loop .

for(int i=0;i<10;i++)
{
   s[i]=new Subscriber();
}
harinath_2007 56 Posting Whiz

I have already answered the question.
You have multiple choices and it depends on your type of application and requirements.

Still...for your satisfaction.. check the very first link in this page

earlybirdsean commented: Nice +1
stbuchok commented: LMGTFY, I love it +7
harinath_2007 56 Posting Whiz

If you only do what you know you can do – you never do very much.
- Tom Krause

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

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

@caswimmer2011 What you want to say ?.

From your posts i understand that you want to use robot class for pressing the function keys (like f1,f2 etc) programatically.
For that you need not worry about your OS or computer type(laptop etc).

IF you want to press function keys for example f1
Here's how you do this..

Robot r=new Robot();
r.keyPress(KeyEvent.VK_F1);

For other keys refer KeyEvent class.

harinath_2007 56 Posting Whiz

It still contains the same reference as that of before closing the window.
Closing the window or disposing the window doens't mean destroying the JFrame object.
We can make visible the window even after destroying it.

As destroying a window or closing it is just a operation performed on the window.

The jframe contains the same reference as before even we destory the window...

Majestics commented: Execellent +4
harinath_2007 56 Posting Whiz

Did you forgot to write your question or just the Title is your question ?

Dont expect answers by posting like this.

You need to atleast type what exactly your problem...

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