simple question - Help Please

i am doing my first java program with a gui. i can get a string from my JTextField(); and i need to get a double from that string. I found two possible ways of doing this on java.com, and another website. . .

way 1 -> from java.com ->class double method summary ->

staticdouble parseDouble(String s)

Returns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Double.

way 2 -> from javaworld.com -> Double.valueOf(j).doublevalue();

here is the part of my code in issue, unless i'm not importing something . . .

class OtherListenerimplements ActionListener

{

publicvoid actionPerformed(ActionEvent e)

{

if (e.getSource() == paidT)

{

String j = paidT.getText();

double paidTInput;

paidTInput = parseDouble(j);// way 1

Double.valueOf(j).doublevalue();// way 2

}

it seems to me that either should work, but when i try to compile i get an error saying

"cannot resolve symbol method parseDouble(java.lang.String)"

"cannot resolve symbol method doublevalue()"

I don't understand why I can't use these methods. I've included everything i can think of to give me access. It's probably something simple i'm doing wrong, but i can't figure out what that is. Thanks for any help.

here are my import statements, please tell me if i'm missing one or doing something wong . . .

import java.lang.Object.*;

import java.lang.Number.*;

import java.lang.Double.*;

import java.lang.*;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import javax.swing.event.*;

import javax.swing.text.*;

[2504 byte] By [Ryan2215a] at [2007-10-1 1:31:37]
# 1
Simply useString targetString = '4.54';double foo = Double.parseDouble(targetString);- Saish"My karma ran over your dogma." - Anon
Saisha at 2007-7-8 1:52:20 > top of Java-index,Security,Event Handling...
# 2
For info: You do not need to import java.lang.* ; Nor do you need import Object, Number and Double. They are always available without import.CheersDB
dbulaia at 2007-7-8 1:52:20 > top of Java-index,Security,Event Handling...
# 3
thanks. that works. i was confused with the syntax. but i'm new, and i was working on that all morning. thanks again.
Ryan2215a at 2007-7-8 1:52:20 > top of Java-index,Security,Event Handling...