Win a copy of Head First Android this week in the Android forum!

neha gautam

Ranch Hand
+ Follow
since Mar 31, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by neha gautam

thank you for the response balu..

textreader is not my own class but java predefined input stream..
i have read the file word by word,,,,
and not line by line...
its like the text file of the form

0.300, -124.87,
0.362, -127.36,
0.425, -129.30,
0.487, -131.52,
0.549, -133.48,
0.612, -135.43,
0.674, -137.19,
0.736, -138.74,
0.798, -140.21,
0.861, -141.52,
0.923, -142.71,
0.985, -143.86,
1.048, -144.94,
1.110, -146.01,
1.172, -146.87,
1.235, -147.60,
1.297, -148.74,
1.359, -149.45,
1.422, -150.16,
1.484, -151.03,
1.546, -151.56,
1.609, -152.31,
1.671, -152.99,
1.733, -153.76,
1.796, -154.51,
1.858, -155.06,


and my job is to read the file and display a graph between the 1st and 2nd colmns
as X and Y axis, i have my graph prgm, jus had prblm in readin the contents..
so i thought the option of reading the file word by word and storin the colmnsin separate arrays and linkin
them with graph prgrams..
kindly correct me if you think i m wrong somewhr..
thanks for all your help
12 years ago
even by importin its givin same error on compliation
i jus appended the progrm with:

import java.JSci.io.TextReader;


do i need to anyother thing except this
actually i hv to read my text file word by word
can you guys suggest some other way for the same.
thanks to all
12 years ago
thanks balu......

ill try that out
12 years ago
hi all..

here is the code i m tryin to execute its givin me the error with TextReader..
i can figure why..



the error is:



C:\neha>javac WordCount.java
WordCount.java:20: cannot find symbol
symbol : class TextReader
location: class WordCount
static TextReader in; // An input stream for reading the input file.
^
WordCount.java:137: cannot find symbol
symbol : class TextReader
location: class WordCount
static void readWords(TextReader inStream, Map words) {
^
WordCount.java:121: cannot find symbol
symbol : class TextReader
location: class WordCount
in = new TextReader(new FileReader(args[0]));
^
WordCount.java:176: package TextReader does not exist
catch (TextReader.Error e) {
^
Note: WordCount.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors



i don know what i m missin.....
please help..
thanks to all
12 years ago
i m really sorry maneesh if you got this type of perception
ill be more careful from now on, kindly pardon me

on clicking the radio button , i shud get the string displayed on the GUI window, but its
not happenin(nothin is happenin), i don know wat i m missin

12 years ago
hello all, i m new to swings........
kindly help me insertin a textarea in which i want
to display the String stored in data.. i have problem addin the panel to the frame..
shud i make a new frame object and then add panel to it(frame1) i want my String(here named as data) to be displayed in a GUI window
or can i do it with the frame instance i made it in main method..
kindly correct me if i m wrong any where

thanks to all

12 years ago
hey guys thanks a lot for everythin, it came on console...
thanks so so much for help...
i jus have to get it in textarea and move further.
thanks again
12 years ago
thanks rob, but i noticed it, but didnt help,
the code i m executin is


kindly tell me if you find any error
12 years ago
ya definitely..... thats why the files it displayed them initially...

this part:
C:\watri>java UI_new
file: ElecBallast_02mmApart_38mmOffGND_20dBAtten.xls
file: P1k.txt
file: Rled.txt
file: UI(2).java
12 years ago
its the exceptions i get when i click the filename

they are:

C:\watri>java UI_new
file: ElecBallast_02mmApart_38mmOffGND_20dBAtten.xls
file: P1k.txt
file: Rled.txt
file: UI(2).java
java.io.FileNotFoundException: c:\watri\filesP1k.txt (The system cannot find the
file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileReader.<init>(Unknown Source)
at ReadFile.getContents(ReadFile.java:18)
at UI_new.actionPerformed(UI_new.java:96)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.JToggleButton$ToggleButtonModel.setPressed(Unknown Source
)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
ce)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

12 years ago
thanks all..
my code after addin textarea is :



very sorry if i m botherin you guys muc... please tell me if i did some thin incorrect..
the error still persists , i m still checkin on it
12 years ago
thanks swastik and Ulf..
it still givin the same no change.. i am tryin, if you get somethin , kindly
let me know
12 years ago