Urgent help in java
This is a topic on Urgent help in java within the Programmers Corner forums, part of the Technology category; I need to learn about how to create drop menus and text entering area and a draw figures along with ...
-
Uber Newbie
Urgent help in java
I need to learn about how to create drop menus and text entering area and a draw figures along with when the user selects an option in menu I need to locate an object referring to that option on a rectangular board that I will have drawn along with some texts in that drawn rectangular box. Kindly suggest where I can learn that quickly. I know basics in core java.(all of these menus , board and texts should appear all at once that's the kind of project im trying to do )
-
Tech2 Members
Re: Urgent help in java
You probably want to learn Swing. I haven't really learned it myself, so I can't recommend a book. You can google for online tutorials though.
I did read a bit about Swing, and it looked quite simple to use. Shouldn't take you more than a few hours to learn everything you want to.
I'm back, baby! =P

-
Uber Newbie
Re: Urgent help in java
thanks man. i'm studying them now. but here is another problem i have. I tried to execute a java program creating threads in java but it threw out too many errors and all of them were stating something related to threads. is there something that i have to download and put in "include" directory or should i import some statements ?
-
Uber Newbie
Re: Urgent help in java
Here is another. I created a program to read contents from a file and show it on output. but on compiling the error is mentioned as follows-" class ARead is public, should be declared in a file named ARead.java"
Another error-"cannot find symbol BufferedReader br= new BufferedReader(fr);".
What should i do ? Should i add some header files like in c and C++ ? if yes then, how ?
-
Tech2 Members
Re: Urgent help in java
I'm not a pro Java dev but if you can post your code here, I can have a look. There are others here who are better than me and they'll probably help you too.
I'm back, baby! =P

-
Uber Newbie
Re: Urgent help in java
Here is the program-
[code=php:33xf3koc]<span class="syntaxdefault">
import*java</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">awt</span><span class="syntaxkeyword">.*;
</span><span class="syntaxdefault">import*java</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">io</span><span class="syntaxkeyword">.*;
public*class*</span><span class="syntaxdefault">ARead</span><span class="syntaxkeyword">{
public*</span><span class="syntaxdefault">void*f1</span><span class="syntaxkeyword">(){
********</span><span class="syntaxdefault">FileReader*fr</span><span class="syntaxkeyword">=*new*</span><span class="syntaxdefault">FileReader</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"C:/board_xy.txt"</span><span class="syntaxkeyword">);
********</span><span class="syntaxdefault">String*s</span><span class="syntaxkeyword">;
********</span><span class="syntaxdefault">Bufferedreader*br</span><span class="syntaxkeyword">=*new*</span><span class="syntaxdefault">BufferedReader</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">fr</span><span class="syntaxkeyword">);
********while((</span><span class="syntaxdefault">s</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">br</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">newLine</span><span class="syntaxkeyword">())!=*</span><span class="syntaxdefault">null</span><span class="syntaxkeyword">){
************</span><span class="syntaxdefault">System</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">out</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">println</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">s</span><span class="syntaxkeyword">);
********}
****}
}
public*class*</span><span class="syntaxdefault">AreadMain*</span><span class="syntaxkeyword">extends*</span><span class="syntaxdefault">ARead</span><span class="syntaxkeyword">{
****public*static*</span><span class="syntaxdefault">void*main</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">String*args</span><span class="syntaxkeyword">[]){
****</span><span class="syntaxdefault">ARead*a</span><span class="syntaxkeyword">;
****</span><span class="syntaxdefault">a</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">f1</span><span class="syntaxkeyword">();
****}
}*</span><span class="syntaxdefault"></span>[/code:33xf3koc]
-
Moderator
Re: Urgent help in java
Bufferedreader is not the same as BufferedReader.
case sensitivity matters.
Limitatation of Java: Class names should have the save corresponding file names. Class ARead should be present in file ARead.java ( more: http://stackoverflow.com/questions/5728 ... -myclass-j )
My Gear :HP Envy 14 / i5 520M / 8GB / 500GB HDD / 1TB Seagate GoFlex | Google Cr-48 | D-Link DGL 4500 | Denon AH-C360| Klipsch Image S4a | Fiio E5 | iPhone 3GS| Galaxy S II | Dell U2312HM| X-tatic 5.1 Gaming Headset | Logitech G400 Optical Mouse
-
Uber Newbie
Re: Urgent help in java
I did the changes as you told me but it still giving some errors- it says that it cannot find the symbol and then it points to FileReader in the program all over.
So what should i do now ?
-
Uber Newbie
Re: Urgent help in java
same for BufferedReader. I changed it and now i corrected it to BufferedReader everywhere
-
Uber Newbie
Re: Urgent help in java
Hey I got it. I just had to include the import statements in both the java files and add exception's try catch blocks.
Now it's working fine. thanks guys
Similar Threads
-
By hatZim in forum General Discussions
Replies: 0
Last Post: 11-21-2011, 12:58 PM
-
By padmu_123 in forum PC Hardware
Replies: 1
Last Post: 11-13-2006, 07:23 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules