Ajay Patel

Ranch Hand
+ Follow
since Jan 02, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ajay Patel

Hi everybody,
I want to append all the formatted Text of a JTextPane to another JTextPane which already has some formatted and multicolored text in it. I can append the text in one JTextPane to another, but I want to maintain the formatting also. There are no readymade functions for this. If anyone has done this earlier, then please advice on the approach. If you can provide me a code snippet, it would be great.
Thanx.
Aj
22 years ago
Thanx Monty.
I was not aware of the PolicyTool. I found your posting in the forum and it was very helpful.
thanx again
AJ
[This message has been edited by Aj Patel (edited June 21, 2001).]
thanx paul. the site was of great help.
AJ
23 years ago
hi all
i have been trying to connect to a access database through the jdbc. my code works perfectly fine when i run it as a stand alone program. but the same code when run as a applet gives the following exception while establishing the connection:
java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
the error probably is due to the security policy of applets. this is the first time i am working with jdbc in applets so i cant exactly pin point the source of error. both the applet and the database or on the local machine. how do i granct access rights to the applet to connect to the database?
thanx in advance.
AJ
hi all
i am working on an applet which contains a JTable. I want to render colors to certain cells of this table to show relation between the cells. I cannot find any method of the JTable class which helps me to specify colors individually for selected cells.
Can anybody help... thanx
AJ
23 years ago
hi guys and gals
i am a SCJP. i want to prepare for the SCJD.. is anyone preparing for the same exam in gujarat. i live in baroda.
also i want to get a few java fundamentals like RMI, sockets, etc cleared before paying for the assignment. So guys please recommend a book for this. And what is ur advice for the topics i should cover before plunging into the assignment.
thanx.
-aj
i gave the exam and didnt come across such questions. but i saw few such questions in the mock exams. i have found that the mock exams sometimes go out of required course of SCJP. i dont think u have to bother about javadoc. but some extra knowledge doesnt hurt anyone. and anyway u will have to look beyond the course in SCJP to make a career in java.
-AJ
24 years ago
hi chun
ya its true!!! CheckboxMenuItem inherits addActionListener from MenuItem, but it does not generate action events.
This is stated in the Sun's AWT tutorials.
-Aj
hi snehal
u will get forward referencing error at compile time only if u reference a variable directly i an initializer block or initializing expression before the variable is declared. i.e a variable has to be declared before using it in the initialization. This is not binding on a method. so ur code will not give a forward reference error.
I have modified the code to illustrate:
public class AQuestion
{
private int i = giveMeJ(); //no error -- but maybe logic error as u may actually have wanted i to get value 10 but it will get 0.
private int giveMeJ()
{
return j; //no error
}
{
j++;//illegal forward reference of j
}
public static void main(String args[])
{
System.out.println((new AQuestion()).i);
}
private int z = i*j;//illegal forward reference of j
private int j = 10;
}
see khalid chapter 8... its got great explanation on initialization.
-Aj
[This message has been edited by Aj Patel (edited January 24, 2001).]
61% wow.
talk about living life on the edge.
but i guess alls well that ends well. congrats!!!
-Aj
24 years ago
hi abhimanyu
After you get a hold of basic java concepts and want to start preparation for SCJP the best book is Khalid Mughal's book for java certification. This is the only book i used and it was enough. But it a tough book to start learning Object Oriented Programming concepts. so do clear your OOP concepts before starting for SCJP preparation.
Also for SCJP the java API documentation and JLS are indispensable. Both are available at sun's java site. i dont have the URL's now.... but u can always search.
as far as job prospects for SCJPs are concerned.. i have little idea because i havent really inquired. i am planning to pursue SCJD certification... then maybe look at the job value of these certifications.
-Aj
[This message has been edited by Aj Patel (edited January 21, 2001).]
24 years ago
Yes the time of the exam has been changed by sun to 120 min. So there is nothing surprising in it.
The diff is simple
c+=i;
is treated as:
c = (char)(c+i);
Since the result of c+i is an int it requires an explicit cast. In the first code u havent provided this cast so compiler complains. But as u see above in the second case the cast is implied implicitly.
Remember this point. It is very imp for SCJP exam
-Aj
Marcus Green is great but quite easy. Though what u score in this exam may closely match your actual score (mine was close).
But giving this exam might get you overconfident. If you are giving your first mock exam then go for Marcus Green's papers.
I think Khalid's Exam is best. The only problem is he doesnt provide the answers after the exam. But if u have his book, then the exam at the back is a must.
Bill Brodgen's Questions are also great and a must see.
His set of hardest questions is very good.
Also Jxam is good.
-Aj
hi all
just passed the SCJP today with 93%. Thank you to all on this site for the help through out my preparation.
I want to tell all that the exam is quite easy. I just spent 3 weeks for preparation, and had very little background in java programming before starting the preparation. But I have been programming in C++ for quite some time and the knowledge and background of OOP in C++ helped a lot.. But once u start preparing for the exam u have to leave C++ behind. so for all of you guys who are going for the exam.... dont fear - its quite easy. Just do a lot of coding. If you can tell what your code is going to do before compiling and running it, then u know java.
I only used Khalid's book for the preparation. I think this book is great. And it also goes beyond the exam. So its going to be a good book to keep even after the exam. I havent seen RHE so i cant comment on it.
For anybody who is studying for the exam the JLS and java API documentation are a must see. There is no better source to study java than the documentation provided by sun itself!!!
Also i found Khalid's Mock Exam the best and toughest. Bill Brogden's Question are also good. Marcus Green's Test Papers are too easy and I got 98% in his exam... But they are great for your first mock exam. Jxam is also good.. but some questions are ambigous.
so Best of luck to all who are going for SCJP. I am looking forward to helping you all in any way i can. This site is great in that it gives you an oppurtunity to give back to the javaranch community in return for what u have got.
-Aj
24 years ago