server_crash 64 Postaholic

Well, you could write boolean methods like this:

boolean testInt(String s)
{
   try
   {
      Integer.parseInt(s);
   }
   catch(Exception e)
   {
      return false;
   }
   return true;
}

or something like that.

server_crash 64 Postaholic

i get
Exception in thread "main" java.lang.NoClassDefFoundError: myprogram
Thanks again.

Did you save the file as myprogram.java ? Could be your classpath is not correctly set.

server_crash 64 Postaholic

Dani, I think that's an excellent idea. It would surely make it easier to navigate and more likely for the 'confused' to post in the right spot. Also, it will make it look more active. Just my 200 bucks, but I think you have a good idea.

server_crash 64 Postaholic

Just with programming, unless you have no prior experience with the command line...

What language are you considering? A question asking pros and cons of certain IDE's isn't very meaningful unless it's for a specific language.

server_crash 64 Postaholic

I had to laugh when I saw this thread.

server_crash 64 Postaholic

If you're a beginner then the cons to any IDE is tremendous. Otherwise, they are fine. Always start with the command line and learn that first before moving on.

server_crash 64 Postaholic

1. Name this band: Smudge.
2. Who do the Eagles of Death Metal and Queens of the Stone Age have in common?
3. Name one DJ who used to work on pirate radio station Caroline.
4. Name one company which makes an mp3 player called the nano.
5. Name three members of Faithless.


1) Smudge... You gave the answer in your question

2) The guy with the hair

3) Janet Reno

4) Steve Jobs

5) Michael Jackson,Marty Mcfly, and server crash.

Please let me know when I can redeem my prize.

server_crash 64 Postaholic

Have you read the documentation???

server_crash 64 Postaholic

I just ate a cheese sandwich.

Seriously, isn't this thread like a year old?

server_crash 64 Postaholic

I would learn C++ to get used to an oops language. Java is simple lame version of C++ anyway!

And C++ is a lame version of C. :rolleyes:

Why make comparisions when they have different purposes.

server_crash 64 Postaholic

How is it configured wrong?


Why am I here? ----> Why do you care?

server_crash 64 Postaholic

Ummm it looks like you already did that??

server_crash 64 Postaholic

JEdit and the command prompt beat all of them.

server_crash 64 Postaholic

Hendersonville... In case you don't know where that's at, it's below asheville.

server_crash 64 Postaholic

Wow...been a long time since I seen one of these

26/M/NC

I'm from NC too... What part are you from?

server_crash 64 Postaholic

I'm half tempted to just provided a bubble sort and let him submit that to his teacher not knowing any better..

Muuuwhahhahhahahah. That would have been hilarious.

server_crash 64 Postaholic

15/M/MA

You like 15 year old/prefer males/my (your) apartment

That correct?

server_crash 64 Postaholic

You want us to do your homework for you?

server_crash 64 Postaholic

I believe

18+/yes please/your place or mine?

is the more classic notation for such humour.

In that case, for me it would be:


75+/oh yeah/im coming baby

server_crash 64 Postaholic

I think I did the exact same thing once writing a console web crawler. Took some tricky work with the indexOf() method.

Well, actually it was the link i was after.

server_crash 64 Postaholic

Here, add this code to the paint method:

g.drawString("DO YOUR OWN HOMEWORK",10,10);

It's not hard. Keep track of the size multiply it by .25 and you got your new size.

server_crash 64 Postaholic

Oh, then:

17/have sex with females/north carolina

that it?

server_crash 64 Postaholic

It's the color. I truthfully can't even see it (maybe it's the high resolution I'm running). I don't care about the border, but I would change the color. What about the gray color on the buttons? Like the menus and reply buttons? I think that would look good.

I just now saw the color. I have to slant my monitor.

server_crash 64 Postaholic

Yeah, you should darken that up a little.

server_crash 64 Postaholic

Update: Would LOVE if someone using Opera could take a screenshot and post it here.

Just testing the qoute. I don't know if I've made mistakes the last few times, but the quote box looked weird.

server_crash 64 Postaholic

What's asl?

server_crash 64 Postaholic


1.
When the GUIs opens it opens so that I have to change the size manually to view it i.e. the toolbar appears. Is there a way I can get my program to set the size of my GUI so its a decent size when it opens on screen?

setSize(width,height);

2.
Also does anyone know how to make the text of a text field into text type so it can be tested like this
if(textField1 == "John")

I tried if(textField1.getText( ) == "John") but I get an error alert box

Use:

if (textField1.getText().equals("John"))
server_crash 64 Postaholic

Use the ClipBoard?

server_crash 64 Postaholic

Reader reader = new InputStreamReader(conn.getInputStream(),cs.newDecoder());

cs.newDecoder() just creates a new decoder. The question is, will the reader automatically decode using your decoder? You'll have to answer that one because I don't know.

I haven't tried parsing anything yet, but its not throwing the error anymore.

So it's working now? Not sure why it wouldn't work before and work now. Only time I've seen such this is when a crappy IDE like bluj is used..doubt that's the problem.

server_crash 64 Postaholic

I took a look at the exception a little, and it seems a bit weird. It happens as the name implies, whenever the charset is changed.......

But when and why is it changed?? (I guess that would solve everything)

I'm only going to take a stab, but I think you need some decoding or something. The read method or the editor kit is converting to some kind of format that it likes, regardless of whether you specifiy otherwise. I don't know that format and I don't know how to find out. I just think you need to convert before you try to read...

Maybe I'm wrong, but it could be worth a try.

server_crash 64 Postaholic

I read where the microsoft encoding name really isn't a valid encoding name! I haven't read anything about what to change it to or anything, though. You could also look into adding support for it via the charsetprovider. My guess is that charset is not supported, so try this:

boolean isSupported(String charsetName)

and see if it is or not.

server_crash 64 Postaholic

This isn't an array:

int[] months= numOfYears[i]*12; //The variable used for user input for exact month information

Shouldn't it be:

int[] months= numOfYears[i*12];

server_crash 64 Postaholic

What do you mean by computer movements? Please be more specific.

server_crash 64 Postaholic

You just made it worse:

bttn.addActionListener( new ActionListener()) {     	// Created an "action listener" for the button which is defined by this anonymous class.
				  		}

If you don't know how to add and use an actionlistener, then please read up on it.

server_crash 64 Postaholic

Where's the closing parenthesis and semi-colon for the follow codes:

bttn.addActionListener( new ActionListener() {     				  		}
	               public void actionPerformed(ActionEvent evt) {
	                     	// This method will respond to the user's click entry for the mortgage term & interest
						i = 0;
				        MainForm.add(i);

				  }
server_crash 64 Postaholic

What's the question? What problem are you having? Is there an error?

server_crash 64 Postaholic

For more information RTFW

That was pretty funny, actually.


I thought about it, but it looks like more work than has to be done.

server_crash 64 Postaholic

If you are going to use a function and don't really understand how it works, then RTFM!

Okay, you can STFU!

You don't drive a car by guesswork, so what makes you think you can guess at the parameters to functions.

Well, I thought since I just magically knew the atoi() function existed, then I would magically know the parameter.

http://www.daniweb.com/techtalkforums/thread39656.html

Thanks Narue.

server_crash 64 Postaholic

Okay, I can't find a thread that I posted to just yesterday and recieved an email showing a nice reply by Narue, but I deleted it. I can't find that thread! Was it deleted? If it was, Narue, can you explain the reason atoi() is bad and the better way to do it again? If I'm just going crazy and it still exists, please post a link.

Sorry for posting such a stupid thread, but I would like the information.

server_crash 64 Postaholic

I think it's:

int x = atoi(char);

Probably better ways, but that's how I do it.

server_crash 64 Postaholic

Only opened by your program? You can save something as a different extension, but other programs will be able to open it and probably easily decipher the contents, especially if it's just text.

server_crash 64 Postaholic

setBackground(Color c);

server_crash 64 Postaholic

Shouldn't you be able to call the repaint() method of a specific frame?

server_crash 64 Postaholic

Check your layout manager. Maybe alter the gridbaglayout a little bit so it works.

server_crash 64 Postaholic

It worked fine for me. The manifest was good, the splash was good, etc... If it's still not working on your friends computer then maybe check what JRE you are running and compare it to what they are running. Maybe try right clicking on the jar file on the other computer and see if it's running it with javaw.

server_crash 64 Postaholic

ahh, it's no big deal. Anyone who offers me help deserves respect. I actually bought the lian li case which is really really nice!

server_crash 64 Postaholic

I got a frame called a dummy frame, but that was it. Nothing was on the frame or anything. Is your friend recieving an error message? Does the console icon appear in the system tray?

server_crash 64 Postaholic

That won't work the way you have. You MUST implement Runnable and override the run() method. Inside the run method is where you create the delay.

server_crash 64 Postaholic

It'll make a huge difference.

class Test implements Runnable
{
   public Test()
   {
     super();

     Thread t = new Thread(this); 
     t.start();
     //t.run();  can't remember if you have to call this or not
   }

   public void run()
   {
       while (true)
       {
           try
           {
              System.out.println("In Run");
              Thread.sleep(2000);
           }
           catch(InterruptedException ie)
           {
           }
     }
  }
}

It's not tested, but if you simply want a delay then use threads.

server_crash 64 Postaholic

Don't tell me you are creating a pause with System.out.println() ? Use threads and make it sleep.