i got a desktop program that has a menu bar and a textArea, wen i presS the button on the menubar the folowing actionperformed happend:
WHAT I WANT IS TO OPEN MY TXT FILE BY PRESSING THE MENU BAR BUTTON AND READ IT AND PUT THE READING ON THE TEXTAREA IN THE APLICATION, BUT THAT HASNT BEEN THE RESULT, I WANNA KNOW WERE IS THE ISSUE
THANKS RANCHERSS!!!
There's a good chance that some kind of exception is being thrown. However you will never know, because your code ignores exceptions. Try this instead:
However, having said that I suspect your problem is that your file path is nothing like an actual Windows file path. Where did all those colons (:::) come from?
And finally you don't need to write the code yourself to read from the file and write it into the text area. You can just use a method from the standard API:
Alfredo Garcia 34353454
Richard Blemen 23525342
Mick Jagger 24523523
Robert Pattinson 65434518
Hayden Pannetiere 36486712
Alice Eve 97246590
Hugo Beaven 28288282
Beavis Acdc 54545445
Buthead Acdc 12121221
Mathias Oviedo 78787887
Marcos Viera 29292992
Wesker Almond 33333333
Trinity Gogo 22222222
Tia Carrera 44444444
Kristen Stweart 66666666
Charlize Theron 77777777
Denzel Washington 99999999
Angus Young 23312323
Malcom Young 23311332
Jhon Lennon 57575775
Jason Statam 83838383
Mario Bros 91291291
Luigi Bros 48297538
Amy Adams 98239832
Isla Fisher 20202020
and you are right whit the naming conventions i should stick whit one
Kemal Sokolovic wrote:Than it probably means the file you are reading is empty.
We don't even know if that code is being executed. (I asked but received no answer.)
I always suppose people run it through debugger to at least make sure execution comes to the code they are asking for, before posting a question like this. Guess that's not the case.
Kemal Sokolovic wrote:I always suppose people run it through debugger to at least make sure execution comes to the code they are asking for, before posting a question like this. Guess that's not the case.
You might think so, but quite often beginners produce this sort of thing on the first day after they install Netbeans, and they have no idea how to use Netbeans for debugging. Or even what debugging is, for that matter.
Paul Clapham wrote:You might think so, but quite often beginners produce this sort of thing on the first day after they install Netbeans, and they have no idea how to use Netbeans for debugging. Or even what debugging is, for that matter.
Apparently that is the case, I'll keep that in mind.
Post by:autobot
You have to be odd to be #1 - Seuss. An odd little ad:
a bit of art, as a gift, that will fit in a stocking